Added cubby-holes for new projects.
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionBsnChecksumVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionBsnChecksumVer13.java
new file mode 100644
index 0000000..a6c164c
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionBsnChecksumVer13.java
@@ -0,0 +1,313 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFActionBsnChecksumVer13 implements OFActionBsnChecksum {
+ private static final Logger logger = LoggerFactory.getLogger(OFActionBsnChecksumVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 28;
+
+ private final static U128 DEFAULT_CHECKSUM = U128.ZERO;
+
+ // OF message fields
+ private final U128 checksum;
+//
+ // Immutable default instance
+ final static OFActionBsnChecksumVer13 DEFAULT = new OFActionBsnChecksumVer13(
+ DEFAULT_CHECKSUM
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFActionBsnChecksumVer13(U128 checksum) {
+ this.checksum = checksum;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFActionType getType() {
+ return OFActionType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x4L;
+ }
+
+ @Override
+ public U128 getChecksum() {
+ return checksum;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFActionBsnChecksum.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFActionBsnChecksum.Builder {
+ final OFActionBsnChecksumVer13 parentMessage;
+
+ // OF message fields
+ private boolean checksumSet;
+ private U128 checksum;
+
+ BuilderWithParent(OFActionBsnChecksumVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFActionType getType() {
+ return OFActionType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x4L;
+ }
+
+ @Override
+ public U128 getChecksum() {
+ return checksum;
+ }
+
+ @Override
+ public OFActionBsnChecksum.Builder setChecksum(U128 checksum) {
+ this.checksum = checksum;
+ this.checksumSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFActionBsnChecksum build() {
+ U128 checksum = this.checksumSet ? this.checksum : parentMessage.checksum;
+ if(checksum == null)
+ throw new NullPointerException("Property checksum must not be null");
+
+ //
+ return new OFActionBsnChecksumVer13(
+ checksum
+ );
+ }
+
+ }
+
+ static class Builder implements OFActionBsnChecksum.Builder {
+ // OF message fields
+ private boolean checksumSet;
+ private U128 checksum;
+
+ @Override
+ public OFActionType getType() {
+ return OFActionType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x4L;
+ }
+
+ @Override
+ public U128 getChecksum() {
+ return checksum;
+ }
+
+ @Override
+ public OFActionBsnChecksum.Builder setChecksum(U128 checksum) {
+ this.checksum = checksum;
+ this.checksumSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFActionBsnChecksum build() {
+ U128 checksum = this.checksumSet ? this.checksum : DEFAULT_CHECKSUM;
+ if(checksum == null)
+ throw new NullPointerException("Property checksum must not be null");
+
+
+ return new OFActionBsnChecksumVer13(
+ checksum
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFActionBsnChecksum> {
+ @Override
+ public OFActionBsnChecksum readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 65535
+ short type = bb.readShort();
+ if(type != (short) 0xffff)
+ throw new OFParseError("Wrong type: Expected=OFActionType.EXPERIMENTER(65535), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 28)
+ throw new OFParseError("Wrong length: Expected=28(28), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x4L
+ int subtype = bb.readInt();
+ if(subtype != 0x4)
+ throw new OFParseError("Wrong subtype: Expected=0x4L(0x4L), got="+subtype);
+ U128 checksum = U128.read16Bytes(bb);
+
+ OFActionBsnChecksumVer13 actionBsnChecksumVer13 = new OFActionBsnChecksumVer13(
+ checksum
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", actionBsnChecksumVer13);
+ return actionBsnChecksumVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFActionBsnChecksumVer13Funnel FUNNEL = new OFActionBsnChecksumVer13Funnel();
+ static class OFActionBsnChecksumVer13Funnel implements Funnel<OFActionBsnChecksumVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFActionBsnChecksumVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 65535
+ sink.putShort((short) 0xffff);
+ // fixed value property length = 28
+ sink.putShort((short) 0x1c);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x4L
+ sink.putInt(0x4);
+ message.checksum.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFActionBsnChecksumVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFActionBsnChecksumVer13 message) {
+ // fixed value property type = 65535
+ bb.writeShort((short) 0xffff);
+ // fixed value property length = 28
+ bb.writeShort((short) 0x1c);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x4L
+ bb.writeInt(0x4);
+ message.checksum.write16Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFActionBsnChecksumVer13(");
+ b.append("checksum=").append(checksum);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFActionBsnChecksumVer13 other = (OFActionBsnChecksumVer13) obj;
+
+ if (checksum == null) {
+ if (other.checksum != null)
+ return false;
+ } else if (!checksum.equals(other.checksum))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((checksum == null) ? 0 : checksum.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionBsnMirrorVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionBsnMirrorVer13.java
new file mode 100644
index 0000000..1c86a08
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionBsnMirrorVer13.java
@@ -0,0 +1,412 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFActionBsnMirrorVer13 implements OFActionBsnMirror {
+ private static final Logger logger = LoggerFactory.getLogger(OFActionBsnMirrorVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 24;
+
+ private final static OFPort DEFAULT_DEST_PORT = OFPort.ANY;
+ private final static long DEFAULT_VLAN_TAG = 0x0L;
+ private final static short DEFAULT_COPY_STAGE = (short) 0x0;
+
+ // OF message fields
+ private final OFPort destPort;
+ private final long vlanTag;
+ private final short copyStage;
+//
+ // Immutable default instance
+ final static OFActionBsnMirrorVer13 DEFAULT = new OFActionBsnMirrorVer13(
+ DEFAULT_DEST_PORT, DEFAULT_VLAN_TAG, DEFAULT_COPY_STAGE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFActionBsnMirrorVer13(OFPort destPort, long vlanTag, short copyStage) {
+ this.destPort = destPort;
+ this.vlanTag = vlanTag;
+ this.copyStage = copyStage;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFActionType getType() {
+ return OFActionType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x1L;
+ }
+
+ @Override
+ public OFPort getDestPort() {
+ return destPort;
+ }
+
+ @Override
+ public long getVlanTag() {
+ return vlanTag;
+ }
+
+ @Override
+ public short getCopyStage() {
+ return copyStage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFActionBsnMirror.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFActionBsnMirror.Builder {
+ final OFActionBsnMirrorVer13 parentMessage;
+
+ // OF message fields
+ private boolean destPortSet;
+ private OFPort destPort;
+ private boolean vlanTagSet;
+ private long vlanTag;
+ private boolean copyStageSet;
+ private short copyStage;
+
+ BuilderWithParent(OFActionBsnMirrorVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFActionType getType() {
+ return OFActionType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x1L;
+ }
+
+ @Override
+ public OFPort getDestPort() {
+ return destPort;
+ }
+
+ @Override
+ public OFActionBsnMirror.Builder setDestPort(OFPort destPort) {
+ this.destPort = destPort;
+ this.destPortSet = true;
+ return this;
+ }
+ @Override
+ public long getVlanTag() {
+ return vlanTag;
+ }
+
+ @Override
+ public OFActionBsnMirror.Builder setVlanTag(long vlanTag) {
+ this.vlanTag = vlanTag;
+ this.vlanTagSet = true;
+ return this;
+ }
+ @Override
+ public short getCopyStage() {
+ return copyStage;
+ }
+
+ @Override
+ public OFActionBsnMirror.Builder setCopyStage(short copyStage) {
+ this.copyStage = copyStage;
+ this.copyStageSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFActionBsnMirror build() {
+ OFPort destPort = this.destPortSet ? this.destPort : parentMessage.destPort;
+ if(destPort == null)
+ throw new NullPointerException("Property destPort must not be null");
+ long vlanTag = this.vlanTagSet ? this.vlanTag : parentMessage.vlanTag;
+ short copyStage = this.copyStageSet ? this.copyStage : parentMessage.copyStage;
+
+ //
+ return new OFActionBsnMirrorVer13(
+ destPort,
+ vlanTag,
+ copyStage
+ );
+ }
+
+ }
+
+ static class Builder implements OFActionBsnMirror.Builder {
+ // OF message fields
+ private boolean destPortSet;
+ private OFPort destPort;
+ private boolean vlanTagSet;
+ private long vlanTag;
+ private boolean copyStageSet;
+ private short copyStage;
+
+ @Override
+ public OFActionType getType() {
+ return OFActionType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x1L;
+ }
+
+ @Override
+ public OFPort getDestPort() {
+ return destPort;
+ }
+
+ @Override
+ public OFActionBsnMirror.Builder setDestPort(OFPort destPort) {
+ this.destPort = destPort;
+ this.destPortSet = true;
+ return this;
+ }
+ @Override
+ public long getVlanTag() {
+ return vlanTag;
+ }
+
+ @Override
+ public OFActionBsnMirror.Builder setVlanTag(long vlanTag) {
+ this.vlanTag = vlanTag;
+ this.vlanTagSet = true;
+ return this;
+ }
+ @Override
+ public short getCopyStage() {
+ return copyStage;
+ }
+
+ @Override
+ public OFActionBsnMirror.Builder setCopyStage(short copyStage) {
+ this.copyStage = copyStage;
+ this.copyStageSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFActionBsnMirror build() {
+ OFPort destPort = this.destPortSet ? this.destPort : DEFAULT_DEST_PORT;
+ if(destPort == null)
+ throw new NullPointerException("Property destPort must not be null");
+ long vlanTag = this.vlanTagSet ? this.vlanTag : DEFAULT_VLAN_TAG;
+ short copyStage = this.copyStageSet ? this.copyStage : DEFAULT_COPY_STAGE;
+
+
+ return new OFActionBsnMirrorVer13(
+ destPort,
+ vlanTag,
+ copyStage
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFActionBsnMirror> {
+ @Override
+ public OFActionBsnMirror readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 65535
+ short type = bb.readShort();
+ if(type != (short) 0xffff)
+ throw new OFParseError("Wrong type: Expected=OFActionType.EXPERIMENTER(65535), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 24)
+ throw new OFParseError("Wrong length: Expected=24(24), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x1L
+ int subtype = bb.readInt();
+ if(subtype != 0x1)
+ throw new OFParseError("Wrong subtype: Expected=0x1L(0x1L), got="+subtype);
+ OFPort destPort = OFPort.read4Bytes(bb);
+ long vlanTag = U32.f(bb.readInt());
+ short copyStage = U8.f(bb.readByte());
+ // pad: 3 bytes
+ bb.skipBytes(3);
+
+ OFActionBsnMirrorVer13 actionBsnMirrorVer13 = new OFActionBsnMirrorVer13(
+ destPort,
+ vlanTag,
+ copyStage
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", actionBsnMirrorVer13);
+ return actionBsnMirrorVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFActionBsnMirrorVer13Funnel FUNNEL = new OFActionBsnMirrorVer13Funnel();
+ static class OFActionBsnMirrorVer13Funnel implements Funnel<OFActionBsnMirrorVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFActionBsnMirrorVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 65535
+ sink.putShort((short) 0xffff);
+ // fixed value property length = 24
+ sink.putShort((short) 0x18);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x1L
+ sink.putInt(0x1);
+ message.destPort.putTo(sink);
+ sink.putLong(message.vlanTag);
+ sink.putShort(message.copyStage);
+ // skip pad (3 bytes)
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFActionBsnMirrorVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFActionBsnMirrorVer13 message) {
+ // fixed value property type = 65535
+ bb.writeShort((short) 0xffff);
+ // fixed value property length = 24
+ bb.writeShort((short) 0x18);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x1L
+ bb.writeInt(0x1);
+ message.destPort.write4Bytes(bb);
+ bb.writeInt(U32.t(message.vlanTag));
+ bb.writeByte(U8.t(message.copyStage));
+ // pad: 3 bytes
+ bb.writeZero(3);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFActionBsnMirrorVer13(");
+ b.append("destPort=").append(destPort);
+ b.append(", ");
+ b.append("vlanTag=").append(vlanTag);
+ b.append(", ");
+ b.append("copyStage=").append(copyStage);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFActionBsnMirrorVer13 other = (OFActionBsnMirrorVer13) obj;
+
+ if (destPort == null) {
+ if (other.destPort != null)
+ return false;
+ } else if (!destPort.equals(other.destPort))
+ return false;
+ if( vlanTag != other.vlanTag)
+ return false;
+ if( copyStage != other.copyStage)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((destPort == null) ? 0 : destPort.hashCode());
+ result = prime * (int) (vlanTag ^ (vlanTag >>> 32));
+ result = prime * result + copyStage;
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionBsnSetTunnelDstVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionBsnSetTunnelDstVer13.java
new file mode 100644
index 0000000..32cd4d0
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionBsnSetTunnelDstVer13.java
@@ -0,0 +1,306 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import java.util.Set;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFActionBsnSetTunnelDstVer13 implements OFActionBsnSetTunnelDst {
+ private static final Logger logger = LoggerFactory.getLogger(OFActionBsnSetTunnelDstVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 16;
+
+ private final static long DEFAULT_DST = 0x0L;
+
+ // OF message fields
+ private final long dst;
+//
+ // Immutable default instance
+ final static OFActionBsnSetTunnelDstVer13 DEFAULT = new OFActionBsnSetTunnelDstVer13(
+ DEFAULT_DST
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFActionBsnSetTunnelDstVer13(long dst) {
+ this.dst = dst;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFActionType getType() {
+ return OFActionType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x2L;
+ }
+
+ @Override
+ public long getDst() {
+ return dst;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFActionBsnSetTunnelDst.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFActionBsnSetTunnelDst.Builder {
+ final OFActionBsnSetTunnelDstVer13 parentMessage;
+
+ // OF message fields
+ private boolean dstSet;
+ private long dst;
+
+ BuilderWithParent(OFActionBsnSetTunnelDstVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFActionType getType() {
+ return OFActionType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x2L;
+ }
+
+ @Override
+ public long getDst() {
+ return dst;
+ }
+
+ @Override
+ public OFActionBsnSetTunnelDst.Builder setDst(long dst) {
+ this.dst = dst;
+ this.dstSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFActionBsnSetTunnelDst build() {
+ long dst = this.dstSet ? this.dst : parentMessage.dst;
+
+ //
+ return new OFActionBsnSetTunnelDstVer13(
+ dst
+ );
+ }
+
+ }
+
+ static class Builder implements OFActionBsnSetTunnelDst.Builder {
+ // OF message fields
+ private boolean dstSet;
+ private long dst;
+
+ @Override
+ public OFActionType getType() {
+ return OFActionType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x2L;
+ }
+
+ @Override
+ public long getDst() {
+ return dst;
+ }
+
+ @Override
+ public OFActionBsnSetTunnelDst.Builder setDst(long dst) {
+ this.dst = dst;
+ this.dstSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFActionBsnSetTunnelDst build() {
+ long dst = this.dstSet ? this.dst : DEFAULT_DST;
+
+
+ return new OFActionBsnSetTunnelDstVer13(
+ dst
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFActionBsnSetTunnelDst> {
+ @Override
+ public OFActionBsnSetTunnelDst readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 65535
+ short type = bb.readShort();
+ if(type != (short) 0xffff)
+ throw new OFParseError("Wrong type: Expected=OFActionType.EXPERIMENTER(65535), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 16)
+ throw new OFParseError("Wrong length: Expected=16(16), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x2L
+ int subtype = bb.readInt();
+ if(subtype != 0x2)
+ throw new OFParseError("Wrong subtype: Expected=0x2L(0x2L), got="+subtype);
+ long dst = U32.f(bb.readInt());
+
+ OFActionBsnSetTunnelDstVer13 actionBsnSetTunnelDstVer13 = new OFActionBsnSetTunnelDstVer13(
+ dst
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", actionBsnSetTunnelDstVer13);
+ return actionBsnSetTunnelDstVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFActionBsnSetTunnelDstVer13Funnel FUNNEL = new OFActionBsnSetTunnelDstVer13Funnel();
+ static class OFActionBsnSetTunnelDstVer13Funnel implements Funnel<OFActionBsnSetTunnelDstVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFActionBsnSetTunnelDstVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 65535
+ sink.putShort((short) 0xffff);
+ // fixed value property length = 16
+ sink.putShort((short) 0x10);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x2L
+ sink.putInt(0x2);
+ sink.putLong(message.dst);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFActionBsnSetTunnelDstVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFActionBsnSetTunnelDstVer13 message) {
+ // fixed value property type = 65535
+ bb.writeShort((short) 0xffff);
+ // fixed value property length = 16
+ bb.writeShort((short) 0x10);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x2L
+ bb.writeInt(0x2);
+ bb.writeInt(U32.t(message.dst));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFActionBsnSetTunnelDstVer13(");
+ b.append("dst=").append(dst);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFActionBsnSetTunnelDstVer13 other = (OFActionBsnSetTunnelDstVer13) obj;
+
+ if( dst != other.dst)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (dst ^ (dst >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionBsnVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionBsnVer13.java
new file mode 100644
index 0000000..02a568d
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionBsnVer13.java
@@ -0,0 +1,71 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_virtual_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.jboss.netty.buffer.ChannelBuffer;
+import java.util.Set;
+
+abstract class OFActionBsnVer13 {
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 16;
+
+
+ public final static OFActionBsnVer13.Reader READER = new Reader();
+
+ static class Reader implements OFMessageReader<OFActionBsn> {
+ @Override
+ public OFActionBsn readFrom(ChannelBuffer bb) throws OFParseError {
+ if(bb.readableBytes() < MINIMUM_LENGTH)
+ return null;
+ int start = bb.readerIndex();
+ // fixed value property type == 65535
+ short type = bb.readShort();
+ if(type != (short) 0xffff)
+ throw new OFParseError("Wrong type: Expected=OFActionType.EXPERIMENTER(65535), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ int subtype = bb.readInt();
+ bb.readerIndex(start);
+ switch(subtype) {
+ case 0x4:
+ // discriminator value 0x4L=0x4L for class OFActionBsnChecksumVer13
+ return OFActionBsnChecksumVer13.READER.readFrom(bb);
+ case 0x1:
+ // discriminator value 0x1L=0x1L for class OFActionBsnMirrorVer13
+ return OFActionBsnMirrorVer13.READER.readFrom(bb);
+ case 0x2:
+ // discriminator value 0x2L=0x2L for class OFActionBsnSetTunnelDstVer13
+ return OFActionBsnSetTunnelDstVer13.READER.readFrom(bb);
+ default:
+ throw new OFParseError("Unknown value for discriminator subtype of class OFActionBsnVer13: " + subtype);
+ }
+ }
+ }
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionCopyTtlInVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionCopyTtlInVer13.java
new file mode 100644
index 0000000..6713acc
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionCopyTtlInVer13.java
@@ -0,0 +1,161 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFActionCopyTtlInVer13 implements OFActionCopyTtlIn {
+ private static final Logger logger = LoggerFactory.getLogger(OFActionCopyTtlInVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFActionCopyTtlInVer13 DEFAULT = new OFActionCopyTtlInVer13(
+
+ );
+
+ final static OFActionCopyTtlInVer13 INSTANCE = new OFActionCopyTtlInVer13();
+ // private empty constructor - use shared instance!
+ private OFActionCopyTtlInVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFActionType getType() {
+ return OFActionType.COPY_TTL_IN;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFActionCopyTtlIn.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFActionCopyTtlInVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFActionCopyTtlIn> {
+ @Override
+ public OFActionCopyTtlIn readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 12
+ short type = bb.readShort();
+ if(type != (short) 0xc)
+ throw new OFParseError("Wrong type: Expected=OFActionType.COPY_TTL_IN(12), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 8)
+ throw new OFParseError("Wrong length: Expected=8(8), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFActionCopyTtlInVer13Funnel FUNNEL = new OFActionCopyTtlInVer13Funnel();
+ static class OFActionCopyTtlInVer13Funnel implements Funnel<OFActionCopyTtlInVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFActionCopyTtlInVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 12
+ sink.putShort((short) 0xc);
+ // fixed value property length = 8
+ sink.putShort((short) 0x8);
+ // skip pad (4 bytes)
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFActionCopyTtlInVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFActionCopyTtlInVer13 message) {
+ // fixed value property type = 12
+ bb.writeShort((short) 0xc);
+ // fixed value property length = 8
+ bb.writeShort((short) 0x8);
+ // pad: 4 bytes
+ bb.writeZero(4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFActionCopyTtlInVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionCopyTtlOutVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionCopyTtlOutVer13.java
new file mode 100644
index 0000000..dd1939f
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionCopyTtlOutVer13.java
@@ -0,0 +1,161 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFActionCopyTtlOutVer13 implements OFActionCopyTtlOut {
+ private static final Logger logger = LoggerFactory.getLogger(OFActionCopyTtlOutVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFActionCopyTtlOutVer13 DEFAULT = new OFActionCopyTtlOutVer13(
+
+ );
+
+ final static OFActionCopyTtlOutVer13 INSTANCE = new OFActionCopyTtlOutVer13();
+ // private empty constructor - use shared instance!
+ private OFActionCopyTtlOutVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFActionType getType() {
+ return OFActionType.COPY_TTL_OUT;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFActionCopyTtlOut.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFActionCopyTtlOutVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFActionCopyTtlOut> {
+ @Override
+ public OFActionCopyTtlOut readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 11
+ short type = bb.readShort();
+ if(type != (short) 0xb)
+ throw new OFParseError("Wrong type: Expected=OFActionType.COPY_TTL_OUT(11), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 8)
+ throw new OFParseError("Wrong length: Expected=8(8), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFActionCopyTtlOutVer13Funnel FUNNEL = new OFActionCopyTtlOutVer13Funnel();
+ static class OFActionCopyTtlOutVer13Funnel implements Funnel<OFActionCopyTtlOutVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFActionCopyTtlOutVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 11
+ sink.putShort((short) 0xb);
+ // fixed value property length = 8
+ sink.putShort((short) 0x8);
+ // skip pad (4 bytes)
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFActionCopyTtlOutVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFActionCopyTtlOutVer13 message) {
+ // fixed value property type = 11
+ bb.writeShort((short) 0xb);
+ // fixed value property length = 8
+ bb.writeShort((short) 0x8);
+ // pad: 4 bytes
+ bb.writeZero(4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFActionCopyTtlOutVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionDecMplsTtlVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionDecMplsTtlVer13.java
new file mode 100644
index 0000000..8538f06
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionDecMplsTtlVer13.java
@@ -0,0 +1,161 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFActionDecMplsTtlVer13 implements OFActionDecMplsTtl {
+ private static final Logger logger = LoggerFactory.getLogger(OFActionDecMplsTtlVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFActionDecMplsTtlVer13 DEFAULT = new OFActionDecMplsTtlVer13(
+
+ );
+
+ final static OFActionDecMplsTtlVer13 INSTANCE = new OFActionDecMplsTtlVer13();
+ // private empty constructor - use shared instance!
+ private OFActionDecMplsTtlVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFActionType getType() {
+ return OFActionType.DEC_MPLS_TTL;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFActionDecMplsTtl.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFActionDecMplsTtlVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFActionDecMplsTtl> {
+ @Override
+ public OFActionDecMplsTtl readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 16
+ short type = bb.readShort();
+ if(type != (short) 0x10)
+ throw new OFParseError("Wrong type: Expected=OFActionType.DEC_MPLS_TTL(16), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 8)
+ throw new OFParseError("Wrong length: Expected=8(8), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFActionDecMplsTtlVer13Funnel FUNNEL = new OFActionDecMplsTtlVer13Funnel();
+ static class OFActionDecMplsTtlVer13Funnel implements Funnel<OFActionDecMplsTtlVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFActionDecMplsTtlVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 16
+ sink.putShort((short) 0x10);
+ // fixed value property length = 8
+ sink.putShort((short) 0x8);
+ // skip pad (4 bytes)
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFActionDecMplsTtlVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFActionDecMplsTtlVer13 message) {
+ // fixed value property type = 16
+ bb.writeShort((short) 0x10);
+ // fixed value property length = 8
+ bb.writeShort((short) 0x8);
+ // pad: 4 bytes
+ bb.writeZero(4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFActionDecMplsTtlVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionDecNwTtlVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionDecNwTtlVer13.java
new file mode 100644
index 0000000..5f4bb3f
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionDecNwTtlVer13.java
@@ -0,0 +1,161 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFActionDecNwTtlVer13 implements OFActionDecNwTtl {
+ private static final Logger logger = LoggerFactory.getLogger(OFActionDecNwTtlVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFActionDecNwTtlVer13 DEFAULT = new OFActionDecNwTtlVer13(
+
+ );
+
+ final static OFActionDecNwTtlVer13 INSTANCE = new OFActionDecNwTtlVer13();
+ // private empty constructor - use shared instance!
+ private OFActionDecNwTtlVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFActionType getType() {
+ return OFActionType.DEC_NW_TTL;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFActionDecNwTtl.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFActionDecNwTtlVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFActionDecNwTtl> {
+ @Override
+ public OFActionDecNwTtl readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 24
+ short type = bb.readShort();
+ if(type != (short) 0x18)
+ throw new OFParseError("Wrong type: Expected=OFActionType.DEC_NW_TTL(24), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 8)
+ throw new OFParseError("Wrong length: Expected=8(8), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFActionDecNwTtlVer13Funnel FUNNEL = new OFActionDecNwTtlVer13Funnel();
+ static class OFActionDecNwTtlVer13Funnel implements Funnel<OFActionDecNwTtlVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFActionDecNwTtlVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 24
+ sink.putShort((short) 0x18);
+ // fixed value property length = 8
+ sink.putShort((short) 0x8);
+ // skip pad (4 bytes)
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFActionDecNwTtlVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFActionDecNwTtlVer13 message) {
+ // fixed value property type = 24
+ bb.writeShort((short) 0x18);
+ // fixed value property length = 8
+ bb.writeShort((short) 0x8);
+ // pad: 4 bytes
+ bb.writeZero(4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFActionDecNwTtlVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionExperimenterVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionExperimenterVer13.java
new file mode 100644
index 0000000..b92de30
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionExperimenterVer13.java
@@ -0,0 +1,63 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_virtual_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.jboss.netty.buffer.ChannelBuffer;
+
+abstract class OFActionExperimenterVer13 {
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 8;
+
+
+ public final static OFActionExperimenterVer13.Reader READER = new Reader();
+
+ static class Reader implements OFMessageReader<OFActionExperimenter> {
+ @Override
+ public OFActionExperimenter readFrom(ChannelBuffer bb) throws OFParseError {
+ if(bb.readableBytes() < MINIMUM_LENGTH)
+ return null;
+ int start = bb.readerIndex();
+ // fixed value property type == 65535
+ short type = bb.readShort();
+ if(type != (short) 0xffff)
+ throw new OFParseError("Wrong type: Expected=OFActionType.EXPERIMENTER(65535), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ int experimenter = bb.readInt();
+ bb.readerIndex(start);
+ switch(experimenter) {
+ case 0x5c16c7:
+ // discriminator value 0x5c16c7L=0x5c16c7L for class OFActionBsnVer13
+ return OFActionBsnVer13.READER.readFrom(bb);
+ case 0x2320:
+ // discriminator value 0x2320L=0x2320L for class OFActionNiciraVer13
+ return OFActionNiciraVer13.READER.readFrom(bb);
+ default:
+ throw new OFParseError("Unknown value for discriminator experimenter of class OFActionExperimenterVer13: " + experimenter);
+ }
+ }
+ }
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionGroupVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionGroupVer13.java
new file mode 100644
index 0000000..0f1f292
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionGroupVer13.java
@@ -0,0 +1,267 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFActionGroupVer13 implements OFActionGroup {
+ private static final Logger logger = LoggerFactory.getLogger(OFActionGroupVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static OFGroup DEFAULT_GROUP_ID = OFGroup.ALL;
+
+ // OF message fields
+ private final OFGroup group;
+//
+ // Immutable default instance
+ final static OFActionGroupVer13 DEFAULT = new OFActionGroupVer13(
+ DEFAULT_GROUP_ID
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFActionGroupVer13(OFGroup group) {
+ this.group = group;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFActionType getType() {
+ return OFActionType.GROUP;
+ }
+
+ @Override
+ public OFGroup getGroup() {
+ return group;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFActionGroup.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFActionGroup.Builder {
+ final OFActionGroupVer13 parentMessage;
+
+ // OF message fields
+ private boolean groupSet;
+ private OFGroup group;
+
+ BuilderWithParent(OFActionGroupVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFActionType getType() {
+ return OFActionType.GROUP;
+ }
+
+ @Override
+ public OFGroup getGroup() {
+ return group;
+ }
+
+ @Override
+ public OFActionGroup.Builder setGroup(OFGroup group) {
+ this.group = group;
+ this.groupSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFActionGroup build() {
+ OFGroup group = this.groupSet ? this.group : parentMessage.group;
+ if(group == null)
+ throw new NullPointerException("Property group must not be null");
+
+ //
+ return new OFActionGroupVer13(
+ group
+ );
+ }
+
+ }
+
+ static class Builder implements OFActionGroup.Builder {
+ // OF message fields
+ private boolean groupSet;
+ private OFGroup group;
+
+ @Override
+ public OFActionType getType() {
+ return OFActionType.GROUP;
+ }
+
+ @Override
+ public OFGroup getGroup() {
+ return group;
+ }
+
+ @Override
+ public OFActionGroup.Builder setGroup(OFGroup group) {
+ this.group = group;
+ this.groupSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFActionGroup build() {
+ OFGroup group = this.groupSet ? this.group : DEFAULT_GROUP_ID;
+ if(group == null)
+ throw new NullPointerException("Property group must not be null");
+
+
+ return new OFActionGroupVer13(
+ group
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFActionGroup> {
+ @Override
+ public OFActionGroup readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 22
+ short type = bb.readShort();
+ if(type != (short) 0x16)
+ throw new OFParseError("Wrong type: Expected=OFActionType.GROUP(22), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 8)
+ throw new OFParseError("Wrong length: Expected=8(8), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ OFGroup group = OFGroup.read4Bytes(bb);
+
+ OFActionGroupVer13 actionGroupVer13 = new OFActionGroupVer13(
+ group
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", actionGroupVer13);
+ return actionGroupVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFActionGroupVer13Funnel FUNNEL = new OFActionGroupVer13Funnel();
+ static class OFActionGroupVer13Funnel implements Funnel<OFActionGroupVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFActionGroupVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 22
+ sink.putShort((short) 0x16);
+ // fixed value property length = 8
+ sink.putShort((short) 0x8);
+ message.group.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFActionGroupVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFActionGroupVer13 message) {
+ // fixed value property type = 22
+ bb.writeShort((short) 0x16);
+ // fixed value property length = 8
+ bb.writeShort((short) 0x8);
+ message.group.write4Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFActionGroupVer13(");
+ b.append("group=").append(group);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFActionGroupVer13 other = (OFActionGroupVer13) obj;
+
+ if (group == null) {
+ if (other.group != null)
+ return false;
+ } else if (!group.equals(other.group))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((group == null) ? 0 : group.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdBsnChecksumVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdBsnChecksumVer13.java
new file mode 100644
index 0000000..58cd114
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdBsnChecksumVer13.java
@@ -0,0 +1,182 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFActionIdBsnChecksumVer13 implements OFActionIdBsnChecksum {
+ private static final Logger logger = LoggerFactory.getLogger(OFActionIdBsnChecksumVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 12;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFActionIdBsnChecksumVer13 DEFAULT = new OFActionIdBsnChecksumVer13(
+
+ );
+
+ final static OFActionIdBsnChecksumVer13 INSTANCE = new OFActionIdBsnChecksumVer13();
+ // private empty constructor - use shared instance!
+ private OFActionIdBsnChecksumVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFActionType getType() {
+ return OFActionType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x4L;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFActionIdBsnChecksum.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFActionIdBsnChecksumVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFActionIdBsnChecksum> {
+ @Override
+ public OFActionIdBsnChecksum readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 65535
+ short type = bb.readShort();
+ if(type != (short) 0xffff)
+ throw new OFParseError("Wrong type: Expected=OFActionType.EXPERIMENTER(65535), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 12)
+ throw new OFParseError("Wrong length: Expected=12(12), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x4L
+ int subtype = bb.readInt();
+ if(subtype != 0x4)
+ throw new OFParseError("Wrong subtype: Expected=0x4L(0x4L), got="+subtype);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFActionIdBsnChecksumVer13Funnel FUNNEL = new OFActionIdBsnChecksumVer13Funnel();
+ static class OFActionIdBsnChecksumVer13Funnel implements Funnel<OFActionIdBsnChecksumVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFActionIdBsnChecksumVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 65535
+ sink.putShort((short) 0xffff);
+ // fixed value property length = 12
+ sink.putShort((short) 0xc);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x4L
+ sink.putInt(0x4);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFActionIdBsnChecksumVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFActionIdBsnChecksumVer13 message) {
+ // fixed value property type = 65535
+ bb.writeShort((short) 0xffff);
+ // fixed value property length = 12
+ bb.writeShort((short) 0xc);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x4L
+ bb.writeInt(0x4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFActionIdBsnChecksumVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdBsnMirrorVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdBsnMirrorVer13.java
new file mode 100644
index 0000000..f518ed8
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdBsnMirrorVer13.java
@@ -0,0 +1,182 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFActionIdBsnMirrorVer13 implements OFActionIdBsnMirror {
+ private static final Logger logger = LoggerFactory.getLogger(OFActionIdBsnMirrorVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 12;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFActionIdBsnMirrorVer13 DEFAULT = new OFActionIdBsnMirrorVer13(
+
+ );
+
+ final static OFActionIdBsnMirrorVer13 INSTANCE = new OFActionIdBsnMirrorVer13();
+ // private empty constructor - use shared instance!
+ private OFActionIdBsnMirrorVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFActionType getType() {
+ return OFActionType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x1L;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFActionIdBsnMirror.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFActionIdBsnMirrorVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFActionIdBsnMirror> {
+ @Override
+ public OFActionIdBsnMirror readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 65535
+ short type = bb.readShort();
+ if(type != (short) 0xffff)
+ throw new OFParseError("Wrong type: Expected=OFActionType.EXPERIMENTER(65535), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 12)
+ throw new OFParseError("Wrong length: Expected=12(12), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x1L
+ int subtype = bb.readInt();
+ if(subtype != 0x1)
+ throw new OFParseError("Wrong subtype: Expected=0x1L(0x1L), got="+subtype);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFActionIdBsnMirrorVer13Funnel FUNNEL = new OFActionIdBsnMirrorVer13Funnel();
+ static class OFActionIdBsnMirrorVer13Funnel implements Funnel<OFActionIdBsnMirrorVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFActionIdBsnMirrorVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 65535
+ sink.putShort((short) 0xffff);
+ // fixed value property length = 12
+ sink.putShort((short) 0xc);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x1L
+ sink.putInt(0x1);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFActionIdBsnMirrorVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFActionIdBsnMirrorVer13 message) {
+ // fixed value property type = 65535
+ bb.writeShort((short) 0xffff);
+ // fixed value property length = 12
+ bb.writeShort((short) 0xc);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x1L
+ bb.writeInt(0x1);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFActionIdBsnMirrorVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdBsnSetTunnelDstVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdBsnSetTunnelDstVer13.java
new file mode 100644
index 0000000..433e6fb
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdBsnSetTunnelDstVer13.java
@@ -0,0 +1,183 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import java.util.Set;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFActionIdBsnSetTunnelDstVer13 implements OFActionIdBsnSetTunnelDst {
+ private static final Logger logger = LoggerFactory.getLogger(OFActionIdBsnSetTunnelDstVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 12;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFActionIdBsnSetTunnelDstVer13 DEFAULT = new OFActionIdBsnSetTunnelDstVer13(
+
+ );
+
+ final static OFActionIdBsnSetTunnelDstVer13 INSTANCE = new OFActionIdBsnSetTunnelDstVer13();
+ // private empty constructor - use shared instance!
+ private OFActionIdBsnSetTunnelDstVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFActionType getType() {
+ return OFActionType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x2L;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFActionIdBsnSetTunnelDst.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFActionIdBsnSetTunnelDstVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFActionIdBsnSetTunnelDst> {
+ @Override
+ public OFActionIdBsnSetTunnelDst readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 65535
+ short type = bb.readShort();
+ if(type != (short) 0xffff)
+ throw new OFParseError("Wrong type: Expected=OFActionType.EXPERIMENTER(65535), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 12)
+ throw new OFParseError("Wrong length: Expected=12(12), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x2L
+ int subtype = bb.readInt();
+ if(subtype != 0x2)
+ throw new OFParseError("Wrong subtype: Expected=0x2L(0x2L), got="+subtype);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFActionIdBsnSetTunnelDstVer13Funnel FUNNEL = new OFActionIdBsnSetTunnelDstVer13Funnel();
+ static class OFActionIdBsnSetTunnelDstVer13Funnel implements Funnel<OFActionIdBsnSetTunnelDstVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFActionIdBsnSetTunnelDstVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 65535
+ sink.putShort((short) 0xffff);
+ // fixed value property length = 12
+ sink.putShort((short) 0xc);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x2L
+ sink.putInt(0x2);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFActionIdBsnSetTunnelDstVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFActionIdBsnSetTunnelDstVer13 message) {
+ // fixed value property type = 65535
+ bb.writeShort((short) 0xffff);
+ // fixed value property length = 12
+ bb.writeShort((short) 0xc);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x2L
+ bb.writeInt(0x2);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFActionIdBsnSetTunnelDstVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdBsnVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdBsnVer13.java
new file mode 100644
index 0000000..24f3819
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdBsnVer13.java
@@ -0,0 +1,71 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_virtual_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.jboss.netty.buffer.ChannelBuffer;
+import java.util.Set;
+
+abstract class OFActionIdBsnVer13 {
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 12;
+
+
+ public final static OFActionIdBsnVer13.Reader READER = new Reader();
+
+ static class Reader implements OFMessageReader<OFActionIdBsn> {
+ @Override
+ public OFActionIdBsn readFrom(ChannelBuffer bb) throws OFParseError {
+ if(bb.readableBytes() < MINIMUM_LENGTH)
+ return null;
+ int start = bb.readerIndex();
+ // fixed value property type == 65535
+ short type = bb.readShort();
+ if(type != (short) 0xffff)
+ throw new OFParseError("Wrong type: Expected=OFActionType.EXPERIMENTER(65535), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ int subtype = bb.readInt();
+ bb.readerIndex(start);
+ switch(subtype) {
+ case 0x4:
+ // discriminator value 0x4L=0x4L for class OFActionIdBsnChecksumVer13
+ return OFActionIdBsnChecksumVer13.READER.readFrom(bb);
+ case 0x1:
+ // discriminator value 0x1L=0x1L for class OFActionIdBsnMirrorVer13
+ return OFActionIdBsnMirrorVer13.READER.readFrom(bb);
+ case 0x2:
+ // discriminator value 0x2L=0x2L for class OFActionIdBsnSetTunnelDstVer13
+ return OFActionIdBsnSetTunnelDstVer13.READER.readFrom(bb);
+ default:
+ throw new OFParseError("Unknown value for discriminator subtype of class OFActionIdBsnVer13: " + subtype);
+ }
+ }
+ }
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdCopyTtlInVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdCopyTtlInVer13.java
new file mode 100644
index 0000000..6a99bcf
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdCopyTtlInVer13.java
@@ -0,0 +1,156 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFActionIdCopyTtlInVer13 implements OFActionIdCopyTtlIn {
+ private static final Logger logger = LoggerFactory.getLogger(OFActionIdCopyTtlInVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 4;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFActionIdCopyTtlInVer13 DEFAULT = new OFActionIdCopyTtlInVer13(
+
+ );
+
+ final static OFActionIdCopyTtlInVer13 INSTANCE = new OFActionIdCopyTtlInVer13();
+ // private empty constructor - use shared instance!
+ private OFActionIdCopyTtlInVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFActionType getType() {
+ return OFActionType.COPY_TTL_IN;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFActionIdCopyTtlIn.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFActionIdCopyTtlInVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFActionIdCopyTtlIn> {
+ @Override
+ public OFActionIdCopyTtlIn readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 12
+ short type = bb.readShort();
+ if(type != (short) 0xc)
+ throw new OFParseError("Wrong type: Expected=OFActionType.COPY_TTL_IN(12), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 4)
+ throw new OFParseError("Wrong length: Expected=4(4), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFActionIdCopyTtlInVer13Funnel FUNNEL = new OFActionIdCopyTtlInVer13Funnel();
+ static class OFActionIdCopyTtlInVer13Funnel implements Funnel<OFActionIdCopyTtlInVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFActionIdCopyTtlInVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 12
+ sink.putShort((short) 0xc);
+ // fixed value property length = 4
+ sink.putShort((short) 0x4);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFActionIdCopyTtlInVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFActionIdCopyTtlInVer13 message) {
+ // fixed value property type = 12
+ bb.writeShort((short) 0xc);
+ // fixed value property length = 4
+ bb.writeShort((short) 0x4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFActionIdCopyTtlInVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdCopyTtlOutVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdCopyTtlOutVer13.java
new file mode 100644
index 0000000..5e3c7b0
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdCopyTtlOutVer13.java
@@ -0,0 +1,156 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFActionIdCopyTtlOutVer13 implements OFActionIdCopyTtlOut {
+ private static final Logger logger = LoggerFactory.getLogger(OFActionIdCopyTtlOutVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 4;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFActionIdCopyTtlOutVer13 DEFAULT = new OFActionIdCopyTtlOutVer13(
+
+ );
+
+ final static OFActionIdCopyTtlOutVer13 INSTANCE = new OFActionIdCopyTtlOutVer13();
+ // private empty constructor - use shared instance!
+ private OFActionIdCopyTtlOutVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFActionType getType() {
+ return OFActionType.COPY_TTL_OUT;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFActionIdCopyTtlOut.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFActionIdCopyTtlOutVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFActionIdCopyTtlOut> {
+ @Override
+ public OFActionIdCopyTtlOut readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 11
+ short type = bb.readShort();
+ if(type != (short) 0xb)
+ throw new OFParseError("Wrong type: Expected=OFActionType.COPY_TTL_OUT(11), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 4)
+ throw new OFParseError("Wrong length: Expected=4(4), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFActionIdCopyTtlOutVer13Funnel FUNNEL = new OFActionIdCopyTtlOutVer13Funnel();
+ static class OFActionIdCopyTtlOutVer13Funnel implements Funnel<OFActionIdCopyTtlOutVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFActionIdCopyTtlOutVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 11
+ sink.putShort((short) 0xb);
+ // fixed value property length = 4
+ sink.putShort((short) 0x4);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFActionIdCopyTtlOutVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFActionIdCopyTtlOutVer13 message) {
+ // fixed value property type = 11
+ bb.writeShort((short) 0xb);
+ // fixed value property length = 4
+ bb.writeShort((short) 0x4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFActionIdCopyTtlOutVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdDecMplsTtlVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdDecMplsTtlVer13.java
new file mode 100644
index 0000000..b74d82f
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdDecMplsTtlVer13.java
@@ -0,0 +1,156 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFActionIdDecMplsTtlVer13 implements OFActionIdDecMplsTtl {
+ private static final Logger logger = LoggerFactory.getLogger(OFActionIdDecMplsTtlVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 4;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFActionIdDecMplsTtlVer13 DEFAULT = new OFActionIdDecMplsTtlVer13(
+
+ );
+
+ final static OFActionIdDecMplsTtlVer13 INSTANCE = new OFActionIdDecMplsTtlVer13();
+ // private empty constructor - use shared instance!
+ private OFActionIdDecMplsTtlVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFActionType getType() {
+ return OFActionType.DEC_MPLS_TTL;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFActionIdDecMplsTtl.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFActionIdDecMplsTtlVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFActionIdDecMplsTtl> {
+ @Override
+ public OFActionIdDecMplsTtl readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 16
+ short type = bb.readShort();
+ if(type != (short) 0x10)
+ throw new OFParseError("Wrong type: Expected=OFActionType.DEC_MPLS_TTL(16), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 4)
+ throw new OFParseError("Wrong length: Expected=4(4), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFActionIdDecMplsTtlVer13Funnel FUNNEL = new OFActionIdDecMplsTtlVer13Funnel();
+ static class OFActionIdDecMplsTtlVer13Funnel implements Funnel<OFActionIdDecMplsTtlVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFActionIdDecMplsTtlVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 16
+ sink.putShort((short) 0x10);
+ // fixed value property length = 4
+ sink.putShort((short) 0x4);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFActionIdDecMplsTtlVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFActionIdDecMplsTtlVer13 message) {
+ // fixed value property type = 16
+ bb.writeShort((short) 0x10);
+ // fixed value property length = 4
+ bb.writeShort((short) 0x4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFActionIdDecMplsTtlVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdDecNwTtlVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdDecNwTtlVer13.java
new file mode 100644
index 0000000..31b13d1
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdDecNwTtlVer13.java
@@ -0,0 +1,156 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFActionIdDecNwTtlVer13 implements OFActionIdDecNwTtl {
+ private static final Logger logger = LoggerFactory.getLogger(OFActionIdDecNwTtlVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 4;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFActionIdDecNwTtlVer13 DEFAULT = new OFActionIdDecNwTtlVer13(
+
+ );
+
+ final static OFActionIdDecNwTtlVer13 INSTANCE = new OFActionIdDecNwTtlVer13();
+ // private empty constructor - use shared instance!
+ private OFActionIdDecNwTtlVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFActionType getType() {
+ return OFActionType.DEC_NW_TTL;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFActionIdDecNwTtl.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFActionIdDecNwTtlVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFActionIdDecNwTtl> {
+ @Override
+ public OFActionIdDecNwTtl readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 24
+ short type = bb.readShort();
+ if(type != (short) 0x18)
+ throw new OFParseError("Wrong type: Expected=OFActionType.DEC_NW_TTL(24), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 4)
+ throw new OFParseError("Wrong length: Expected=4(4), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFActionIdDecNwTtlVer13Funnel FUNNEL = new OFActionIdDecNwTtlVer13Funnel();
+ static class OFActionIdDecNwTtlVer13Funnel implements Funnel<OFActionIdDecNwTtlVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFActionIdDecNwTtlVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 24
+ sink.putShort((short) 0x18);
+ // fixed value property length = 4
+ sink.putShort((short) 0x4);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFActionIdDecNwTtlVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFActionIdDecNwTtlVer13 message) {
+ // fixed value property type = 24
+ bb.writeShort((short) 0x18);
+ // fixed value property length = 4
+ bb.writeShort((short) 0x4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFActionIdDecNwTtlVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdExperimenterVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdExperimenterVer13.java
new file mode 100644
index 0000000..5a82711
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdExperimenterVer13.java
@@ -0,0 +1,63 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_virtual_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.jboss.netty.buffer.ChannelBuffer;
+
+abstract class OFActionIdExperimenterVer13 {
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 8;
+
+
+ public final static OFActionIdExperimenterVer13.Reader READER = new Reader();
+
+ static class Reader implements OFMessageReader<OFActionIdExperimenter> {
+ @Override
+ public OFActionIdExperimenter readFrom(ChannelBuffer bb) throws OFParseError {
+ if(bb.readableBytes() < MINIMUM_LENGTH)
+ return null;
+ int start = bb.readerIndex();
+ // fixed value property type == 65535
+ short type = bb.readShort();
+ if(type != (short) 0xffff)
+ throw new OFParseError("Wrong type: Expected=OFActionType.EXPERIMENTER(65535), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ int experimenter = bb.readInt();
+ bb.readerIndex(start);
+ switch(experimenter) {
+ case 0x5c16c7:
+ // discriminator value 0x5c16c7L=0x5c16c7L for class OFActionIdBsnVer13
+ return OFActionIdBsnVer13.READER.readFrom(bb);
+ case 0x2320:
+ // discriminator value 0x2320L=0x2320L for class OFActionIdNiciraVer13
+ return OFActionIdNiciraVer13.READER.readFrom(bb);
+ default:
+ throw new OFParseError("Unknown value for discriminator experimenter of class OFActionIdExperimenterVer13: " + experimenter);
+ }
+ }
+ }
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdGroupVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdGroupVer13.java
new file mode 100644
index 0000000..b9db55f
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdGroupVer13.java
@@ -0,0 +1,156 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFActionIdGroupVer13 implements OFActionIdGroup {
+ private static final Logger logger = LoggerFactory.getLogger(OFActionIdGroupVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 4;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFActionIdGroupVer13 DEFAULT = new OFActionIdGroupVer13(
+
+ );
+
+ final static OFActionIdGroupVer13 INSTANCE = new OFActionIdGroupVer13();
+ // private empty constructor - use shared instance!
+ private OFActionIdGroupVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFActionType getType() {
+ return OFActionType.GROUP;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFActionIdGroup.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFActionIdGroupVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFActionIdGroup> {
+ @Override
+ public OFActionIdGroup readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 22
+ short type = bb.readShort();
+ if(type != (short) 0x16)
+ throw new OFParseError("Wrong type: Expected=OFActionType.GROUP(22), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 4)
+ throw new OFParseError("Wrong length: Expected=4(4), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFActionIdGroupVer13Funnel FUNNEL = new OFActionIdGroupVer13Funnel();
+ static class OFActionIdGroupVer13Funnel implements Funnel<OFActionIdGroupVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFActionIdGroupVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 22
+ sink.putShort((short) 0x16);
+ // fixed value property length = 4
+ sink.putShort((short) 0x4);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFActionIdGroupVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFActionIdGroupVer13 message) {
+ // fixed value property type = 22
+ bb.writeShort((short) 0x16);
+ // fixed value property length = 4
+ bb.writeShort((short) 0x4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFActionIdGroupVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdNiciraDecTtlVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdNiciraDecTtlVer13.java
new file mode 100644
index 0000000..3bd530b
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdNiciraDecTtlVer13.java
@@ -0,0 +1,182 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFActionIdNiciraDecTtlVer13 implements OFActionIdNiciraDecTtl {
+ private static final Logger logger = LoggerFactory.getLogger(OFActionIdNiciraDecTtlVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 10;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFActionIdNiciraDecTtlVer13 DEFAULT = new OFActionIdNiciraDecTtlVer13(
+
+ );
+
+ final static OFActionIdNiciraDecTtlVer13 INSTANCE = new OFActionIdNiciraDecTtlVer13();
+ // private empty constructor - use shared instance!
+ private OFActionIdNiciraDecTtlVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFActionType getType() {
+ return OFActionType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x2320L;
+ }
+
+ @Override
+ public int getSubtype() {
+ return 0x12;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFActionIdNiciraDecTtl.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFActionIdNiciraDecTtlVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFActionIdNiciraDecTtl> {
+ @Override
+ public OFActionIdNiciraDecTtl readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 65535
+ short type = bb.readShort();
+ if(type != (short) 0xffff)
+ throw new OFParseError("Wrong type: Expected=OFActionType.EXPERIMENTER(65535), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 10)
+ throw new OFParseError("Wrong length: Expected=10(10), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ // fixed value property experimenter == 0x2320L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x2320)
+ throw new OFParseError("Wrong experimenter: Expected=0x2320L(0x2320L), got="+experimenter);
+ // fixed value property subtype == 0x12
+ short subtype = bb.readShort();
+ if(subtype != (short) 0x12)
+ throw new OFParseError("Wrong subtype: Expected=0x12(0x12), got="+subtype);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFActionIdNiciraDecTtlVer13Funnel FUNNEL = new OFActionIdNiciraDecTtlVer13Funnel();
+ static class OFActionIdNiciraDecTtlVer13Funnel implements Funnel<OFActionIdNiciraDecTtlVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFActionIdNiciraDecTtlVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 65535
+ sink.putShort((short) 0xffff);
+ // fixed value property length = 10
+ sink.putShort((short) 0xa);
+ // fixed value property experimenter = 0x2320L
+ sink.putInt(0x2320);
+ // fixed value property subtype = 0x12
+ sink.putShort((short) 0x12);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFActionIdNiciraDecTtlVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFActionIdNiciraDecTtlVer13 message) {
+ // fixed value property type = 65535
+ bb.writeShort((short) 0xffff);
+ // fixed value property length = 10
+ bb.writeShort((short) 0xa);
+ // fixed value property experimenter = 0x2320L
+ bb.writeInt(0x2320);
+ // fixed value property subtype = 0x12
+ bb.writeShort((short) 0x12);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFActionIdNiciraDecTtlVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdNiciraVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdNiciraVer13.java
new file mode 100644
index 0000000..096d41a
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdNiciraVer13.java
@@ -0,0 +1,64 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_virtual_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.jboss.netty.buffer.ChannelBuffer;
+
+abstract class OFActionIdNiciraVer13 {
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 10;
+
+
+ public final static OFActionIdNiciraVer13.Reader READER = new Reader();
+
+ static class Reader implements OFMessageReader<OFActionIdNicira> {
+ @Override
+ public OFActionIdNicira readFrom(ChannelBuffer bb) throws OFParseError {
+ if(bb.readableBytes() < MINIMUM_LENGTH)
+ return null;
+ int start = bb.readerIndex();
+ // fixed value property type == 65535
+ short type = bb.readShort();
+ if(type != (short) 0xffff)
+ throw new OFParseError("Wrong type: Expected=OFActionType.EXPERIMENTER(65535), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ // fixed value property experimenter == 0x2320L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x2320)
+ throw new OFParseError("Wrong experimenter: Expected=0x2320L(0x2320L), got="+experimenter);
+ short subtype = bb.readShort();
+ bb.readerIndex(start);
+ switch(subtype) {
+ case (short) 0x12:
+ // discriminator value 0x12=0x12 for class OFActionIdNiciraDecTtlVer13
+ return OFActionIdNiciraDecTtlVer13.READER.readFrom(bb);
+ default:
+ throw new OFParseError("Unknown value for discriminator subtype of class OFActionIdNiciraVer13: " + subtype);
+ }
+ }
+ }
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdOutputVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdOutputVer13.java
new file mode 100644
index 0000000..2bc085d
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdOutputVer13.java
@@ -0,0 +1,156 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFActionIdOutputVer13 implements OFActionIdOutput {
+ private static final Logger logger = LoggerFactory.getLogger(OFActionIdOutputVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 4;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFActionIdOutputVer13 DEFAULT = new OFActionIdOutputVer13(
+
+ );
+
+ final static OFActionIdOutputVer13 INSTANCE = new OFActionIdOutputVer13();
+ // private empty constructor - use shared instance!
+ private OFActionIdOutputVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFActionType getType() {
+ return OFActionType.OUTPUT;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFActionIdOutput.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFActionIdOutputVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFActionIdOutput> {
+ @Override
+ public OFActionIdOutput readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 0
+ short type = bb.readShort();
+ if(type != (short) 0x0)
+ throw new OFParseError("Wrong type: Expected=OFActionType.OUTPUT(0), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 4)
+ throw new OFParseError("Wrong length: Expected=4(4), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFActionIdOutputVer13Funnel FUNNEL = new OFActionIdOutputVer13Funnel();
+ static class OFActionIdOutputVer13Funnel implements Funnel<OFActionIdOutputVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFActionIdOutputVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 0
+ sink.putShort((short) 0x0);
+ // fixed value property length = 4
+ sink.putShort((short) 0x4);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFActionIdOutputVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFActionIdOutputVer13 message) {
+ // fixed value property type = 0
+ bb.writeShort((short) 0x0);
+ // fixed value property length = 4
+ bb.writeShort((short) 0x4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFActionIdOutputVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdPopMplsVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdPopMplsVer13.java
new file mode 100644
index 0000000..8c4ba21
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdPopMplsVer13.java
@@ -0,0 +1,156 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFActionIdPopMplsVer13 implements OFActionIdPopMpls {
+ private static final Logger logger = LoggerFactory.getLogger(OFActionIdPopMplsVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 4;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFActionIdPopMplsVer13 DEFAULT = new OFActionIdPopMplsVer13(
+
+ );
+
+ final static OFActionIdPopMplsVer13 INSTANCE = new OFActionIdPopMplsVer13();
+ // private empty constructor - use shared instance!
+ private OFActionIdPopMplsVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFActionType getType() {
+ return OFActionType.POP_MPLS;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFActionIdPopMpls.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFActionIdPopMplsVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFActionIdPopMpls> {
+ @Override
+ public OFActionIdPopMpls readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 20
+ short type = bb.readShort();
+ if(type != (short) 0x14)
+ throw new OFParseError("Wrong type: Expected=OFActionType.POP_MPLS(20), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 4)
+ throw new OFParseError("Wrong length: Expected=4(4), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFActionIdPopMplsVer13Funnel FUNNEL = new OFActionIdPopMplsVer13Funnel();
+ static class OFActionIdPopMplsVer13Funnel implements Funnel<OFActionIdPopMplsVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFActionIdPopMplsVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 20
+ sink.putShort((short) 0x14);
+ // fixed value property length = 4
+ sink.putShort((short) 0x4);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFActionIdPopMplsVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFActionIdPopMplsVer13 message) {
+ // fixed value property type = 20
+ bb.writeShort((short) 0x14);
+ // fixed value property length = 4
+ bb.writeShort((short) 0x4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFActionIdPopMplsVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdPopPbbVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdPopPbbVer13.java
new file mode 100644
index 0000000..6abc5f1
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdPopPbbVer13.java
@@ -0,0 +1,156 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFActionIdPopPbbVer13 implements OFActionIdPopPbb {
+ private static final Logger logger = LoggerFactory.getLogger(OFActionIdPopPbbVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 4;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFActionIdPopPbbVer13 DEFAULT = new OFActionIdPopPbbVer13(
+
+ );
+
+ final static OFActionIdPopPbbVer13 INSTANCE = new OFActionIdPopPbbVer13();
+ // private empty constructor - use shared instance!
+ private OFActionIdPopPbbVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFActionType getType() {
+ return OFActionType.POP_PBB;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFActionIdPopPbb.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFActionIdPopPbbVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFActionIdPopPbb> {
+ @Override
+ public OFActionIdPopPbb readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 27
+ short type = bb.readShort();
+ if(type != (short) 0x1b)
+ throw new OFParseError("Wrong type: Expected=OFActionType.POP_PBB(27), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 4)
+ throw new OFParseError("Wrong length: Expected=4(4), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFActionIdPopPbbVer13Funnel FUNNEL = new OFActionIdPopPbbVer13Funnel();
+ static class OFActionIdPopPbbVer13Funnel implements Funnel<OFActionIdPopPbbVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFActionIdPopPbbVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 27
+ sink.putShort((short) 0x1b);
+ // fixed value property length = 4
+ sink.putShort((short) 0x4);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFActionIdPopPbbVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFActionIdPopPbbVer13 message) {
+ // fixed value property type = 27
+ bb.writeShort((short) 0x1b);
+ // fixed value property length = 4
+ bb.writeShort((short) 0x4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFActionIdPopPbbVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdPopVlanVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdPopVlanVer13.java
new file mode 100644
index 0000000..20100bd
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdPopVlanVer13.java
@@ -0,0 +1,156 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFActionIdPopVlanVer13 implements OFActionIdPopVlan {
+ private static final Logger logger = LoggerFactory.getLogger(OFActionIdPopVlanVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 4;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFActionIdPopVlanVer13 DEFAULT = new OFActionIdPopVlanVer13(
+
+ );
+
+ final static OFActionIdPopVlanVer13 INSTANCE = new OFActionIdPopVlanVer13();
+ // private empty constructor - use shared instance!
+ private OFActionIdPopVlanVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFActionType getType() {
+ return OFActionType.POP_VLAN;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFActionIdPopVlan.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFActionIdPopVlanVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFActionIdPopVlan> {
+ @Override
+ public OFActionIdPopVlan readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 18
+ short type = bb.readShort();
+ if(type != (short) 0x12)
+ throw new OFParseError("Wrong type: Expected=OFActionType.POP_VLAN(18), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 4)
+ throw new OFParseError("Wrong length: Expected=4(4), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFActionIdPopVlanVer13Funnel FUNNEL = new OFActionIdPopVlanVer13Funnel();
+ static class OFActionIdPopVlanVer13Funnel implements Funnel<OFActionIdPopVlanVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFActionIdPopVlanVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 18
+ sink.putShort((short) 0x12);
+ // fixed value property length = 4
+ sink.putShort((short) 0x4);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFActionIdPopVlanVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFActionIdPopVlanVer13 message) {
+ // fixed value property type = 18
+ bb.writeShort((short) 0x12);
+ // fixed value property length = 4
+ bb.writeShort((short) 0x4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFActionIdPopVlanVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdPushMplsVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdPushMplsVer13.java
new file mode 100644
index 0000000..b320104
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdPushMplsVer13.java
@@ -0,0 +1,156 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFActionIdPushMplsVer13 implements OFActionIdPushMpls {
+ private static final Logger logger = LoggerFactory.getLogger(OFActionIdPushMplsVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 4;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFActionIdPushMplsVer13 DEFAULT = new OFActionIdPushMplsVer13(
+
+ );
+
+ final static OFActionIdPushMplsVer13 INSTANCE = new OFActionIdPushMplsVer13();
+ // private empty constructor - use shared instance!
+ private OFActionIdPushMplsVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFActionType getType() {
+ return OFActionType.PUSH_MPLS;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFActionIdPushMpls.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFActionIdPushMplsVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFActionIdPushMpls> {
+ @Override
+ public OFActionIdPushMpls readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 19
+ short type = bb.readShort();
+ if(type != (short) 0x13)
+ throw new OFParseError("Wrong type: Expected=OFActionType.PUSH_MPLS(19), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 4)
+ throw new OFParseError("Wrong length: Expected=4(4), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFActionIdPushMplsVer13Funnel FUNNEL = new OFActionIdPushMplsVer13Funnel();
+ static class OFActionIdPushMplsVer13Funnel implements Funnel<OFActionIdPushMplsVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFActionIdPushMplsVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 19
+ sink.putShort((short) 0x13);
+ // fixed value property length = 4
+ sink.putShort((short) 0x4);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFActionIdPushMplsVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFActionIdPushMplsVer13 message) {
+ // fixed value property type = 19
+ bb.writeShort((short) 0x13);
+ // fixed value property length = 4
+ bb.writeShort((short) 0x4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFActionIdPushMplsVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdPushPbbVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdPushPbbVer13.java
new file mode 100644
index 0000000..9a648e5
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdPushPbbVer13.java
@@ -0,0 +1,156 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFActionIdPushPbbVer13 implements OFActionIdPushPbb {
+ private static final Logger logger = LoggerFactory.getLogger(OFActionIdPushPbbVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 4;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFActionIdPushPbbVer13 DEFAULT = new OFActionIdPushPbbVer13(
+
+ );
+
+ final static OFActionIdPushPbbVer13 INSTANCE = new OFActionIdPushPbbVer13();
+ // private empty constructor - use shared instance!
+ private OFActionIdPushPbbVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFActionType getType() {
+ return OFActionType.PUSH_PBB;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFActionIdPushPbb.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFActionIdPushPbbVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFActionIdPushPbb> {
+ @Override
+ public OFActionIdPushPbb readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 26
+ short type = bb.readShort();
+ if(type != (short) 0x1a)
+ throw new OFParseError("Wrong type: Expected=OFActionType.PUSH_PBB(26), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 4)
+ throw new OFParseError("Wrong length: Expected=4(4), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFActionIdPushPbbVer13Funnel FUNNEL = new OFActionIdPushPbbVer13Funnel();
+ static class OFActionIdPushPbbVer13Funnel implements Funnel<OFActionIdPushPbbVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFActionIdPushPbbVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 26
+ sink.putShort((short) 0x1a);
+ // fixed value property length = 4
+ sink.putShort((short) 0x4);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFActionIdPushPbbVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFActionIdPushPbbVer13 message) {
+ // fixed value property type = 26
+ bb.writeShort((short) 0x1a);
+ // fixed value property length = 4
+ bb.writeShort((short) 0x4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFActionIdPushPbbVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdPushVlanVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdPushVlanVer13.java
new file mode 100644
index 0000000..aa27c85
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdPushVlanVer13.java
@@ -0,0 +1,156 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFActionIdPushVlanVer13 implements OFActionIdPushVlan {
+ private static final Logger logger = LoggerFactory.getLogger(OFActionIdPushVlanVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 4;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFActionIdPushVlanVer13 DEFAULT = new OFActionIdPushVlanVer13(
+
+ );
+
+ final static OFActionIdPushVlanVer13 INSTANCE = new OFActionIdPushVlanVer13();
+ // private empty constructor - use shared instance!
+ private OFActionIdPushVlanVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFActionType getType() {
+ return OFActionType.PUSH_VLAN;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFActionIdPushVlan.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFActionIdPushVlanVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFActionIdPushVlan> {
+ @Override
+ public OFActionIdPushVlan readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 17
+ short type = bb.readShort();
+ if(type != (short) 0x11)
+ throw new OFParseError("Wrong type: Expected=OFActionType.PUSH_VLAN(17), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 4)
+ throw new OFParseError("Wrong length: Expected=4(4), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFActionIdPushVlanVer13Funnel FUNNEL = new OFActionIdPushVlanVer13Funnel();
+ static class OFActionIdPushVlanVer13Funnel implements Funnel<OFActionIdPushVlanVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFActionIdPushVlanVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 17
+ sink.putShort((short) 0x11);
+ // fixed value property length = 4
+ sink.putShort((short) 0x4);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFActionIdPushVlanVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFActionIdPushVlanVer13 message) {
+ // fixed value property type = 17
+ bb.writeShort((short) 0x11);
+ // fixed value property length = 4
+ bb.writeShort((short) 0x4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFActionIdPushVlanVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdSetFieldVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdSetFieldVer13.java
new file mode 100644
index 0000000..d5c3c5d
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdSetFieldVer13.java
@@ -0,0 +1,157 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import java.util.Set;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFActionIdSetFieldVer13 implements OFActionIdSetField {
+ private static final Logger logger = LoggerFactory.getLogger(OFActionIdSetFieldVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 4;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFActionIdSetFieldVer13 DEFAULT = new OFActionIdSetFieldVer13(
+
+ );
+
+ final static OFActionIdSetFieldVer13 INSTANCE = new OFActionIdSetFieldVer13();
+ // private empty constructor - use shared instance!
+ private OFActionIdSetFieldVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFActionType getType() {
+ return OFActionType.SET_FIELD;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFActionIdSetField.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFActionIdSetFieldVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFActionIdSetField> {
+ @Override
+ public OFActionIdSetField readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 25
+ short type = bb.readShort();
+ if(type != (short) 0x19)
+ throw new OFParseError("Wrong type: Expected=OFActionType.SET_FIELD(25), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 4)
+ throw new OFParseError("Wrong length: Expected=4(4), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFActionIdSetFieldVer13Funnel FUNNEL = new OFActionIdSetFieldVer13Funnel();
+ static class OFActionIdSetFieldVer13Funnel implements Funnel<OFActionIdSetFieldVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFActionIdSetFieldVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 25
+ sink.putShort((short) 0x19);
+ // fixed value property length = 4
+ sink.putShort((short) 0x4);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFActionIdSetFieldVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFActionIdSetFieldVer13 message) {
+ // fixed value property type = 25
+ bb.writeShort((short) 0x19);
+ // fixed value property length = 4
+ bb.writeShort((short) 0x4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFActionIdSetFieldVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdSetMplsTtlVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdSetMplsTtlVer13.java
new file mode 100644
index 0000000..04f3b85
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdSetMplsTtlVer13.java
@@ -0,0 +1,157 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import java.util.Set;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFActionIdSetMplsTtlVer13 implements OFActionIdSetMplsTtl {
+ private static final Logger logger = LoggerFactory.getLogger(OFActionIdSetMplsTtlVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 4;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFActionIdSetMplsTtlVer13 DEFAULT = new OFActionIdSetMplsTtlVer13(
+
+ );
+
+ final static OFActionIdSetMplsTtlVer13 INSTANCE = new OFActionIdSetMplsTtlVer13();
+ // private empty constructor - use shared instance!
+ private OFActionIdSetMplsTtlVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFActionType getType() {
+ return OFActionType.SET_MPLS_TTL;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFActionIdSetMplsTtl.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFActionIdSetMplsTtlVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFActionIdSetMplsTtl> {
+ @Override
+ public OFActionIdSetMplsTtl readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 15
+ short type = bb.readShort();
+ if(type != (short) 0xf)
+ throw new OFParseError("Wrong type: Expected=OFActionType.SET_MPLS_TTL(15), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 4)
+ throw new OFParseError("Wrong length: Expected=4(4), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFActionIdSetMplsTtlVer13Funnel FUNNEL = new OFActionIdSetMplsTtlVer13Funnel();
+ static class OFActionIdSetMplsTtlVer13Funnel implements Funnel<OFActionIdSetMplsTtlVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFActionIdSetMplsTtlVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 15
+ sink.putShort((short) 0xf);
+ // fixed value property length = 4
+ sink.putShort((short) 0x4);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFActionIdSetMplsTtlVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFActionIdSetMplsTtlVer13 message) {
+ // fixed value property type = 15
+ bb.writeShort((short) 0xf);
+ // fixed value property length = 4
+ bb.writeShort((short) 0x4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFActionIdSetMplsTtlVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdSetNwTtlVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdSetNwTtlVer13.java
new file mode 100644
index 0000000..92b94c5
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdSetNwTtlVer13.java
@@ -0,0 +1,157 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import java.util.Set;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFActionIdSetNwTtlVer13 implements OFActionIdSetNwTtl {
+ private static final Logger logger = LoggerFactory.getLogger(OFActionIdSetNwTtlVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 4;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFActionIdSetNwTtlVer13 DEFAULT = new OFActionIdSetNwTtlVer13(
+
+ );
+
+ final static OFActionIdSetNwTtlVer13 INSTANCE = new OFActionIdSetNwTtlVer13();
+ // private empty constructor - use shared instance!
+ private OFActionIdSetNwTtlVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFActionType getType() {
+ return OFActionType.SET_NW_TTL;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFActionIdSetNwTtl.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFActionIdSetNwTtlVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFActionIdSetNwTtl> {
+ @Override
+ public OFActionIdSetNwTtl readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 23
+ short type = bb.readShort();
+ if(type != (short) 0x17)
+ throw new OFParseError("Wrong type: Expected=OFActionType.SET_NW_TTL(23), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 4)
+ throw new OFParseError("Wrong length: Expected=4(4), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFActionIdSetNwTtlVer13Funnel FUNNEL = new OFActionIdSetNwTtlVer13Funnel();
+ static class OFActionIdSetNwTtlVer13Funnel implements Funnel<OFActionIdSetNwTtlVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFActionIdSetNwTtlVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 23
+ sink.putShort((short) 0x17);
+ // fixed value property length = 4
+ sink.putShort((short) 0x4);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFActionIdSetNwTtlVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFActionIdSetNwTtlVer13 message) {
+ // fixed value property type = 23
+ bb.writeShort((short) 0x17);
+ // fixed value property length = 4
+ bb.writeShort((short) 0x4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFActionIdSetNwTtlVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdSetQueueVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdSetQueueVer13.java
new file mode 100644
index 0000000..a32a4c4
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdSetQueueVer13.java
@@ -0,0 +1,157 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import java.util.Set;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFActionIdSetQueueVer13 implements OFActionIdSetQueue {
+ private static final Logger logger = LoggerFactory.getLogger(OFActionIdSetQueueVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 4;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFActionIdSetQueueVer13 DEFAULT = new OFActionIdSetQueueVer13(
+
+ );
+
+ final static OFActionIdSetQueueVer13 INSTANCE = new OFActionIdSetQueueVer13();
+ // private empty constructor - use shared instance!
+ private OFActionIdSetQueueVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFActionType getType() {
+ return OFActionType.SET_QUEUE;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFActionIdSetQueue.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFActionIdSetQueueVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFActionIdSetQueue> {
+ @Override
+ public OFActionIdSetQueue readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 21
+ short type = bb.readShort();
+ if(type != (short) 0x15)
+ throw new OFParseError("Wrong type: Expected=OFActionType.SET_QUEUE(21), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 4)
+ throw new OFParseError("Wrong length: Expected=4(4), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFActionIdSetQueueVer13Funnel FUNNEL = new OFActionIdSetQueueVer13Funnel();
+ static class OFActionIdSetQueueVer13Funnel implements Funnel<OFActionIdSetQueueVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFActionIdSetQueueVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 21
+ sink.putShort((short) 0x15);
+ // fixed value property length = 4
+ sink.putShort((short) 0x4);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFActionIdSetQueueVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFActionIdSetQueueVer13 message) {
+ // fixed value property type = 21
+ bb.writeShort((short) 0x15);
+ // fixed value property length = 4
+ bb.writeShort((short) 0x4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFActionIdSetQueueVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdVer13.java
new file mode 100644
index 0000000..c7d70ad
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdVer13.java
@@ -0,0 +1,102 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_virtual_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.jboss.netty.buffer.ChannelBuffer;
+import java.util.Set;
+
+abstract class OFActionIdVer13 {
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 4;
+
+
+ public final static OFActionIdVer13.Reader READER = new Reader();
+
+ static class Reader implements OFMessageReader<OFActionId> {
+ @Override
+ public OFActionId readFrom(ChannelBuffer bb) throws OFParseError {
+ if(bb.readableBytes() < MINIMUM_LENGTH)
+ return null;
+ int start = bb.readerIndex();
+ short type = bb.readShort();
+ bb.readerIndex(start);
+ switch(type) {
+ case (short) 0xffff:
+ // discriminator value OFActionType.EXPERIMENTER=65535 for class OFActionIdExperimenterVer13
+ return OFActionIdExperimenterVer13.READER.readFrom(bb);
+ case (short) 0xc:
+ // discriminator value OFActionType.COPY_TTL_IN=12 for class OFActionIdCopyTtlInVer13
+ return OFActionIdCopyTtlInVer13.READER.readFrom(bb);
+ case (short) 0xb:
+ // discriminator value OFActionType.COPY_TTL_OUT=11 for class OFActionIdCopyTtlOutVer13
+ return OFActionIdCopyTtlOutVer13.READER.readFrom(bb);
+ case (short) 0x10:
+ // discriminator value OFActionType.DEC_MPLS_TTL=16 for class OFActionIdDecMplsTtlVer13
+ return OFActionIdDecMplsTtlVer13.READER.readFrom(bb);
+ case (short) 0x18:
+ // discriminator value OFActionType.DEC_NW_TTL=24 for class OFActionIdDecNwTtlVer13
+ return OFActionIdDecNwTtlVer13.READER.readFrom(bb);
+ case (short) 0x16:
+ // discriminator value OFActionType.GROUP=22 for class OFActionIdGroupVer13
+ return OFActionIdGroupVer13.READER.readFrom(bb);
+ case (short) 0x0:
+ // discriminator value OFActionType.OUTPUT=0 for class OFActionIdOutputVer13
+ return OFActionIdOutputVer13.READER.readFrom(bb);
+ case (short) 0x14:
+ // discriminator value OFActionType.POP_MPLS=20 for class OFActionIdPopMplsVer13
+ return OFActionIdPopMplsVer13.READER.readFrom(bb);
+ case (short) 0x1b:
+ // discriminator value OFActionType.POP_PBB=27 for class OFActionIdPopPbbVer13
+ return OFActionIdPopPbbVer13.READER.readFrom(bb);
+ case (short) 0x12:
+ // discriminator value OFActionType.POP_VLAN=18 for class OFActionIdPopVlanVer13
+ return OFActionIdPopVlanVer13.READER.readFrom(bb);
+ case (short) 0x13:
+ // discriminator value OFActionType.PUSH_MPLS=19 for class OFActionIdPushMplsVer13
+ return OFActionIdPushMplsVer13.READER.readFrom(bb);
+ case (short) 0x1a:
+ // discriminator value OFActionType.PUSH_PBB=26 for class OFActionIdPushPbbVer13
+ return OFActionIdPushPbbVer13.READER.readFrom(bb);
+ case (short) 0x11:
+ // discriminator value OFActionType.PUSH_VLAN=17 for class OFActionIdPushVlanVer13
+ return OFActionIdPushVlanVer13.READER.readFrom(bb);
+ case (short) 0x19:
+ // discriminator value OFActionType.SET_FIELD=25 for class OFActionIdSetFieldVer13
+ return OFActionIdSetFieldVer13.READER.readFrom(bb);
+ case (short) 0xf:
+ // discriminator value OFActionType.SET_MPLS_TTL=15 for class OFActionIdSetMplsTtlVer13
+ return OFActionIdSetMplsTtlVer13.READER.readFrom(bb);
+ case (short) 0x17:
+ // discriminator value OFActionType.SET_NW_TTL=23 for class OFActionIdSetNwTtlVer13
+ return OFActionIdSetNwTtlVer13.READER.readFrom(bb);
+ case (short) 0x15:
+ // discriminator value OFActionType.SET_QUEUE=21 for class OFActionIdSetQueueVer13
+ return OFActionIdSetQueueVer13.READER.readFrom(bb);
+ default:
+ throw new OFParseError("Unknown value for discriminator type of class OFActionIdVer13: " + type);
+ }
+ }
+ }
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdsVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdsVer13.java
new file mode 100644
index 0000000..a9dc914
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdsVer13.java
@@ -0,0 +1,123 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_factory_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import java.util.Set;
+
+
+public class OFActionIdsVer13 implements OFActionIds {
+ public final static OFActionIdsVer13 INSTANCE = new OFActionIdsVer13();
+
+
+
+
+ public OFActionIdBsnChecksum bsnChecksum() {
+ return OFActionIdBsnChecksumVer13.INSTANCE;
+ }
+
+ public OFActionIdBsnMirror bsnMirror() {
+ return OFActionIdBsnMirrorVer13.INSTANCE;
+ }
+
+ public OFActionIdBsnSetTunnelDst bsnSetTunnelDst() {
+ return OFActionIdBsnSetTunnelDstVer13.INSTANCE;
+ }
+
+ public OFActionIdCopyTtlIn copyTtlIn() {
+ return OFActionIdCopyTtlInVer13.INSTANCE;
+ }
+
+ public OFActionIdCopyTtlOut copyTtlOut() {
+ return OFActionIdCopyTtlOutVer13.INSTANCE;
+ }
+
+ public OFActionIdDecMplsTtl decMplsTtl() {
+ return OFActionIdDecMplsTtlVer13.INSTANCE;
+ }
+
+ public OFActionIdDecNwTtl decNwTtl() {
+ return OFActionIdDecNwTtlVer13.INSTANCE;
+ }
+
+ public OFActionIdGroup group() {
+ return OFActionIdGroupVer13.INSTANCE;
+ }
+
+ public OFActionIdNiciraDecTtl niciraDecTtl() {
+ return OFActionIdNiciraDecTtlVer13.INSTANCE;
+ }
+
+ public OFActionIdOutput output() {
+ return OFActionIdOutputVer13.INSTANCE;
+ }
+
+ public OFActionIdPopMpls popMpls() {
+ return OFActionIdPopMplsVer13.INSTANCE;
+ }
+
+ public OFActionIdPopPbb popPbb() {
+ return OFActionIdPopPbbVer13.INSTANCE;
+ }
+
+ public OFActionIdPopVlan popVlan() {
+ return OFActionIdPopVlanVer13.INSTANCE;
+ }
+
+ public OFActionIdPushMpls pushMpls() {
+ return OFActionIdPushMplsVer13.INSTANCE;
+ }
+
+ public OFActionIdPushPbb pushPbb() {
+ return OFActionIdPushPbbVer13.INSTANCE;
+ }
+
+ public OFActionIdPushVlan pushVlan() {
+ return OFActionIdPushVlanVer13.INSTANCE;
+ }
+
+ public OFActionIdSetField setField() {
+ return OFActionIdSetFieldVer13.INSTANCE;
+ }
+
+ public OFActionIdSetMplsTtl setMplsTtl() {
+ return OFActionIdSetMplsTtlVer13.INSTANCE;
+ }
+
+ public OFActionIdSetNwTtl setNwTtl() {
+ return OFActionIdSetNwTtlVer13.INSTANCE;
+ }
+
+ public OFActionIdSetQueue setQueue() {
+ return OFActionIdSetQueueVer13.INSTANCE;
+ }
+
+ public OFMessageReader<OFActionId> getReader() {
+ return OFActionIdVer13.READER;
+ }
+
+
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionNiciraDecTtlVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionNiciraDecTtlVer13.java
new file mode 100644
index 0000000..e0b5ff2
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionNiciraDecTtlVer13.java
@@ -0,0 +1,192 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFActionNiciraDecTtlVer13 implements OFActionNiciraDecTtl {
+ private static final Logger logger = LoggerFactory.getLogger(OFActionNiciraDecTtlVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 16;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFActionNiciraDecTtlVer13 DEFAULT = new OFActionNiciraDecTtlVer13(
+
+ );
+
+ final static OFActionNiciraDecTtlVer13 INSTANCE = new OFActionNiciraDecTtlVer13();
+ // private empty constructor - use shared instance!
+ private OFActionNiciraDecTtlVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFActionType getType() {
+ return OFActionType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x2320L;
+ }
+
+ @Override
+ public int getSubtype() {
+ return 0x12;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFActionNiciraDecTtl.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFActionNiciraDecTtlVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFActionNiciraDecTtl> {
+ @Override
+ public OFActionNiciraDecTtl readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 65535
+ short type = bb.readShort();
+ if(type != (short) 0xffff)
+ throw new OFParseError("Wrong type: Expected=OFActionType.EXPERIMENTER(65535), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 16)
+ throw new OFParseError("Wrong length: Expected=16(16), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ // fixed value property experimenter == 0x2320L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x2320)
+ throw new OFParseError("Wrong experimenter: Expected=0x2320L(0x2320L), got="+experimenter);
+ // fixed value property subtype == 0x12
+ short subtype = bb.readShort();
+ if(subtype != (short) 0x12)
+ throw new OFParseError("Wrong subtype: Expected=0x12(0x12), got="+subtype);
+ // pad: 2 bytes
+ bb.skipBytes(2);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFActionNiciraDecTtlVer13Funnel FUNNEL = new OFActionNiciraDecTtlVer13Funnel();
+ static class OFActionNiciraDecTtlVer13Funnel implements Funnel<OFActionNiciraDecTtlVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFActionNiciraDecTtlVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 65535
+ sink.putShort((short) 0xffff);
+ // fixed value property length = 16
+ sink.putShort((short) 0x10);
+ // fixed value property experimenter = 0x2320L
+ sink.putInt(0x2320);
+ // fixed value property subtype = 0x12
+ sink.putShort((short) 0x12);
+ // skip pad (2 bytes)
+ // skip pad (4 bytes)
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFActionNiciraDecTtlVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFActionNiciraDecTtlVer13 message) {
+ // fixed value property type = 65535
+ bb.writeShort((short) 0xffff);
+ // fixed value property length = 16
+ bb.writeShort((short) 0x10);
+ // fixed value property experimenter = 0x2320L
+ bb.writeInt(0x2320);
+ // fixed value property subtype = 0x12
+ bb.writeShort((short) 0x12);
+ // pad: 2 bytes
+ bb.writeZero(2);
+ // pad: 4 bytes
+ bb.writeZero(4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFActionNiciraDecTtlVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionNiciraVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionNiciraVer13.java
new file mode 100644
index 0000000..44adebe
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionNiciraVer13.java
@@ -0,0 +1,64 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_virtual_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.jboss.netty.buffer.ChannelBuffer;
+
+abstract class OFActionNiciraVer13 {
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 16;
+
+
+ public final static OFActionNiciraVer13.Reader READER = new Reader();
+
+ static class Reader implements OFMessageReader<OFActionNicira> {
+ @Override
+ public OFActionNicira readFrom(ChannelBuffer bb) throws OFParseError {
+ if(bb.readableBytes() < MINIMUM_LENGTH)
+ return null;
+ int start = bb.readerIndex();
+ // fixed value property type == 65535
+ short type = bb.readShort();
+ if(type != (short) 0xffff)
+ throw new OFParseError("Wrong type: Expected=OFActionType.EXPERIMENTER(65535), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ // fixed value property experimenter == 0x2320L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x2320)
+ throw new OFParseError("Wrong experimenter: Expected=0x2320L(0x2320L), got="+experimenter);
+ short subtype = bb.readShort();
+ bb.readerIndex(start);
+ switch(subtype) {
+ case (short) 0x12:
+ // discriminator value 0x12=0x12 for class OFActionNiciraDecTtlVer13
+ return OFActionNiciraDecTtlVer13.READER.readFrom(bb);
+ default:
+ throw new OFParseError("Unknown value for discriminator subtype of class OFActionNiciraVer13: " + subtype);
+ }
+ }
+ }
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionOutputVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionOutputVer13.java
new file mode 100644
index 0000000..6e43bbd
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionOutputVer13.java
@@ -0,0 +1,319 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFActionOutputVer13 implements OFActionOutput {
+ private static final Logger logger = LoggerFactory.getLogger(OFActionOutputVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 16;
+
+ private final static OFPort DEFAULT_PORT = OFPort.ANY;
+ private final static int DEFAULT_MAX_LEN = 0x0;
+
+ // OF message fields
+ private final OFPort port;
+ private final int maxLen;
+//
+ // Immutable default instance
+ final static OFActionOutputVer13 DEFAULT = new OFActionOutputVer13(
+ DEFAULT_PORT, DEFAULT_MAX_LEN
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFActionOutputVer13(OFPort port, int maxLen) {
+ this.port = port;
+ this.maxLen = maxLen;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFActionType getType() {
+ return OFActionType.OUTPUT;
+ }
+
+ @Override
+ public OFPort getPort() {
+ return port;
+ }
+
+ @Override
+ public int getMaxLen() {
+ return maxLen;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFActionOutput.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFActionOutput.Builder {
+ final OFActionOutputVer13 parentMessage;
+
+ // OF message fields
+ private boolean portSet;
+ private OFPort port;
+ private boolean maxLenSet;
+ private int maxLen;
+
+ BuilderWithParent(OFActionOutputVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFActionType getType() {
+ return OFActionType.OUTPUT;
+ }
+
+ @Override
+ public OFPort getPort() {
+ return port;
+ }
+
+ @Override
+ public OFActionOutput.Builder setPort(OFPort port) {
+ this.port = port;
+ this.portSet = true;
+ return this;
+ }
+ @Override
+ public int getMaxLen() {
+ return maxLen;
+ }
+
+ @Override
+ public OFActionOutput.Builder setMaxLen(int maxLen) {
+ this.maxLen = maxLen;
+ this.maxLenSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFActionOutput build() {
+ OFPort port = this.portSet ? this.port : parentMessage.port;
+ if(port == null)
+ throw new NullPointerException("Property port must not be null");
+ int maxLen = this.maxLenSet ? this.maxLen : parentMessage.maxLen;
+
+ //
+ return new OFActionOutputVer13(
+ port,
+ maxLen
+ );
+ }
+
+ }
+
+ static class Builder implements OFActionOutput.Builder {
+ // OF message fields
+ private boolean portSet;
+ private OFPort port;
+ private boolean maxLenSet;
+ private int maxLen;
+
+ @Override
+ public OFActionType getType() {
+ return OFActionType.OUTPUT;
+ }
+
+ @Override
+ public OFPort getPort() {
+ return port;
+ }
+
+ @Override
+ public OFActionOutput.Builder setPort(OFPort port) {
+ this.port = port;
+ this.portSet = true;
+ return this;
+ }
+ @Override
+ public int getMaxLen() {
+ return maxLen;
+ }
+
+ @Override
+ public OFActionOutput.Builder setMaxLen(int maxLen) {
+ this.maxLen = maxLen;
+ this.maxLenSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFActionOutput build() {
+ OFPort port = this.portSet ? this.port : DEFAULT_PORT;
+ if(port == null)
+ throw new NullPointerException("Property port must not be null");
+ int maxLen = this.maxLenSet ? this.maxLen : DEFAULT_MAX_LEN;
+
+
+ return new OFActionOutputVer13(
+ port,
+ maxLen
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFActionOutput> {
+ @Override
+ public OFActionOutput readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 0
+ short type = bb.readShort();
+ if(type != (short) 0x0)
+ throw new OFParseError("Wrong type: Expected=OFActionType.OUTPUT(0), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 16)
+ throw new OFParseError("Wrong length: Expected=16(16), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ OFPort port = OFPort.read4Bytes(bb);
+ int maxLen = U16.f(bb.readShort());
+ // pad: 6 bytes
+ bb.skipBytes(6);
+
+ OFActionOutputVer13 actionOutputVer13 = new OFActionOutputVer13(
+ port,
+ maxLen
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", actionOutputVer13);
+ return actionOutputVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFActionOutputVer13Funnel FUNNEL = new OFActionOutputVer13Funnel();
+ static class OFActionOutputVer13Funnel implements Funnel<OFActionOutputVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFActionOutputVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 0
+ sink.putShort((short) 0x0);
+ // fixed value property length = 16
+ sink.putShort((short) 0x10);
+ message.port.putTo(sink);
+ sink.putInt(message.maxLen);
+ // skip pad (6 bytes)
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFActionOutputVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFActionOutputVer13 message) {
+ // fixed value property type = 0
+ bb.writeShort((short) 0x0);
+ // fixed value property length = 16
+ bb.writeShort((short) 0x10);
+ message.port.write4Bytes(bb);
+ bb.writeShort(U16.t(message.maxLen));
+ // pad: 6 bytes
+ bb.writeZero(6);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFActionOutputVer13(");
+ b.append("port=").append(port);
+ b.append(", ");
+ b.append("maxLen=").append(maxLen);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFActionOutputVer13 other = (OFActionOutputVer13) obj;
+
+ if (port == null) {
+ if (other.port != null)
+ return false;
+ } else if (!port.equals(other.port))
+ return false;
+ if( maxLen != other.maxLen)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((port == null) ? 0 : port.hashCode());
+ result = prime * result + maxLen;
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionPopMplsVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionPopMplsVer13.java
new file mode 100644
index 0000000..dd218f9
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionPopMplsVer13.java
@@ -0,0 +1,272 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFActionPopMplsVer13 implements OFActionPopMpls {
+ private static final Logger logger = LoggerFactory.getLogger(OFActionPopMplsVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static EthType DEFAULT_ETHERTYPE = EthType.NONE;
+
+ // OF message fields
+ private final EthType ethertype;
+//
+ // Immutable default instance
+ final static OFActionPopMplsVer13 DEFAULT = new OFActionPopMplsVer13(
+ DEFAULT_ETHERTYPE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFActionPopMplsVer13(EthType ethertype) {
+ this.ethertype = ethertype;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFActionType getType() {
+ return OFActionType.POP_MPLS;
+ }
+
+ @Override
+ public EthType getEthertype() {
+ return ethertype;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFActionPopMpls.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFActionPopMpls.Builder {
+ final OFActionPopMplsVer13 parentMessage;
+
+ // OF message fields
+ private boolean ethertypeSet;
+ private EthType ethertype;
+
+ BuilderWithParent(OFActionPopMplsVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFActionType getType() {
+ return OFActionType.POP_MPLS;
+ }
+
+ @Override
+ public EthType getEthertype() {
+ return ethertype;
+ }
+
+ @Override
+ public OFActionPopMpls.Builder setEthertype(EthType ethertype) {
+ this.ethertype = ethertype;
+ this.ethertypeSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFActionPopMpls build() {
+ EthType ethertype = this.ethertypeSet ? this.ethertype : parentMessage.ethertype;
+ if(ethertype == null)
+ throw new NullPointerException("Property ethertype must not be null");
+
+ //
+ return new OFActionPopMplsVer13(
+ ethertype
+ );
+ }
+
+ }
+
+ static class Builder implements OFActionPopMpls.Builder {
+ // OF message fields
+ private boolean ethertypeSet;
+ private EthType ethertype;
+
+ @Override
+ public OFActionType getType() {
+ return OFActionType.POP_MPLS;
+ }
+
+ @Override
+ public EthType getEthertype() {
+ return ethertype;
+ }
+
+ @Override
+ public OFActionPopMpls.Builder setEthertype(EthType ethertype) {
+ this.ethertype = ethertype;
+ this.ethertypeSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFActionPopMpls build() {
+ EthType ethertype = this.ethertypeSet ? this.ethertype : DEFAULT_ETHERTYPE;
+ if(ethertype == null)
+ throw new NullPointerException("Property ethertype must not be null");
+
+
+ return new OFActionPopMplsVer13(
+ ethertype
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFActionPopMpls> {
+ @Override
+ public OFActionPopMpls readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 20
+ short type = bb.readShort();
+ if(type != (short) 0x14)
+ throw new OFParseError("Wrong type: Expected=OFActionType.POP_MPLS(20), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 8)
+ throw new OFParseError("Wrong length: Expected=8(8), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ EthType ethertype = EthType.read2Bytes(bb);
+ // pad: 2 bytes
+ bb.skipBytes(2);
+
+ OFActionPopMplsVer13 actionPopMplsVer13 = new OFActionPopMplsVer13(
+ ethertype
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", actionPopMplsVer13);
+ return actionPopMplsVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFActionPopMplsVer13Funnel FUNNEL = new OFActionPopMplsVer13Funnel();
+ static class OFActionPopMplsVer13Funnel implements Funnel<OFActionPopMplsVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFActionPopMplsVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 20
+ sink.putShort((short) 0x14);
+ // fixed value property length = 8
+ sink.putShort((short) 0x8);
+ message.ethertype.putTo(sink);
+ // skip pad (2 bytes)
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFActionPopMplsVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFActionPopMplsVer13 message) {
+ // fixed value property type = 20
+ bb.writeShort((short) 0x14);
+ // fixed value property length = 8
+ bb.writeShort((short) 0x8);
+ message.ethertype.write2Bytes(bb);
+ // pad: 2 bytes
+ bb.writeZero(2);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFActionPopMplsVer13(");
+ b.append("ethertype=").append(ethertype);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFActionPopMplsVer13 other = (OFActionPopMplsVer13) obj;
+
+ if (ethertype == null) {
+ if (other.ethertype != null)
+ return false;
+ } else if (!ethertype.equals(other.ethertype))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((ethertype == null) ? 0 : ethertype.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionPopPbbVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionPopPbbVer13.java
new file mode 100644
index 0000000..79a18fe
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionPopPbbVer13.java
@@ -0,0 +1,161 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFActionPopPbbVer13 implements OFActionPopPbb {
+ private static final Logger logger = LoggerFactory.getLogger(OFActionPopPbbVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFActionPopPbbVer13 DEFAULT = new OFActionPopPbbVer13(
+
+ );
+
+ final static OFActionPopPbbVer13 INSTANCE = new OFActionPopPbbVer13();
+ // private empty constructor - use shared instance!
+ private OFActionPopPbbVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFActionType getType() {
+ return OFActionType.POP_PBB;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFActionPopPbb.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFActionPopPbbVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFActionPopPbb> {
+ @Override
+ public OFActionPopPbb readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 27
+ short type = bb.readShort();
+ if(type != (short) 0x1b)
+ throw new OFParseError("Wrong type: Expected=OFActionType.POP_PBB(27), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 8)
+ throw new OFParseError("Wrong length: Expected=8(8), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFActionPopPbbVer13Funnel FUNNEL = new OFActionPopPbbVer13Funnel();
+ static class OFActionPopPbbVer13Funnel implements Funnel<OFActionPopPbbVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFActionPopPbbVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 27
+ sink.putShort((short) 0x1b);
+ // fixed value property length = 8
+ sink.putShort((short) 0x8);
+ // skip pad (4 bytes)
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFActionPopPbbVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFActionPopPbbVer13 message) {
+ // fixed value property type = 27
+ bb.writeShort((short) 0x1b);
+ // fixed value property length = 8
+ bb.writeShort((short) 0x8);
+ // pad: 4 bytes
+ bb.writeZero(4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFActionPopPbbVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionPopVlanVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionPopVlanVer13.java
new file mode 100644
index 0000000..60c1da5
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionPopVlanVer13.java
@@ -0,0 +1,161 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFActionPopVlanVer13 implements OFActionPopVlan {
+ private static final Logger logger = LoggerFactory.getLogger(OFActionPopVlanVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFActionPopVlanVer13 DEFAULT = new OFActionPopVlanVer13(
+
+ );
+
+ final static OFActionPopVlanVer13 INSTANCE = new OFActionPopVlanVer13();
+ // private empty constructor - use shared instance!
+ private OFActionPopVlanVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFActionType getType() {
+ return OFActionType.POP_VLAN;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFActionPopVlan.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFActionPopVlanVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFActionPopVlan> {
+ @Override
+ public OFActionPopVlan readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 18
+ short type = bb.readShort();
+ if(type != (short) 0x12)
+ throw new OFParseError("Wrong type: Expected=OFActionType.POP_VLAN(18), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 8)
+ throw new OFParseError("Wrong length: Expected=8(8), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFActionPopVlanVer13Funnel FUNNEL = new OFActionPopVlanVer13Funnel();
+ static class OFActionPopVlanVer13Funnel implements Funnel<OFActionPopVlanVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFActionPopVlanVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 18
+ sink.putShort((short) 0x12);
+ // fixed value property length = 8
+ sink.putShort((short) 0x8);
+ // skip pad (4 bytes)
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFActionPopVlanVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFActionPopVlanVer13 message) {
+ // fixed value property type = 18
+ bb.writeShort((short) 0x12);
+ // fixed value property length = 8
+ bb.writeShort((short) 0x8);
+ // pad: 4 bytes
+ bb.writeZero(4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFActionPopVlanVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionPushMplsVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionPushMplsVer13.java
new file mode 100644
index 0000000..7059fe1
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionPushMplsVer13.java
@@ -0,0 +1,272 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFActionPushMplsVer13 implements OFActionPushMpls {
+ private static final Logger logger = LoggerFactory.getLogger(OFActionPushMplsVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static EthType DEFAULT_ETHERTYPE = EthType.NONE;
+
+ // OF message fields
+ private final EthType ethertype;
+//
+ // Immutable default instance
+ final static OFActionPushMplsVer13 DEFAULT = new OFActionPushMplsVer13(
+ DEFAULT_ETHERTYPE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFActionPushMplsVer13(EthType ethertype) {
+ this.ethertype = ethertype;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFActionType getType() {
+ return OFActionType.PUSH_MPLS;
+ }
+
+ @Override
+ public EthType getEthertype() {
+ return ethertype;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFActionPushMpls.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFActionPushMpls.Builder {
+ final OFActionPushMplsVer13 parentMessage;
+
+ // OF message fields
+ private boolean ethertypeSet;
+ private EthType ethertype;
+
+ BuilderWithParent(OFActionPushMplsVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFActionType getType() {
+ return OFActionType.PUSH_MPLS;
+ }
+
+ @Override
+ public EthType getEthertype() {
+ return ethertype;
+ }
+
+ @Override
+ public OFActionPushMpls.Builder setEthertype(EthType ethertype) {
+ this.ethertype = ethertype;
+ this.ethertypeSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFActionPushMpls build() {
+ EthType ethertype = this.ethertypeSet ? this.ethertype : parentMessage.ethertype;
+ if(ethertype == null)
+ throw new NullPointerException("Property ethertype must not be null");
+
+ //
+ return new OFActionPushMplsVer13(
+ ethertype
+ );
+ }
+
+ }
+
+ static class Builder implements OFActionPushMpls.Builder {
+ // OF message fields
+ private boolean ethertypeSet;
+ private EthType ethertype;
+
+ @Override
+ public OFActionType getType() {
+ return OFActionType.PUSH_MPLS;
+ }
+
+ @Override
+ public EthType getEthertype() {
+ return ethertype;
+ }
+
+ @Override
+ public OFActionPushMpls.Builder setEthertype(EthType ethertype) {
+ this.ethertype = ethertype;
+ this.ethertypeSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFActionPushMpls build() {
+ EthType ethertype = this.ethertypeSet ? this.ethertype : DEFAULT_ETHERTYPE;
+ if(ethertype == null)
+ throw new NullPointerException("Property ethertype must not be null");
+
+
+ return new OFActionPushMplsVer13(
+ ethertype
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFActionPushMpls> {
+ @Override
+ public OFActionPushMpls readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 19
+ short type = bb.readShort();
+ if(type != (short) 0x13)
+ throw new OFParseError("Wrong type: Expected=OFActionType.PUSH_MPLS(19), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 8)
+ throw new OFParseError("Wrong length: Expected=8(8), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ EthType ethertype = EthType.read2Bytes(bb);
+ // pad: 2 bytes
+ bb.skipBytes(2);
+
+ OFActionPushMplsVer13 actionPushMplsVer13 = new OFActionPushMplsVer13(
+ ethertype
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", actionPushMplsVer13);
+ return actionPushMplsVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFActionPushMplsVer13Funnel FUNNEL = new OFActionPushMplsVer13Funnel();
+ static class OFActionPushMplsVer13Funnel implements Funnel<OFActionPushMplsVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFActionPushMplsVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 19
+ sink.putShort((short) 0x13);
+ // fixed value property length = 8
+ sink.putShort((short) 0x8);
+ message.ethertype.putTo(sink);
+ // skip pad (2 bytes)
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFActionPushMplsVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFActionPushMplsVer13 message) {
+ // fixed value property type = 19
+ bb.writeShort((short) 0x13);
+ // fixed value property length = 8
+ bb.writeShort((short) 0x8);
+ message.ethertype.write2Bytes(bb);
+ // pad: 2 bytes
+ bb.writeZero(2);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFActionPushMplsVer13(");
+ b.append("ethertype=").append(ethertype);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFActionPushMplsVer13 other = (OFActionPushMplsVer13) obj;
+
+ if (ethertype == null) {
+ if (other.ethertype != null)
+ return false;
+ } else if (!ethertype.equals(other.ethertype))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((ethertype == null) ? 0 : ethertype.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionPushPbbVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionPushPbbVer13.java
new file mode 100644
index 0000000..7e28c10
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionPushPbbVer13.java
@@ -0,0 +1,272 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFActionPushPbbVer13 implements OFActionPushPbb {
+ private static final Logger logger = LoggerFactory.getLogger(OFActionPushPbbVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static EthType DEFAULT_ETHERTYPE = EthType.NONE;
+
+ // OF message fields
+ private final EthType ethertype;
+//
+ // Immutable default instance
+ final static OFActionPushPbbVer13 DEFAULT = new OFActionPushPbbVer13(
+ DEFAULT_ETHERTYPE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFActionPushPbbVer13(EthType ethertype) {
+ this.ethertype = ethertype;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFActionType getType() {
+ return OFActionType.PUSH_PBB;
+ }
+
+ @Override
+ public EthType getEthertype() {
+ return ethertype;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFActionPushPbb.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFActionPushPbb.Builder {
+ final OFActionPushPbbVer13 parentMessage;
+
+ // OF message fields
+ private boolean ethertypeSet;
+ private EthType ethertype;
+
+ BuilderWithParent(OFActionPushPbbVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFActionType getType() {
+ return OFActionType.PUSH_PBB;
+ }
+
+ @Override
+ public EthType getEthertype() {
+ return ethertype;
+ }
+
+ @Override
+ public OFActionPushPbb.Builder setEthertype(EthType ethertype) {
+ this.ethertype = ethertype;
+ this.ethertypeSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFActionPushPbb build() {
+ EthType ethertype = this.ethertypeSet ? this.ethertype : parentMessage.ethertype;
+ if(ethertype == null)
+ throw new NullPointerException("Property ethertype must not be null");
+
+ //
+ return new OFActionPushPbbVer13(
+ ethertype
+ );
+ }
+
+ }
+
+ static class Builder implements OFActionPushPbb.Builder {
+ // OF message fields
+ private boolean ethertypeSet;
+ private EthType ethertype;
+
+ @Override
+ public OFActionType getType() {
+ return OFActionType.PUSH_PBB;
+ }
+
+ @Override
+ public EthType getEthertype() {
+ return ethertype;
+ }
+
+ @Override
+ public OFActionPushPbb.Builder setEthertype(EthType ethertype) {
+ this.ethertype = ethertype;
+ this.ethertypeSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFActionPushPbb build() {
+ EthType ethertype = this.ethertypeSet ? this.ethertype : DEFAULT_ETHERTYPE;
+ if(ethertype == null)
+ throw new NullPointerException("Property ethertype must not be null");
+
+
+ return new OFActionPushPbbVer13(
+ ethertype
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFActionPushPbb> {
+ @Override
+ public OFActionPushPbb readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 26
+ short type = bb.readShort();
+ if(type != (short) 0x1a)
+ throw new OFParseError("Wrong type: Expected=OFActionType.PUSH_PBB(26), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 8)
+ throw new OFParseError("Wrong length: Expected=8(8), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ EthType ethertype = EthType.read2Bytes(bb);
+ // pad: 2 bytes
+ bb.skipBytes(2);
+
+ OFActionPushPbbVer13 actionPushPbbVer13 = new OFActionPushPbbVer13(
+ ethertype
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", actionPushPbbVer13);
+ return actionPushPbbVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFActionPushPbbVer13Funnel FUNNEL = new OFActionPushPbbVer13Funnel();
+ static class OFActionPushPbbVer13Funnel implements Funnel<OFActionPushPbbVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFActionPushPbbVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 26
+ sink.putShort((short) 0x1a);
+ // fixed value property length = 8
+ sink.putShort((short) 0x8);
+ message.ethertype.putTo(sink);
+ // skip pad (2 bytes)
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFActionPushPbbVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFActionPushPbbVer13 message) {
+ // fixed value property type = 26
+ bb.writeShort((short) 0x1a);
+ // fixed value property length = 8
+ bb.writeShort((short) 0x8);
+ message.ethertype.write2Bytes(bb);
+ // pad: 2 bytes
+ bb.writeZero(2);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFActionPushPbbVer13(");
+ b.append("ethertype=").append(ethertype);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFActionPushPbbVer13 other = (OFActionPushPbbVer13) obj;
+
+ if (ethertype == null) {
+ if (other.ethertype != null)
+ return false;
+ } else if (!ethertype.equals(other.ethertype))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((ethertype == null) ? 0 : ethertype.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionPushVlanVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionPushVlanVer13.java
new file mode 100644
index 0000000..b71a948
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionPushVlanVer13.java
@@ -0,0 +1,272 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFActionPushVlanVer13 implements OFActionPushVlan {
+ private static final Logger logger = LoggerFactory.getLogger(OFActionPushVlanVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static EthType DEFAULT_ETHERTYPE = EthType.NONE;
+
+ // OF message fields
+ private final EthType ethertype;
+//
+ // Immutable default instance
+ final static OFActionPushVlanVer13 DEFAULT = new OFActionPushVlanVer13(
+ DEFAULT_ETHERTYPE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFActionPushVlanVer13(EthType ethertype) {
+ this.ethertype = ethertype;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFActionType getType() {
+ return OFActionType.PUSH_VLAN;
+ }
+
+ @Override
+ public EthType getEthertype() {
+ return ethertype;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFActionPushVlan.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFActionPushVlan.Builder {
+ final OFActionPushVlanVer13 parentMessage;
+
+ // OF message fields
+ private boolean ethertypeSet;
+ private EthType ethertype;
+
+ BuilderWithParent(OFActionPushVlanVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFActionType getType() {
+ return OFActionType.PUSH_VLAN;
+ }
+
+ @Override
+ public EthType getEthertype() {
+ return ethertype;
+ }
+
+ @Override
+ public OFActionPushVlan.Builder setEthertype(EthType ethertype) {
+ this.ethertype = ethertype;
+ this.ethertypeSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFActionPushVlan build() {
+ EthType ethertype = this.ethertypeSet ? this.ethertype : parentMessage.ethertype;
+ if(ethertype == null)
+ throw new NullPointerException("Property ethertype must not be null");
+
+ //
+ return new OFActionPushVlanVer13(
+ ethertype
+ );
+ }
+
+ }
+
+ static class Builder implements OFActionPushVlan.Builder {
+ // OF message fields
+ private boolean ethertypeSet;
+ private EthType ethertype;
+
+ @Override
+ public OFActionType getType() {
+ return OFActionType.PUSH_VLAN;
+ }
+
+ @Override
+ public EthType getEthertype() {
+ return ethertype;
+ }
+
+ @Override
+ public OFActionPushVlan.Builder setEthertype(EthType ethertype) {
+ this.ethertype = ethertype;
+ this.ethertypeSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFActionPushVlan build() {
+ EthType ethertype = this.ethertypeSet ? this.ethertype : DEFAULT_ETHERTYPE;
+ if(ethertype == null)
+ throw new NullPointerException("Property ethertype must not be null");
+
+
+ return new OFActionPushVlanVer13(
+ ethertype
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFActionPushVlan> {
+ @Override
+ public OFActionPushVlan readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 17
+ short type = bb.readShort();
+ if(type != (short) 0x11)
+ throw new OFParseError("Wrong type: Expected=OFActionType.PUSH_VLAN(17), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 8)
+ throw new OFParseError("Wrong length: Expected=8(8), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ EthType ethertype = EthType.read2Bytes(bb);
+ // pad: 2 bytes
+ bb.skipBytes(2);
+
+ OFActionPushVlanVer13 actionPushVlanVer13 = new OFActionPushVlanVer13(
+ ethertype
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", actionPushVlanVer13);
+ return actionPushVlanVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFActionPushVlanVer13Funnel FUNNEL = new OFActionPushVlanVer13Funnel();
+ static class OFActionPushVlanVer13Funnel implements Funnel<OFActionPushVlanVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFActionPushVlanVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 17
+ sink.putShort((short) 0x11);
+ // fixed value property length = 8
+ sink.putShort((short) 0x8);
+ message.ethertype.putTo(sink);
+ // skip pad (2 bytes)
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFActionPushVlanVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFActionPushVlanVer13 message) {
+ // fixed value property type = 17
+ bb.writeShort((short) 0x11);
+ // fixed value property length = 8
+ bb.writeShort((short) 0x8);
+ message.ethertype.write2Bytes(bb);
+ // pad: 2 bytes
+ bb.writeZero(2);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFActionPushVlanVer13(");
+ b.append("ethertype=").append(ethertype);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFActionPushVlanVer13 other = (OFActionPushVlanVer13) obj;
+
+ if (ethertype == null) {
+ if (other.ethertype != null)
+ return false;
+ } else if (!ethertype.equals(other.ethertype))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((ethertype == null) ? 0 : ethertype.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionSetFieldVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionSetFieldVer13.java
new file mode 100644
index 0000000..a2ff506
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionSetFieldVer13.java
@@ -0,0 +1,273 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import java.util.Set;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFActionSetFieldVer13 implements OFActionSetField {
+ private static final Logger logger = LoggerFactory.getLogger(OFActionSetFieldVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 8;
+
+
+ // OF message fields
+ private final OFOxm<?> field;
+//
+
+ // package private constructor - used by readers, builders, and factory
+ OFActionSetFieldVer13(OFOxm<?> field) {
+ this.field = field;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFActionType getType() {
+ return OFActionType.SET_FIELD;
+ }
+
+ @Override
+ public OFOxm<?> getField() {
+ return field;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFActionSetField.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFActionSetField.Builder {
+ final OFActionSetFieldVer13 parentMessage;
+
+ // OF message fields
+ private boolean fieldSet;
+ private OFOxm<?> field;
+
+ BuilderWithParent(OFActionSetFieldVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFActionType getType() {
+ return OFActionType.SET_FIELD;
+ }
+
+ @Override
+ public OFOxm<?> getField() {
+ return field;
+ }
+
+ @Override
+ public OFActionSetField.Builder setField(OFOxm<?> field) {
+ this.field = field;
+ this.fieldSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFActionSetField build() {
+ OFOxm<?> field = this.fieldSet ? this.field : parentMessage.field;
+ if(field == null)
+ throw new NullPointerException("Property field must not be null");
+
+ //
+ return new OFActionSetFieldVer13(
+ field
+ );
+ }
+
+ }
+
+ static class Builder implements OFActionSetField.Builder {
+ // OF message fields
+ private boolean fieldSet;
+ private OFOxm<?> field;
+
+ @Override
+ public OFActionType getType() {
+ return OFActionType.SET_FIELD;
+ }
+
+ @Override
+ public OFOxm<?> getField() {
+ return field;
+ }
+
+ @Override
+ public OFActionSetField.Builder setField(OFOxm<?> field) {
+ this.field = field;
+ this.fieldSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFActionSetField build() {
+ if(!this.fieldSet)
+ throw new IllegalStateException("Property field doesn't have default value -- must be set");
+ if(field == null)
+ throw new NullPointerException("Property field must not be null");
+
+
+ return new OFActionSetFieldVer13(
+ field
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFActionSetField> {
+ @Override
+ public OFActionSetField readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 25
+ short type = bb.readShort();
+ if(type != (short) 0x19)
+ throw new OFParseError("Wrong type: Expected=OFActionType.SET_FIELD(25), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ OFOxm<?> field = OFOxmVer13.READER.readFrom(bb);
+ // align message to 8 bytes (length contains aligned value)
+ bb.skipBytes(length - (bb.readerIndex() - start));
+
+ OFActionSetFieldVer13 actionSetFieldVer13 = new OFActionSetFieldVer13(
+ field
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", actionSetFieldVer13);
+ return actionSetFieldVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFActionSetFieldVer13Funnel FUNNEL = new OFActionSetFieldVer13Funnel();
+ static class OFActionSetFieldVer13Funnel implements Funnel<OFActionSetFieldVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFActionSetFieldVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 25
+ sink.putShort((short) 0x19);
+ // FIXME: skip funnel of length
+ message.field.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFActionSetFieldVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFActionSetFieldVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property type = 25
+ bb.writeShort((short) 0x19);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ message.field.writeTo(bb);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ int alignedLength = ((length + 7)/8 * 8);
+ bb.setShort(lengthIndex, alignedLength);
+ // align message to 8 bytes
+ bb.writeZero(alignedLength - length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFActionSetFieldVer13(");
+ b.append("field=").append(field);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFActionSetFieldVer13 other = (OFActionSetFieldVer13) obj;
+
+ if (field == null) {
+ if (other.field != null)
+ return false;
+ } else if (!field.equals(other.field))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((field == null) ? 0 : field.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionSetMplsTtlVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionSetMplsTtlVer13.java
new file mode 100644
index 0000000..16a5150
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionSetMplsTtlVer13.java
@@ -0,0 +1,265 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import java.util.Set;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFActionSetMplsTtlVer13 implements OFActionSetMplsTtl {
+ private static final Logger logger = LoggerFactory.getLogger(OFActionSetMplsTtlVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static short DEFAULT_MPLS_TTL = (short) 0x0;
+
+ // OF message fields
+ private final short mplsTtl;
+//
+ // Immutable default instance
+ final static OFActionSetMplsTtlVer13 DEFAULT = new OFActionSetMplsTtlVer13(
+ DEFAULT_MPLS_TTL
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFActionSetMplsTtlVer13(short mplsTtl) {
+ this.mplsTtl = mplsTtl;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFActionType getType() {
+ return OFActionType.SET_MPLS_TTL;
+ }
+
+ @Override
+ public short getMplsTtl() {
+ return mplsTtl;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFActionSetMplsTtl.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFActionSetMplsTtl.Builder {
+ final OFActionSetMplsTtlVer13 parentMessage;
+
+ // OF message fields
+ private boolean mplsTtlSet;
+ private short mplsTtl;
+
+ BuilderWithParent(OFActionSetMplsTtlVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFActionType getType() {
+ return OFActionType.SET_MPLS_TTL;
+ }
+
+ @Override
+ public short getMplsTtl() {
+ return mplsTtl;
+ }
+
+ @Override
+ public OFActionSetMplsTtl.Builder setMplsTtl(short mplsTtl) {
+ this.mplsTtl = mplsTtl;
+ this.mplsTtlSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFActionSetMplsTtl build() {
+ short mplsTtl = this.mplsTtlSet ? this.mplsTtl : parentMessage.mplsTtl;
+
+ //
+ return new OFActionSetMplsTtlVer13(
+ mplsTtl
+ );
+ }
+
+ }
+
+ static class Builder implements OFActionSetMplsTtl.Builder {
+ // OF message fields
+ private boolean mplsTtlSet;
+ private short mplsTtl;
+
+ @Override
+ public OFActionType getType() {
+ return OFActionType.SET_MPLS_TTL;
+ }
+
+ @Override
+ public short getMplsTtl() {
+ return mplsTtl;
+ }
+
+ @Override
+ public OFActionSetMplsTtl.Builder setMplsTtl(short mplsTtl) {
+ this.mplsTtl = mplsTtl;
+ this.mplsTtlSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFActionSetMplsTtl build() {
+ short mplsTtl = this.mplsTtlSet ? this.mplsTtl : DEFAULT_MPLS_TTL;
+
+
+ return new OFActionSetMplsTtlVer13(
+ mplsTtl
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFActionSetMplsTtl> {
+ @Override
+ public OFActionSetMplsTtl readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 15
+ short type = bb.readShort();
+ if(type != (short) 0xf)
+ throw new OFParseError("Wrong type: Expected=OFActionType.SET_MPLS_TTL(15), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 8)
+ throw new OFParseError("Wrong length: Expected=8(8), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ short mplsTtl = U8.f(bb.readByte());
+ // pad: 3 bytes
+ bb.skipBytes(3);
+
+ OFActionSetMplsTtlVer13 actionSetMplsTtlVer13 = new OFActionSetMplsTtlVer13(
+ mplsTtl
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", actionSetMplsTtlVer13);
+ return actionSetMplsTtlVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFActionSetMplsTtlVer13Funnel FUNNEL = new OFActionSetMplsTtlVer13Funnel();
+ static class OFActionSetMplsTtlVer13Funnel implements Funnel<OFActionSetMplsTtlVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFActionSetMplsTtlVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 15
+ sink.putShort((short) 0xf);
+ // fixed value property length = 8
+ sink.putShort((short) 0x8);
+ sink.putShort(message.mplsTtl);
+ // skip pad (3 bytes)
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFActionSetMplsTtlVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFActionSetMplsTtlVer13 message) {
+ // fixed value property type = 15
+ bb.writeShort((short) 0xf);
+ // fixed value property length = 8
+ bb.writeShort((short) 0x8);
+ bb.writeByte(U8.t(message.mplsTtl));
+ // pad: 3 bytes
+ bb.writeZero(3);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFActionSetMplsTtlVer13(");
+ b.append("mplsTtl=").append(mplsTtl);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFActionSetMplsTtlVer13 other = (OFActionSetMplsTtlVer13) obj;
+
+ if( mplsTtl != other.mplsTtl)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + mplsTtl;
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionSetNwTtlVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionSetNwTtlVer13.java
new file mode 100644
index 0000000..2dd35e2
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionSetNwTtlVer13.java
@@ -0,0 +1,265 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import java.util.Set;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFActionSetNwTtlVer13 implements OFActionSetNwTtl {
+ private static final Logger logger = LoggerFactory.getLogger(OFActionSetNwTtlVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static short DEFAULT_NW_TTL = (short) 0x0;
+
+ // OF message fields
+ private final short nwTtl;
+//
+ // Immutable default instance
+ final static OFActionSetNwTtlVer13 DEFAULT = new OFActionSetNwTtlVer13(
+ DEFAULT_NW_TTL
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFActionSetNwTtlVer13(short nwTtl) {
+ this.nwTtl = nwTtl;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFActionType getType() {
+ return OFActionType.SET_NW_TTL;
+ }
+
+ @Override
+ public short getNwTtl() {
+ return nwTtl;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFActionSetNwTtl.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFActionSetNwTtl.Builder {
+ final OFActionSetNwTtlVer13 parentMessage;
+
+ // OF message fields
+ private boolean nwTtlSet;
+ private short nwTtl;
+
+ BuilderWithParent(OFActionSetNwTtlVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFActionType getType() {
+ return OFActionType.SET_NW_TTL;
+ }
+
+ @Override
+ public short getNwTtl() {
+ return nwTtl;
+ }
+
+ @Override
+ public OFActionSetNwTtl.Builder setNwTtl(short nwTtl) {
+ this.nwTtl = nwTtl;
+ this.nwTtlSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFActionSetNwTtl build() {
+ short nwTtl = this.nwTtlSet ? this.nwTtl : parentMessage.nwTtl;
+
+ //
+ return new OFActionSetNwTtlVer13(
+ nwTtl
+ );
+ }
+
+ }
+
+ static class Builder implements OFActionSetNwTtl.Builder {
+ // OF message fields
+ private boolean nwTtlSet;
+ private short nwTtl;
+
+ @Override
+ public OFActionType getType() {
+ return OFActionType.SET_NW_TTL;
+ }
+
+ @Override
+ public short getNwTtl() {
+ return nwTtl;
+ }
+
+ @Override
+ public OFActionSetNwTtl.Builder setNwTtl(short nwTtl) {
+ this.nwTtl = nwTtl;
+ this.nwTtlSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFActionSetNwTtl build() {
+ short nwTtl = this.nwTtlSet ? this.nwTtl : DEFAULT_NW_TTL;
+
+
+ return new OFActionSetNwTtlVer13(
+ nwTtl
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFActionSetNwTtl> {
+ @Override
+ public OFActionSetNwTtl readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 23
+ short type = bb.readShort();
+ if(type != (short) 0x17)
+ throw new OFParseError("Wrong type: Expected=OFActionType.SET_NW_TTL(23), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 8)
+ throw new OFParseError("Wrong length: Expected=8(8), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ short nwTtl = U8.f(bb.readByte());
+ // pad: 3 bytes
+ bb.skipBytes(3);
+
+ OFActionSetNwTtlVer13 actionSetNwTtlVer13 = new OFActionSetNwTtlVer13(
+ nwTtl
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", actionSetNwTtlVer13);
+ return actionSetNwTtlVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFActionSetNwTtlVer13Funnel FUNNEL = new OFActionSetNwTtlVer13Funnel();
+ static class OFActionSetNwTtlVer13Funnel implements Funnel<OFActionSetNwTtlVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFActionSetNwTtlVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 23
+ sink.putShort((short) 0x17);
+ // fixed value property length = 8
+ sink.putShort((short) 0x8);
+ sink.putShort(message.nwTtl);
+ // skip pad (3 bytes)
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFActionSetNwTtlVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFActionSetNwTtlVer13 message) {
+ // fixed value property type = 23
+ bb.writeShort((short) 0x17);
+ // fixed value property length = 8
+ bb.writeShort((short) 0x8);
+ bb.writeByte(U8.t(message.nwTtl));
+ // pad: 3 bytes
+ bb.writeZero(3);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFActionSetNwTtlVer13(");
+ b.append("nwTtl=").append(nwTtl);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFActionSetNwTtlVer13 other = (OFActionSetNwTtlVer13) obj;
+
+ if( nwTtl != other.nwTtl)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + nwTtl;
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionSetQueueVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionSetQueueVer13.java
new file mode 100644
index 0000000..380f286
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionSetQueueVer13.java
@@ -0,0 +1,260 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import java.util.Set;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFActionSetQueueVer13 implements OFActionSetQueue {
+ private static final Logger logger = LoggerFactory.getLogger(OFActionSetQueueVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static long DEFAULT_QUEUE_ID = 0x0L;
+
+ // OF message fields
+ private final long queueId;
+//
+ // Immutable default instance
+ final static OFActionSetQueueVer13 DEFAULT = new OFActionSetQueueVer13(
+ DEFAULT_QUEUE_ID
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFActionSetQueueVer13(long queueId) {
+ this.queueId = queueId;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFActionType getType() {
+ return OFActionType.SET_QUEUE;
+ }
+
+ @Override
+ public long getQueueId() {
+ return queueId;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFActionSetQueue.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFActionSetQueue.Builder {
+ final OFActionSetQueueVer13 parentMessage;
+
+ // OF message fields
+ private boolean queueIdSet;
+ private long queueId;
+
+ BuilderWithParent(OFActionSetQueueVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFActionType getType() {
+ return OFActionType.SET_QUEUE;
+ }
+
+ @Override
+ public long getQueueId() {
+ return queueId;
+ }
+
+ @Override
+ public OFActionSetQueue.Builder setQueueId(long queueId) {
+ this.queueId = queueId;
+ this.queueIdSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFActionSetQueue build() {
+ long queueId = this.queueIdSet ? this.queueId : parentMessage.queueId;
+
+ //
+ return new OFActionSetQueueVer13(
+ queueId
+ );
+ }
+
+ }
+
+ static class Builder implements OFActionSetQueue.Builder {
+ // OF message fields
+ private boolean queueIdSet;
+ private long queueId;
+
+ @Override
+ public OFActionType getType() {
+ return OFActionType.SET_QUEUE;
+ }
+
+ @Override
+ public long getQueueId() {
+ return queueId;
+ }
+
+ @Override
+ public OFActionSetQueue.Builder setQueueId(long queueId) {
+ this.queueId = queueId;
+ this.queueIdSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFActionSetQueue build() {
+ long queueId = this.queueIdSet ? this.queueId : DEFAULT_QUEUE_ID;
+
+
+ return new OFActionSetQueueVer13(
+ queueId
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFActionSetQueue> {
+ @Override
+ public OFActionSetQueue readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 21
+ short type = bb.readShort();
+ if(type != (short) 0x15)
+ throw new OFParseError("Wrong type: Expected=OFActionType.SET_QUEUE(21), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 8)
+ throw new OFParseError("Wrong length: Expected=8(8), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long queueId = U32.f(bb.readInt());
+
+ OFActionSetQueueVer13 actionSetQueueVer13 = new OFActionSetQueueVer13(
+ queueId
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", actionSetQueueVer13);
+ return actionSetQueueVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFActionSetQueueVer13Funnel FUNNEL = new OFActionSetQueueVer13Funnel();
+ static class OFActionSetQueueVer13Funnel implements Funnel<OFActionSetQueueVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFActionSetQueueVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 21
+ sink.putShort((short) 0x15);
+ // fixed value property length = 8
+ sink.putShort((short) 0x8);
+ sink.putLong(message.queueId);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFActionSetQueueVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFActionSetQueueVer13 message) {
+ // fixed value property type = 21
+ bb.writeShort((short) 0x15);
+ // fixed value property length = 8
+ bb.writeShort((short) 0x8);
+ bb.writeInt(U32.t(message.queueId));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFActionSetQueueVer13(");
+ b.append("queueId=").append(queueId);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFActionSetQueueVer13 other = (OFActionSetQueueVer13) obj;
+
+ if( queueId != other.queueId)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (queueId ^ (queueId >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionTypeSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionTypeSerializerVer13.java
new file mode 100644
index 0000000..108caf0
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionTypeSerializerVer13.java
@@ -0,0 +1,149 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFActionType;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+
+public class OFActionTypeSerializerVer13 {
+
+ public final static short OUTPUT_VAL = (short) 0x0;
+ public final static short COPY_TTL_OUT_VAL = (short) 0xb;
+ public final static short COPY_TTL_IN_VAL = (short) 0xc;
+ public final static short SET_MPLS_TTL_VAL = (short) 0xf;
+ public final static short DEC_MPLS_TTL_VAL = (short) 0x10;
+ public final static short PUSH_VLAN_VAL = (short) 0x11;
+ public final static short POP_VLAN_VAL = (short) 0x12;
+ public final static short PUSH_MPLS_VAL = (short) 0x13;
+ public final static short POP_MPLS_VAL = (short) 0x14;
+ public final static short SET_QUEUE_VAL = (short) 0x15;
+ public final static short GROUP_VAL = (short) 0x16;
+ public final static short SET_NW_TTL_VAL = (short) 0x17;
+ public final static short DEC_NW_TTL_VAL = (short) 0x18;
+ public final static short SET_FIELD_VAL = (short) 0x19;
+ public final static short PUSH_PBB_VAL = (short) 0x1a;
+ public final static short POP_PBB_VAL = (short) 0x1b;
+ public final static short EXPERIMENTER_VAL = (short) 0xffff;
+
+ public static OFActionType readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readShort());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, OFActionType e) {
+ bb.writeShort(toWireValue(e));
+ }
+
+ public static void putTo(OFActionType e, PrimitiveSink sink) {
+ sink.putShort(toWireValue(e));
+ }
+
+ public static OFActionType ofWireValue(short val) {
+ switch(val) {
+ case OUTPUT_VAL:
+ return OFActionType.OUTPUT;
+ case COPY_TTL_OUT_VAL:
+ return OFActionType.COPY_TTL_OUT;
+ case COPY_TTL_IN_VAL:
+ return OFActionType.COPY_TTL_IN;
+ case SET_MPLS_TTL_VAL:
+ return OFActionType.SET_MPLS_TTL;
+ case DEC_MPLS_TTL_VAL:
+ return OFActionType.DEC_MPLS_TTL;
+ case PUSH_VLAN_VAL:
+ return OFActionType.PUSH_VLAN;
+ case POP_VLAN_VAL:
+ return OFActionType.POP_VLAN;
+ case PUSH_MPLS_VAL:
+ return OFActionType.PUSH_MPLS;
+ case POP_MPLS_VAL:
+ return OFActionType.POP_MPLS;
+ case SET_QUEUE_VAL:
+ return OFActionType.SET_QUEUE;
+ case GROUP_VAL:
+ return OFActionType.GROUP;
+ case SET_NW_TTL_VAL:
+ return OFActionType.SET_NW_TTL;
+ case DEC_NW_TTL_VAL:
+ return OFActionType.DEC_NW_TTL;
+ case SET_FIELD_VAL:
+ return OFActionType.SET_FIELD;
+ case PUSH_PBB_VAL:
+ return OFActionType.PUSH_PBB;
+ case POP_PBB_VAL:
+ return OFActionType.POP_PBB;
+ case EXPERIMENTER_VAL:
+ return OFActionType.EXPERIMENTER;
+ default:
+ throw new IllegalArgumentException("Illegal wire value for type OFActionType in version 1.3: " + val);
+ }
+ }
+
+
+ public static short toWireValue(OFActionType e) {
+ switch(e) {
+ case OUTPUT:
+ return OUTPUT_VAL;
+ case COPY_TTL_OUT:
+ return COPY_TTL_OUT_VAL;
+ case COPY_TTL_IN:
+ return COPY_TTL_IN_VAL;
+ case SET_MPLS_TTL:
+ return SET_MPLS_TTL_VAL;
+ case DEC_MPLS_TTL:
+ return DEC_MPLS_TTL_VAL;
+ case PUSH_VLAN:
+ return PUSH_VLAN_VAL;
+ case POP_VLAN:
+ return POP_VLAN_VAL;
+ case PUSH_MPLS:
+ return PUSH_MPLS_VAL;
+ case POP_MPLS:
+ return POP_MPLS_VAL;
+ case SET_QUEUE:
+ return SET_QUEUE_VAL;
+ case GROUP:
+ return GROUP_VAL;
+ case SET_NW_TTL:
+ return SET_NW_TTL_VAL;
+ case DEC_NW_TTL:
+ return DEC_NW_TTL_VAL;
+ case SET_FIELD:
+ return SET_FIELD_VAL;
+ case PUSH_PBB:
+ return PUSH_PBB_VAL;
+ case POP_PBB:
+ return POP_PBB_VAL;
+ case EXPERIMENTER:
+ return EXPERIMENTER_VAL;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFActionType in version 1.3: " + e);
+ }
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionVer13.java
new file mode 100644
index 0000000..7715767
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionVer13.java
@@ -0,0 +1,102 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_virtual_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.jboss.netty.buffer.ChannelBuffer;
+import java.util.Set;
+
+abstract class OFActionVer13 {
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 8;
+
+
+ public final static OFActionVer13.Reader READER = new Reader();
+
+ static class Reader implements OFMessageReader<OFAction> {
+ @Override
+ public OFAction readFrom(ChannelBuffer bb) throws OFParseError {
+ if(bb.readableBytes() < MINIMUM_LENGTH)
+ return null;
+ int start = bb.readerIndex();
+ short type = bb.readShort();
+ bb.readerIndex(start);
+ switch(type) {
+ case (short) 0xffff:
+ // discriminator value OFActionType.EXPERIMENTER=65535 for class OFActionExperimenterVer13
+ return OFActionExperimenterVer13.READER.readFrom(bb);
+ case (short) 0x0:
+ // discriminator value OFActionType.OUTPUT=0 for class OFActionOutputVer13
+ return OFActionOutputVer13.READER.readFrom(bb);
+ case (short) 0xc:
+ // discriminator value OFActionType.COPY_TTL_IN=12 for class OFActionCopyTtlInVer13
+ return OFActionCopyTtlInVer13.READER.readFrom(bb);
+ case (short) 0xb:
+ // discriminator value OFActionType.COPY_TTL_OUT=11 for class OFActionCopyTtlOutVer13
+ return OFActionCopyTtlOutVer13.READER.readFrom(bb);
+ case (short) 0x10:
+ // discriminator value OFActionType.DEC_MPLS_TTL=16 for class OFActionDecMplsTtlVer13
+ return OFActionDecMplsTtlVer13.READER.readFrom(bb);
+ case (short) 0x18:
+ // discriminator value OFActionType.DEC_NW_TTL=24 for class OFActionDecNwTtlVer13
+ return OFActionDecNwTtlVer13.READER.readFrom(bb);
+ case (short) 0x16:
+ // discriminator value OFActionType.GROUP=22 for class OFActionGroupVer13
+ return OFActionGroupVer13.READER.readFrom(bb);
+ case (short) 0x14:
+ // discriminator value OFActionType.POP_MPLS=20 for class OFActionPopMplsVer13
+ return OFActionPopMplsVer13.READER.readFrom(bb);
+ case (short) 0x12:
+ // discriminator value OFActionType.POP_VLAN=18 for class OFActionPopVlanVer13
+ return OFActionPopVlanVer13.READER.readFrom(bb);
+ case (short) 0x13:
+ // discriminator value OFActionType.PUSH_MPLS=19 for class OFActionPushMplsVer13
+ return OFActionPushMplsVer13.READER.readFrom(bb);
+ case (short) 0x11:
+ // discriminator value OFActionType.PUSH_VLAN=17 for class OFActionPushVlanVer13
+ return OFActionPushVlanVer13.READER.readFrom(bb);
+ case (short) 0xf:
+ // discriminator value OFActionType.SET_MPLS_TTL=15 for class OFActionSetMplsTtlVer13
+ return OFActionSetMplsTtlVer13.READER.readFrom(bb);
+ case (short) 0x17:
+ // discriminator value OFActionType.SET_NW_TTL=23 for class OFActionSetNwTtlVer13
+ return OFActionSetNwTtlVer13.READER.readFrom(bb);
+ case (short) 0x15:
+ // discriminator value OFActionType.SET_QUEUE=21 for class OFActionSetQueueVer13
+ return OFActionSetQueueVer13.READER.readFrom(bb);
+ case (short) 0x19:
+ // discriminator value OFActionType.SET_FIELD=25 for class OFActionSetFieldVer13
+ return OFActionSetFieldVer13.READER.readFrom(bb);
+ case (short) 0x1b:
+ // discriminator value OFActionType.POP_PBB=27 for class OFActionPopPbbVer13
+ return OFActionPopPbbVer13.READER.readFrom(bb);
+ case (short) 0x1a:
+ // discriminator value OFActionType.PUSH_PBB=26 for class OFActionPushPbbVer13
+ return OFActionPushPbbVer13.READER.readFrom(bb);
+ default:
+ throw new OFParseError("Unknown value for discriminator type of class OFActionVer13: " + type);
+ }
+ }
+ }
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionsVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionsVer13.java
new file mode 100644
index 0000000..f96b112
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFActionsVer13.java
@@ -0,0 +1,279 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_factory_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import java.util.Set;
+
+
+public class OFActionsVer13 implements OFActions {
+ public final static OFActionsVer13 INSTANCE = new OFActionsVer13();
+
+
+
+
+ public OFActionBsnChecksum.Builder buildBsnChecksum() {
+ return new OFActionBsnChecksumVer13.Builder();
+ }
+ public OFActionBsnChecksum bsnChecksum(U128 checksum) {
+ return new OFActionBsnChecksumVer13(
+ checksum
+ );
+ }
+
+ public OFActionBsnMirror.Builder buildBsnMirror() {
+ return new OFActionBsnMirrorVer13.Builder();
+ }
+
+ public OFActionBsnSetTunnelDst.Builder buildBsnSetTunnelDst() {
+ return new OFActionBsnSetTunnelDstVer13.Builder();
+ }
+ public OFActionBsnSetTunnelDst bsnSetTunnelDst(long dst) {
+ return new OFActionBsnSetTunnelDstVer13(
+ dst
+ );
+ }
+
+ public OFActionEnqueue.Builder buildEnqueue() {
+ throw new UnsupportedOperationException("OFActionEnqueue not supported in version 1.3");
+ }
+ public OFActionEnqueue enqueue(OFPort port, long queueId) {
+ throw new UnsupportedOperationException("OFActionEnqueue not supported in version 1.3");
+ }
+
+ public OFActionNiciraDecTtl niciraDecTtl() {
+ return OFActionNiciraDecTtlVer13.INSTANCE;
+ }
+
+ public OFActionOutput.Builder buildOutput() {
+ return new OFActionOutputVer13.Builder();
+ }
+ public OFActionOutput output(OFPort port, int maxLen) {
+ return new OFActionOutputVer13(
+ port,
+ maxLen
+ );
+ }
+
+ public OFActionSetDlDst.Builder buildSetDlDst() {
+ throw new UnsupportedOperationException("OFActionSetDlDst not supported in version 1.3");
+ }
+ public OFActionSetDlDst setDlDst(MacAddress dlAddr) {
+ throw new UnsupportedOperationException("OFActionSetDlDst not supported in version 1.3");
+ }
+
+ public OFActionSetDlSrc.Builder buildSetDlSrc() {
+ throw new UnsupportedOperationException("OFActionSetDlSrc not supported in version 1.3");
+ }
+ public OFActionSetDlSrc setDlSrc(MacAddress dlAddr) {
+ throw new UnsupportedOperationException("OFActionSetDlSrc not supported in version 1.3");
+ }
+
+ public OFActionSetNwDst.Builder buildSetNwDst() {
+ throw new UnsupportedOperationException("OFActionSetNwDst not supported in version 1.3");
+ }
+ public OFActionSetNwDst setNwDst(IPv4Address nwAddr) {
+ throw new UnsupportedOperationException("OFActionSetNwDst not supported in version 1.3");
+ }
+
+ public OFActionSetNwSrc.Builder buildSetNwSrc() {
+ throw new UnsupportedOperationException("OFActionSetNwSrc not supported in version 1.3");
+ }
+ public OFActionSetNwSrc setNwSrc(IPv4Address nwAddr) {
+ throw new UnsupportedOperationException("OFActionSetNwSrc not supported in version 1.3");
+ }
+
+ public OFActionSetNwTos.Builder buildSetNwTos() {
+ throw new UnsupportedOperationException("OFActionSetNwTos not supported in version 1.3");
+ }
+ public OFActionSetNwTos setNwTos(short nwTos) {
+ throw new UnsupportedOperationException("OFActionSetNwTos not supported in version 1.3");
+ }
+
+ public OFActionSetTpDst.Builder buildSetTpDst() {
+ throw new UnsupportedOperationException("OFActionSetTpDst not supported in version 1.3");
+ }
+ public OFActionSetTpDst setTpDst(TransportPort tpPort) {
+ throw new UnsupportedOperationException("OFActionSetTpDst not supported in version 1.3");
+ }
+
+ public OFActionSetTpSrc.Builder buildSetTpSrc() {
+ throw new UnsupportedOperationException("OFActionSetTpSrc not supported in version 1.3");
+ }
+ public OFActionSetTpSrc setTpSrc(TransportPort tpPort) {
+ throw new UnsupportedOperationException("OFActionSetTpSrc not supported in version 1.3");
+ }
+
+ public OFActionSetVlanPcp.Builder buildSetVlanPcp() {
+ throw new UnsupportedOperationException("OFActionSetVlanPcp not supported in version 1.3");
+ }
+ public OFActionSetVlanPcp setVlanPcp(VlanPcp vlanPcp) {
+ throw new UnsupportedOperationException("OFActionSetVlanPcp not supported in version 1.3");
+ }
+
+ public OFActionSetVlanVid.Builder buildSetVlanVid() {
+ throw new UnsupportedOperationException("OFActionSetVlanVid not supported in version 1.3");
+ }
+ public OFActionSetVlanVid setVlanVid(VlanVid vlanVid) {
+ throw new UnsupportedOperationException("OFActionSetVlanVid not supported in version 1.3");
+ }
+
+ public OFActionStripVlan stripVlan() {
+ throw new UnsupportedOperationException("OFActionStripVlan not supported in version 1.3");
+ }
+
+ public OFActionCopyTtlIn copyTtlIn() {
+ return OFActionCopyTtlInVer13.INSTANCE;
+ }
+
+ public OFActionCopyTtlOut copyTtlOut() {
+ return OFActionCopyTtlOutVer13.INSTANCE;
+ }
+
+ public OFActionDecMplsTtl decMplsTtl() {
+ return OFActionDecMplsTtlVer13.INSTANCE;
+ }
+
+ public OFActionDecNwTtl decNwTtl() {
+ return OFActionDecNwTtlVer13.INSTANCE;
+ }
+
+ public OFActionGroup.Builder buildGroup() {
+ return new OFActionGroupVer13.Builder();
+ }
+ public OFActionGroup group(OFGroup group) {
+ return new OFActionGroupVer13(
+ group
+ );
+ }
+
+ public OFActionPopMpls.Builder buildPopMpls() {
+ return new OFActionPopMplsVer13.Builder();
+ }
+ public OFActionPopMpls popMpls(EthType ethertype) {
+ return new OFActionPopMplsVer13(
+ ethertype
+ );
+ }
+
+ public OFActionPopVlan popVlan() {
+ return OFActionPopVlanVer13.INSTANCE;
+ }
+
+ public OFActionPushMpls.Builder buildPushMpls() {
+ return new OFActionPushMplsVer13.Builder();
+ }
+ public OFActionPushMpls pushMpls(EthType ethertype) {
+ return new OFActionPushMplsVer13(
+ ethertype
+ );
+ }
+
+ public OFActionPushVlan.Builder buildPushVlan() {
+ return new OFActionPushVlanVer13.Builder();
+ }
+ public OFActionPushVlan pushVlan(EthType ethertype) {
+ return new OFActionPushVlanVer13(
+ ethertype
+ );
+ }
+
+ public OFActionSetMplsLabel.Builder buildSetMplsLabel() {
+ throw new UnsupportedOperationException("OFActionSetMplsLabel not supported in version 1.3");
+ }
+ public OFActionSetMplsLabel setMplsLabel(long mplsLabel) {
+ throw new UnsupportedOperationException("OFActionSetMplsLabel not supported in version 1.3");
+ }
+
+ public OFActionSetMplsTc.Builder buildSetMplsTc() {
+ throw new UnsupportedOperationException("OFActionSetMplsTc not supported in version 1.3");
+ }
+ public OFActionSetMplsTc setMplsTc(short mplsTc) {
+ throw new UnsupportedOperationException("OFActionSetMplsTc not supported in version 1.3");
+ }
+
+ public OFActionSetMplsTtl.Builder buildSetMplsTtl() {
+ return new OFActionSetMplsTtlVer13.Builder();
+ }
+ public OFActionSetMplsTtl setMplsTtl(short mplsTtl) {
+ return new OFActionSetMplsTtlVer13(
+ mplsTtl
+ );
+ }
+
+ public OFActionSetNwEcn.Builder buildSetNwEcn() {
+ throw new UnsupportedOperationException("OFActionSetNwEcn not supported in version 1.3");
+ }
+ public OFActionSetNwEcn setNwEcn(IpEcn nwEcn) {
+ throw new UnsupportedOperationException("OFActionSetNwEcn not supported in version 1.3");
+ }
+
+ public OFActionSetNwTtl.Builder buildSetNwTtl() {
+ return new OFActionSetNwTtlVer13.Builder();
+ }
+ public OFActionSetNwTtl setNwTtl(short nwTtl) {
+ return new OFActionSetNwTtlVer13(
+ nwTtl
+ );
+ }
+
+ public OFActionSetQueue.Builder buildSetQueue() {
+ return new OFActionSetQueueVer13.Builder();
+ }
+ public OFActionSetQueue setQueue(long queueId) {
+ return new OFActionSetQueueVer13(
+ queueId
+ );
+ }
+
+ public OFActionSetField.Builder buildSetField() {
+ return new OFActionSetFieldVer13.Builder();
+ }
+ public OFActionSetField setField(OFOxm<?> field) {
+ return new OFActionSetFieldVer13(
+ field
+ );
+ }
+
+ public OFActionPopPbb popPbb() {
+ return OFActionPopPbbVer13.INSTANCE;
+ }
+
+ public OFActionPushPbb.Builder buildPushPbb() {
+ return new OFActionPushPbbVer13.Builder();
+ }
+ public OFActionPushPbb pushPbb(EthType ethertype) {
+ return new OFActionPushPbbVer13(
+ ethertype
+ );
+ }
+
+ public OFMessageReader<OFAction> getReader() {
+ return OFActionVer13.READER;
+ }
+
+
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFAggregateStatsReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFAggregateStatsReplyVer13.java
new file mode 100644
index 0000000..0c827e5
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFAggregateStatsReplyVer13.java
@@ -0,0 +1,511 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFAggregateStatsReplyVer13 implements OFAggregateStatsReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFAggregateStatsReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 40;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsReplyFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsReplyFlags>of();
+ private final static U64 DEFAULT_PACKET_COUNT = U64.ZERO;
+ private final static U64 DEFAULT_BYTE_COUNT = U64.ZERO;
+ private final static long DEFAULT_FLOW_COUNT = 0x0L;
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsReplyFlags> flags;
+ private final U64 packetCount;
+ private final U64 byteCount;
+ private final long flowCount;
+//
+ // Immutable default instance
+ final static OFAggregateStatsReplyVer13 DEFAULT = new OFAggregateStatsReplyVer13(
+ DEFAULT_XID, DEFAULT_FLAGS, DEFAULT_PACKET_COUNT, DEFAULT_BYTE_COUNT, DEFAULT_FLOW_COUNT
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFAggregateStatsReplyVer13(long xid, Set<OFStatsReplyFlags> flags, U64 packetCount, U64 byteCount, long flowCount) {
+ this.xid = xid;
+ this.flags = flags;
+ this.packetCount = packetCount;
+ this.byteCount = byteCount;
+ this.flowCount = flowCount;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.AGGREGATE;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public U64 getPacketCount() {
+ return packetCount;
+ }
+
+ @Override
+ public U64 getByteCount() {
+ return byteCount;
+ }
+
+ @Override
+ public long getFlowCount() {
+ return flowCount;
+ }
+
+
+
+ public OFAggregateStatsReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFAggregateStatsReply.Builder {
+ final OFAggregateStatsReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean packetCountSet;
+ private U64 packetCount;
+ private boolean byteCountSet;
+ private U64 byteCount;
+ private boolean flowCountSet;
+ private long flowCount;
+
+ BuilderWithParent(OFAggregateStatsReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFAggregateStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.AGGREGATE;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFAggregateStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public U64 getPacketCount() {
+ return packetCount;
+ }
+
+ @Override
+ public OFAggregateStatsReply.Builder setPacketCount(U64 packetCount) {
+ this.packetCount = packetCount;
+ this.packetCountSet = true;
+ return this;
+ }
+ @Override
+ public U64 getByteCount() {
+ return byteCount;
+ }
+
+ @Override
+ public OFAggregateStatsReply.Builder setByteCount(U64 byteCount) {
+ this.byteCount = byteCount;
+ this.byteCountSet = true;
+ return this;
+ }
+ @Override
+ public long getFlowCount() {
+ return flowCount;
+ }
+
+ @Override
+ public OFAggregateStatsReply.Builder setFlowCount(long flowCount) {
+ this.flowCount = flowCount;
+ this.flowCountSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFAggregateStatsReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ U64 packetCount = this.packetCountSet ? this.packetCount : parentMessage.packetCount;
+ if(packetCount == null)
+ throw new NullPointerException("Property packetCount must not be null");
+ U64 byteCount = this.byteCountSet ? this.byteCount : parentMessage.byteCount;
+ if(byteCount == null)
+ throw new NullPointerException("Property byteCount must not be null");
+ long flowCount = this.flowCountSet ? this.flowCount : parentMessage.flowCount;
+
+ //
+ return new OFAggregateStatsReplyVer13(
+ xid,
+ flags,
+ packetCount,
+ byteCount,
+ flowCount
+ );
+ }
+
+ }
+
+ static class Builder implements OFAggregateStatsReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean packetCountSet;
+ private U64 packetCount;
+ private boolean byteCountSet;
+ private U64 byteCount;
+ private boolean flowCountSet;
+ private long flowCount;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFAggregateStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.AGGREGATE;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFAggregateStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public U64 getPacketCount() {
+ return packetCount;
+ }
+
+ @Override
+ public OFAggregateStatsReply.Builder setPacketCount(U64 packetCount) {
+ this.packetCount = packetCount;
+ this.packetCountSet = true;
+ return this;
+ }
+ @Override
+ public U64 getByteCount() {
+ return byteCount;
+ }
+
+ @Override
+ public OFAggregateStatsReply.Builder setByteCount(U64 byteCount) {
+ this.byteCount = byteCount;
+ this.byteCountSet = true;
+ return this;
+ }
+ @Override
+ public long getFlowCount() {
+ return flowCount;
+ }
+
+ @Override
+ public OFAggregateStatsReply.Builder setFlowCount(long flowCount) {
+ this.flowCount = flowCount;
+ this.flowCountSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFAggregateStatsReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ U64 packetCount = this.packetCountSet ? this.packetCount : DEFAULT_PACKET_COUNT;
+ if(packetCount == null)
+ throw new NullPointerException("Property packetCount must not be null");
+ U64 byteCount = this.byteCountSet ? this.byteCount : DEFAULT_BYTE_COUNT;
+ if(byteCount == null)
+ throw new NullPointerException("Property byteCount must not be null");
+ long flowCount = this.flowCountSet ? this.flowCount : DEFAULT_FLOW_COUNT;
+
+
+ return new OFAggregateStatsReplyVer13(
+ xid,
+ flags,
+ packetCount,
+ byteCount,
+ flowCount
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFAggregateStatsReply> {
+ @Override
+ public OFAggregateStatsReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 19
+ byte type = bb.readByte();
+ if(type != (byte) 0x13)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REPLY(19), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 40)
+ throw new OFParseError("Wrong length: Expected=40(40), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 2
+ short statsType = bb.readShort();
+ if(statsType != (short) 0x2)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.AGGREGATE(2), got="+statsType);
+ Set<OFStatsReplyFlags> flags = OFStatsReplyFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ U64 packetCount = U64.ofRaw(bb.readLong());
+ U64 byteCount = U64.ofRaw(bb.readLong());
+ long flowCount = U32.f(bb.readInt());
+ // pad: 4 bytes
+ bb.skipBytes(4);
+
+ OFAggregateStatsReplyVer13 aggregateStatsReplyVer13 = new OFAggregateStatsReplyVer13(
+ xid,
+ flags,
+ packetCount,
+ byteCount,
+ flowCount
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", aggregateStatsReplyVer13);
+ return aggregateStatsReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFAggregateStatsReplyVer13Funnel FUNNEL = new OFAggregateStatsReplyVer13Funnel();
+ static class OFAggregateStatsReplyVer13Funnel implements Funnel<OFAggregateStatsReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFAggregateStatsReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 19
+ sink.putByte((byte) 0x13);
+ // fixed value property length = 40
+ sink.putShort((short) 0x28);
+ sink.putLong(message.xid);
+ // fixed value property statsType = 2
+ sink.putShort((short) 0x2);
+ OFStatsReplyFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ message.packetCount.putTo(sink);
+ message.byteCount.putTo(sink);
+ sink.putLong(message.flowCount);
+ // skip pad (4 bytes)
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFAggregateStatsReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFAggregateStatsReplyVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 19
+ bb.writeByte((byte) 0x13);
+ // fixed value property length = 40
+ bb.writeShort((short) 0x28);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 2
+ bb.writeShort((short) 0x2);
+ OFStatsReplyFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ bb.writeLong(message.packetCount.getValue());
+ bb.writeLong(message.byteCount.getValue());
+ bb.writeInt(U32.t(message.flowCount));
+ // pad: 4 bytes
+ bb.writeZero(4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFAggregateStatsReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("packetCount=").append(packetCount);
+ b.append(", ");
+ b.append("byteCount=").append(byteCount);
+ b.append(", ");
+ b.append("flowCount=").append(flowCount);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFAggregateStatsReplyVer13 other = (OFAggregateStatsReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if (packetCount == null) {
+ if (other.packetCount != null)
+ return false;
+ } else if (!packetCount.equals(other.packetCount))
+ return false;
+ if (byteCount == null) {
+ if (other.byteCount != null)
+ return false;
+ } else if (!byteCount.equals(other.byteCount))
+ return false;
+ if( flowCount != other.flowCount)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * result + ((packetCount == null) ? 0 : packetCount.hashCode());
+ result = prime * result + ((byteCount == null) ? 0 : byteCount.hashCode());
+ result = prime * (int) (flowCount ^ (flowCount >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFAggregateStatsRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFAggregateStatsRequestVer13.java
new file mode 100644
index 0000000..da1821b
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFAggregateStatsRequestVer13.java
@@ -0,0 +1,690 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFAggregateStatsRequestVer13 implements OFAggregateStatsRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFAggregateStatsRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 56;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsRequestFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsRequestFlags>of();
+ private final static TableId DEFAULT_TABLE_ID = TableId.ALL;
+ private final static OFPort DEFAULT_OUT_PORT = OFPort.ANY;
+ private final static OFGroup DEFAULT_OUT_GROUP = OFGroup.ANY;
+ private final static U64 DEFAULT_COOKIE = U64.ZERO;
+ private final static U64 DEFAULT_COOKIE_MASK = U64.ZERO;
+ private final static Match DEFAULT_MATCH = OFFactoryVer13.MATCH_WILDCARD_ALL;
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsRequestFlags> flags;
+ private final TableId tableId;
+ private final OFPort outPort;
+ private final OFGroup outGroup;
+ private final U64 cookie;
+ private final U64 cookieMask;
+ private final Match match;
+//
+ // Immutable default instance
+ final static OFAggregateStatsRequestVer13 DEFAULT = new OFAggregateStatsRequestVer13(
+ DEFAULT_XID, DEFAULT_FLAGS, DEFAULT_TABLE_ID, DEFAULT_OUT_PORT, DEFAULT_OUT_GROUP, DEFAULT_COOKIE, DEFAULT_COOKIE_MASK, DEFAULT_MATCH
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFAggregateStatsRequestVer13(long xid, Set<OFStatsRequestFlags> flags, TableId tableId, OFPort outPort, OFGroup outGroup, U64 cookie, U64 cookieMask, Match match) {
+ this.xid = xid;
+ this.flags = flags;
+ this.tableId = tableId;
+ this.outPort = outPort;
+ this.outGroup = outGroup;
+ this.cookie = cookie;
+ this.cookieMask = cookieMask;
+ this.match = match;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.AGGREGATE;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFPort getOutPort() {
+ return outPort;
+ }
+
+ @Override
+ public OFGroup getOutGroup() {
+ return outGroup;
+ }
+
+ @Override
+ public U64 getCookie() {
+ return cookie;
+ }
+
+ @Override
+ public U64 getCookieMask() {
+ return cookieMask;
+ }
+
+ @Override
+ public Match getMatch() {
+ return match;
+ }
+
+
+
+ public OFAggregateStatsRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFAggregateStatsRequest.Builder {
+ final OFAggregateStatsRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+ private boolean tableIdSet;
+ private TableId tableId;
+ private boolean outPortSet;
+ private OFPort outPort;
+ private boolean outGroupSet;
+ private OFGroup outGroup;
+ private boolean cookieSet;
+ private U64 cookie;
+ private boolean cookieMaskSet;
+ private U64 cookieMask;
+ private boolean matchSet;
+ private Match match;
+
+ BuilderWithParent(OFAggregateStatsRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFAggregateStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.AGGREGATE;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFAggregateStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFAggregateStatsRequest.Builder setTableId(TableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getOutPort() {
+ return outPort;
+ }
+
+ @Override
+ public OFAggregateStatsRequest.Builder setOutPort(OFPort outPort) {
+ this.outPort = outPort;
+ this.outPortSet = true;
+ return this;
+ }
+ @Override
+ public OFGroup getOutGroup() {
+ return outGroup;
+ }
+
+ @Override
+ public OFAggregateStatsRequest.Builder setOutGroup(OFGroup outGroup) {
+ this.outGroup = outGroup;
+ this.outGroupSet = true;
+ return this;
+ }
+ @Override
+ public U64 getCookie() {
+ return cookie;
+ }
+
+ @Override
+ public OFAggregateStatsRequest.Builder setCookie(U64 cookie) {
+ this.cookie = cookie;
+ this.cookieSet = true;
+ return this;
+ }
+ @Override
+ public U64 getCookieMask() {
+ return cookieMask;
+ }
+
+ @Override
+ public OFAggregateStatsRequest.Builder setCookieMask(U64 cookieMask) {
+ this.cookieMask = cookieMask;
+ this.cookieMaskSet = true;
+ return this;
+ }
+ @Override
+ public Match getMatch() {
+ return match;
+ }
+
+ @Override
+ public OFAggregateStatsRequest.Builder setMatch(Match match) {
+ this.match = match;
+ this.matchSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFAggregateStatsRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ TableId tableId = this.tableIdSet ? this.tableId : parentMessage.tableId;
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+ OFPort outPort = this.outPortSet ? this.outPort : parentMessage.outPort;
+ if(outPort == null)
+ throw new NullPointerException("Property outPort must not be null");
+ OFGroup outGroup = this.outGroupSet ? this.outGroup : parentMessage.outGroup;
+ if(outGroup == null)
+ throw new NullPointerException("Property outGroup must not be null");
+ U64 cookie = this.cookieSet ? this.cookie : parentMessage.cookie;
+ if(cookie == null)
+ throw new NullPointerException("Property cookie must not be null");
+ U64 cookieMask = this.cookieMaskSet ? this.cookieMask : parentMessage.cookieMask;
+ if(cookieMask == null)
+ throw new NullPointerException("Property cookieMask must not be null");
+ Match match = this.matchSet ? this.match : parentMessage.match;
+ if(match == null)
+ throw new NullPointerException("Property match must not be null");
+
+ //
+ return new OFAggregateStatsRequestVer13(
+ xid,
+ flags,
+ tableId,
+ outPort,
+ outGroup,
+ cookie,
+ cookieMask,
+ match
+ );
+ }
+
+ }
+
+ static class Builder implements OFAggregateStatsRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+ private boolean tableIdSet;
+ private TableId tableId;
+ private boolean outPortSet;
+ private OFPort outPort;
+ private boolean outGroupSet;
+ private OFGroup outGroup;
+ private boolean cookieSet;
+ private U64 cookie;
+ private boolean cookieMaskSet;
+ private U64 cookieMask;
+ private boolean matchSet;
+ private Match match;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFAggregateStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.AGGREGATE;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFAggregateStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFAggregateStatsRequest.Builder setTableId(TableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getOutPort() {
+ return outPort;
+ }
+
+ @Override
+ public OFAggregateStatsRequest.Builder setOutPort(OFPort outPort) {
+ this.outPort = outPort;
+ this.outPortSet = true;
+ return this;
+ }
+ @Override
+ public OFGroup getOutGroup() {
+ return outGroup;
+ }
+
+ @Override
+ public OFAggregateStatsRequest.Builder setOutGroup(OFGroup outGroup) {
+ this.outGroup = outGroup;
+ this.outGroupSet = true;
+ return this;
+ }
+ @Override
+ public U64 getCookie() {
+ return cookie;
+ }
+
+ @Override
+ public OFAggregateStatsRequest.Builder setCookie(U64 cookie) {
+ this.cookie = cookie;
+ this.cookieSet = true;
+ return this;
+ }
+ @Override
+ public U64 getCookieMask() {
+ return cookieMask;
+ }
+
+ @Override
+ public OFAggregateStatsRequest.Builder setCookieMask(U64 cookieMask) {
+ this.cookieMask = cookieMask;
+ this.cookieMaskSet = true;
+ return this;
+ }
+ @Override
+ public Match getMatch() {
+ return match;
+ }
+
+ @Override
+ public OFAggregateStatsRequest.Builder setMatch(Match match) {
+ this.match = match;
+ this.matchSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFAggregateStatsRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ TableId tableId = this.tableIdSet ? this.tableId : DEFAULT_TABLE_ID;
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+ OFPort outPort = this.outPortSet ? this.outPort : DEFAULT_OUT_PORT;
+ if(outPort == null)
+ throw new NullPointerException("Property outPort must not be null");
+ OFGroup outGroup = this.outGroupSet ? this.outGroup : DEFAULT_OUT_GROUP;
+ if(outGroup == null)
+ throw new NullPointerException("Property outGroup must not be null");
+ U64 cookie = this.cookieSet ? this.cookie : DEFAULT_COOKIE;
+ if(cookie == null)
+ throw new NullPointerException("Property cookie must not be null");
+ U64 cookieMask = this.cookieMaskSet ? this.cookieMask : DEFAULT_COOKIE_MASK;
+ if(cookieMask == null)
+ throw new NullPointerException("Property cookieMask must not be null");
+ Match match = this.matchSet ? this.match : DEFAULT_MATCH;
+ if(match == null)
+ throw new NullPointerException("Property match must not be null");
+
+
+ return new OFAggregateStatsRequestVer13(
+ xid,
+ flags,
+ tableId,
+ outPort,
+ outGroup,
+ cookie,
+ cookieMask,
+ match
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFAggregateStatsRequest> {
+ @Override
+ public OFAggregateStatsRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 18
+ byte type = bb.readByte();
+ if(type != (byte) 0x12)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REQUEST(18), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 2
+ short statsType = bb.readShort();
+ if(statsType != (short) 0x2)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.AGGREGATE(2), got="+statsType);
+ Set<OFStatsRequestFlags> flags = OFStatsRequestFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ TableId tableId = TableId.readByte(bb);
+ // pad: 3 bytes
+ bb.skipBytes(3);
+ OFPort outPort = OFPort.read4Bytes(bb);
+ OFGroup outGroup = OFGroup.read4Bytes(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ U64 cookie = U64.ofRaw(bb.readLong());
+ U64 cookieMask = U64.ofRaw(bb.readLong());
+ Match match = ChannelUtilsVer13.readOFMatch(bb);
+
+ OFAggregateStatsRequestVer13 aggregateStatsRequestVer13 = new OFAggregateStatsRequestVer13(
+ xid,
+ flags,
+ tableId,
+ outPort,
+ outGroup,
+ cookie,
+ cookieMask,
+ match
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", aggregateStatsRequestVer13);
+ return aggregateStatsRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFAggregateStatsRequestVer13Funnel FUNNEL = new OFAggregateStatsRequestVer13Funnel();
+ static class OFAggregateStatsRequestVer13Funnel implements Funnel<OFAggregateStatsRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFAggregateStatsRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 18
+ sink.putByte((byte) 0x12);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property statsType = 2
+ sink.putShort((short) 0x2);
+ OFStatsRequestFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ message.tableId.putTo(sink);
+ // skip pad (3 bytes)
+ message.outPort.putTo(sink);
+ message.outGroup.putTo(sink);
+ // skip pad (4 bytes)
+ message.cookie.putTo(sink);
+ message.cookieMask.putTo(sink);
+ message.match.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFAggregateStatsRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFAggregateStatsRequestVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 18
+ bb.writeByte((byte) 0x12);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 2
+ bb.writeShort((short) 0x2);
+ OFStatsRequestFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ message.tableId.writeByte(bb);
+ // pad: 3 bytes
+ bb.writeZero(3);
+ message.outPort.write4Bytes(bb);
+ message.outGroup.write4Bytes(bb);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ bb.writeLong(message.cookie.getValue());
+ bb.writeLong(message.cookieMask.getValue());
+ message.match.writeTo(bb);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFAggregateStatsRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("tableId=").append(tableId);
+ b.append(", ");
+ b.append("outPort=").append(outPort);
+ b.append(", ");
+ b.append("outGroup=").append(outGroup);
+ b.append(", ");
+ b.append("cookie=").append(cookie);
+ b.append(", ");
+ b.append("cookieMask=").append(cookieMask);
+ b.append(", ");
+ b.append("match=").append(match);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFAggregateStatsRequestVer13 other = (OFAggregateStatsRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if (tableId == null) {
+ if (other.tableId != null)
+ return false;
+ } else if (!tableId.equals(other.tableId))
+ return false;
+ if (outPort == null) {
+ if (other.outPort != null)
+ return false;
+ } else if (!outPort.equals(other.outPort))
+ return false;
+ if (outGroup == null) {
+ if (other.outGroup != null)
+ return false;
+ } else if (!outGroup.equals(other.outGroup))
+ return false;
+ if (cookie == null) {
+ if (other.cookie != null)
+ return false;
+ } else if (!cookie.equals(other.cookie))
+ return false;
+ if (cookieMask == null) {
+ if (other.cookieMask != null)
+ return false;
+ } else if (!cookieMask.equals(other.cookieMask))
+ return false;
+ if (match == null) {
+ if (other.match != null)
+ return false;
+ } else if (!match.equals(other.match))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * result + ((tableId == null) ? 0 : tableId.hashCode());
+ result = prime * result + ((outPort == null) ? 0 : outPort.hashCode());
+ result = prime * result + ((outGroup == null) ? 0 : outGroup.hashCode());
+ result = prime * result + ((cookie == null) ? 0 : cookie.hashCode());
+ result = prime * result + ((cookieMask == null) ? 0 : cookieMask.hashCode());
+ result = prime * result + ((match == null) ? 0 : match.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFAsyncGetReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFAsyncGetReplyVer13.java
new file mode 100644
index 0000000..6eb86cc
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFAsyncGetReplyVer13.java
@@ -0,0 +1,550 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFAsyncGetReplyVer13 implements OFAsyncGetReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFAsyncGetReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 32;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static long DEFAULT_PACKET_IN_MASK_EQUAL_MASTER = 0x0L;
+ private final static long DEFAULT_PACKET_IN_MASK_SLAVE = 0x0L;
+ private final static long DEFAULT_PORT_STATUS_MASK_EQUAL_MASTER = 0x0L;
+ private final static long DEFAULT_PORT_STATUS_MASK_SLAVE = 0x0L;
+ private final static long DEFAULT_FLOW_REMOVED_MASK_EQUAL_MASTER = 0x0L;
+ private final static long DEFAULT_FLOW_REMOVED_MASK_SLAVE = 0x0L;
+
+ // OF message fields
+ private final long xid;
+ private final long packetInMaskEqualMaster;
+ private final long packetInMaskSlave;
+ private final long portStatusMaskEqualMaster;
+ private final long portStatusMaskSlave;
+ private final long flowRemovedMaskEqualMaster;
+ private final long flowRemovedMaskSlave;
+//
+ // Immutable default instance
+ final static OFAsyncGetReplyVer13 DEFAULT = new OFAsyncGetReplyVer13(
+ DEFAULT_XID, DEFAULT_PACKET_IN_MASK_EQUAL_MASTER, DEFAULT_PACKET_IN_MASK_SLAVE, DEFAULT_PORT_STATUS_MASK_EQUAL_MASTER, DEFAULT_PORT_STATUS_MASK_SLAVE, DEFAULT_FLOW_REMOVED_MASK_EQUAL_MASTER, DEFAULT_FLOW_REMOVED_MASK_SLAVE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFAsyncGetReplyVer13(long xid, long packetInMaskEqualMaster, long packetInMaskSlave, long portStatusMaskEqualMaster, long portStatusMaskSlave, long flowRemovedMaskEqualMaster, long flowRemovedMaskSlave) {
+ this.xid = xid;
+ this.packetInMaskEqualMaster = packetInMaskEqualMaster;
+ this.packetInMaskSlave = packetInMaskSlave;
+ this.portStatusMaskEqualMaster = portStatusMaskEqualMaster;
+ this.portStatusMaskSlave = portStatusMaskSlave;
+ this.flowRemovedMaskEqualMaster = flowRemovedMaskEqualMaster;
+ this.flowRemovedMaskSlave = flowRemovedMaskSlave;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.GET_ASYNC_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public long getPacketInMaskEqualMaster() {
+ return packetInMaskEqualMaster;
+ }
+
+ @Override
+ public long getPacketInMaskSlave() {
+ return packetInMaskSlave;
+ }
+
+ @Override
+ public long getPortStatusMaskEqualMaster() {
+ return portStatusMaskEqualMaster;
+ }
+
+ @Override
+ public long getPortStatusMaskSlave() {
+ return portStatusMaskSlave;
+ }
+
+ @Override
+ public long getFlowRemovedMaskEqualMaster() {
+ return flowRemovedMaskEqualMaster;
+ }
+
+ @Override
+ public long getFlowRemovedMaskSlave() {
+ return flowRemovedMaskSlave;
+ }
+
+
+
+ public OFAsyncGetReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFAsyncGetReply.Builder {
+ final OFAsyncGetReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean packetInMaskEqualMasterSet;
+ private long packetInMaskEqualMaster;
+ private boolean packetInMaskSlaveSet;
+ private long packetInMaskSlave;
+ private boolean portStatusMaskEqualMasterSet;
+ private long portStatusMaskEqualMaster;
+ private boolean portStatusMaskSlaveSet;
+ private long portStatusMaskSlave;
+ private boolean flowRemovedMaskEqualMasterSet;
+ private long flowRemovedMaskEqualMaster;
+ private boolean flowRemovedMaskSlaveSet;
+ private long flowRemovedMaskSlave;
+
+ BuilderWithParent(OFAsyncGetReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.GET_ASYNC_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFAsyncGetReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getPacketInMaskEqualMaster() {
+ return packetInMaskEqualMaster;
+ }
+
+ @Override
+ public OFAsyncGetReply.Builder setPacketInMaskEqualMaster(long packetInMaskEqualMaster) {
+ this.packetInMaskEqualMaster = packetInMaskEqualMaster;
+ this.packetInMaskEqualMasterSet = true;
+ return this;
+ }
+ @Override
+ public long getPacketInMaskSlave() {
+ return packetInMaskSlave;
+ }
+
+ @Override
+ public OFAsyncGetReply.Builder setPacketInMaskSlave(long packetInMaskSlave) {
+ this.packetInMaskSlave = packetInMaskSlave;
+ this.packetInMaskSlaveSet = true;
+ return this;
+ }
+ @Override
+ public long getPortStatusMaskEqualMaster() {
+ return portStatusMaskEqualMaster;
+ }
+
+ @Override
+ public OFAsyncGetReply.Builder setPortStatusMaskEqualMaster(long portStatusMaskEqualMaster) {
+ this.portStatusMaskEqualMaster = portStatusMaskEqualMaster;
+ this.portStatusMaskEqualMasterSet = true;
+ return this;
+ }
+ @Override
+ public long getPortStatusMaskSlave() {
+ return portStatusMaskSlave;
+ }
+
+ @Override
+ public OFAsyncGetReply.Builder setPortStatusMaskSlave(long portStatusMaskSlave) {
+ this.portStatusMaskSlave = portStatusMaskSlave;
+ this.portStatusMaskSlaveSet = true;
+ return this;
+ }
+ @Override
+ public long getFlowRemovedMaskEqualMaster() {
+ return flowRemovedMaskEqualMaster;
+ }
+
+ @Override
+ public OFAsyncGetReply.Builder setFlowRemovedMaskEqualMaster(long flowRemovedMaskEqualMaster) {
+ this.flowRemovedMaskEqualMaster = flowRemovedMaskEqualMaster;
+ this.flowRemovedMaskEqualMasterSet = true;
+ return this;
+ }
+ @Override
+ public long getFlowRemovedMaskSlave() {
+ return flowRemovedMaskSlave;
+ }
+
+ @Override
+ public OFAsyncGetReply.Builder setFlowRemovedMaskSlave(long flowRemovedMaskSlave) {
+ this.flowRemovedMaskSlave = flowRemovedMaskSlave;
+ this.flowRemovedMaskSlaveSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFAsyncGetReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ long packetInMaskEqualMaster = this.packetInMaskEqualMasterSet ? this.packetInMaskEqualMaster : parentMessage.packetInMaskEqualMaster;
+ long packetInMaskSlave = this.packetInMaskSlaveSet ? this.packetInMaskSlave : parentMessage.packetInMaskSlave;
+ long portStatusMaskEqualMaster = this.portStatusMaskEqualMasterSet ? this.portStatusMaskEqualMaster : parentMessage.portStatusMaskEqualMaster;
+ long portStatusMaskSlave = this.portStatusMaskSlaveSet ? this.portStatusMaskSlave : parentMessage.portStatusMaskSlave;
+ long flowRemovedMaskEqualMaster = this.flowRemovedMaskEqualMasterSet ? this.flowRemovedMaskEqualMaster : parentMessage.flowRemovedMaskEqualMaster;
+ long flowRemovedMaskSlave = this.flowRemovedMaskSlaveSet ? this.flowRemovedMaskSlave : parentMessage.flowRemovedMaskSlave;
+
+ //
+ return new OFAsyncGetReplyVer13(
+ xid,
+ packetInMaskEqualMaster,
+ packetInMaskSlave,
+ portStatusMaskEqualMaster,
+ portStatusMaskSlave,
+ flowRemovedMaskEqualMaster,
+ flowRemovedMaskSlave
+ );
+ }
+
+ }
+
+ static class Builder implements OFAsyncGetReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean packetInMaskEqualMasterSet;
+ private long packetInMaskEqualMaster;
+ private boolean packetInMaskSlaveSet;
+ private long packetInMaskSlave;
+ private boolean portStatusMaskEqualMasterSet;
+ private long portStatusMaskEqualMaster;
+ private boolean portStatusMaskSlaveSet;
+ private long portStatusMaskSlave;
+ private boolean flowRemovedMaskEqualMasterSet;
+ private long flowRemovedMaskEqualMaster;
+ private boolean flowRemovedMaskSlaveSet;
+ private long flowRemovedMaskSlave;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.GET_ASYNC_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFAsyncGetReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getPacketInMaskEqualMaster() {
+ return packetInMaskEqualMaster;
+ }
+
+ @Override
+ public OFAsyncGetReply.Builder setPacketInMaskEqualMaster(long packetInMaskEqualMaster) {
+ this.packetInMaskEqualMaster = packetInMaskEqualMaster;
+ this.packetInMaskEqualMasterSet = true;
+ return this;
+ }
+ @Override
+ public long getPacketInMaskSlave() {
+ return packetInMaskSlave;
+ }
+
+ @Override
+ public OFAsyncGetReply.Builder setPacketInMaskSlave(long packetInMaskSlave) {
+ this.packetInMaskSlave = packetInMaskSlave;
+ this.packetInMaskSlaveSet = true;
+ return this;
+ }
+ @Override
+ public long getPortStatusMaskEqualMaster() {
+ return portStatusMaskEqualMaster;
+ }
+
+ @Override
+ public OFAsyncGetReply.Builder setPortStatusMaskEqualMaster(long portStatusMaskEqualMaster) {
+ this.portStatusMaskEqualMaster = portStatusMaskEqualMaster;
+ this.portStatusMaskEqualMasterSet = true;
+ return this;
+ }
+ @Override
+ public long getPortStatusMaskSlave() {
+ return portStatusMaskSlave;
+ }
+
+ @Override
+ public OFAsyncGetReply.Builder setPortStatusMaskSlave(long portStatusMaskSlave) {
+ this.portStatusMaskSlave = portStatusMaskSlave;
+ this.portStatusMaskSlaveSet = true;
+ return this;
+ }
+ @Override
+ public long getFlowRemovedMaskEqualMaster() {
+ return flowRemovedMaskEqualMaster;
+ }
+
+ @Override
+ public OFAsyncGetReply.Builder setFlowRemovedMaskEqualMaster(long flowRemovedMaskEqualMaster) {
+ this.flowRemovedMaskEqualMaster = flowRemovedMaskEqualMaster;
+ this.flowRemovedMaskEqualMasterSet = true;
+ return this;
+ }
+ @Override
+ public long getFlowRemovedMaskSlave() {
+ return flowRemovedMaskSlave;
+ }
+
+ @Override
+ public OFAsyncGetReply.Builder setFlowRemovedMaskSlave(long flowRemovedMaskSlave) {
+ this.flowRemovedMaskSlave = flowRemovedMaskSlave;
+ this.flowRemovedMaskSlaveSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFAsyncGetReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ long packetInMaskEqualMaster = this.packetInMaskEqualMasterSet ? this.packetInMaskEqualMaster : DEFAULT_PACKET_IN_MASK_EQUAL_MASTER;
+ long packetInMaskSlave = this.packetInMaskSlaveSet ? this.packetInMaskSlave : DEFAULT_PACKET_IN_MASK_SLAVE;
+ long portStatusMaskEqualMaster = this.portStatusMaskEqualMasterSet ? this.portStatusMaskEqualMaster : DEFAULT_PORT_STATUS_MASK_EQUAL_MASTER;
+ long portStatusMaskSlave = this.portStatusMaskSlaveSet ? this.portStatusMaskSlave : DEFAULT_PORT_STATUS_MASK_SLAVE;
+ long flowRemovedMaskEqualMaster = this.flowRemovedMaskEqualMasterSet ? this.flowRemovedMaskEqualMaster : DEFAULT_FLOW_REMOVED_MASK_EQUAL_MASTER;
+ long flowRemovedMaskSlave = this.flowRemovedMaskSlaveSet ? this.flowRemovedMaskSlave : DEFAULT_FLOW_REMOVED_MASK_SLAVE;
+
+
+ return new OFAsyncGetReplyVer13(
+ xid,
+ packetInMaskEqualMaster,
+ packetInMaskSlave,
+ portStatusMaskEqualMaster,
+ portStatusMaskSlave,
+ flowRemovedMaskEqualMaster,
+ flowRemovedMaskSlave
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFAsyncGetReply> {
+ @Override
+ public OFAsyncGetReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 27
+ byte type = bb.readByte();
+ if(type != (byte) 0x1b)
+ throw new OFParseError("Wrong type: Expected=OFType.GET_ASYNC_REPLY(27), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 32)
+ throw new OFParseError("Wrong length: Expected=32(32), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ long packetInMaskEqualMaster = U32.f(bb.readInt());
+ long packetInMaskSlave = U32.f(bb.readInt());
+ long portStatusMaskEqualMaster = U32.f(bb.readInt());
+ long portStatusMaskSlave = U32.f(bb.readInt());
+ long flowRemovedMaskEqualMaster = U32.f(bb.readInt());
+ long flowRemovedMaskSlave = U32.f(bb.readInt());
+
+ OFAsyncGetReplyVer13 asyncGetReplyVer13 = new OFAsyncGetReplyVer13(
+ xid,
+ packetInMaskEqualMaster,
+ packetInMaskSlave,
+ portStatusMaskEqualMaster,
+ portStatusMaskSlave,
+ flowRemovedMaskEqualMaster,
+ flowRemovedMaskSlave
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", asyncGetReplyVer13);
+ return asyncGetReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFAsyncGetReplyVer13Funnel FUNNEL = new OFAsyncGetReplyVer13Funnel();
+ static class OFAsyncGetReplyVer13Funnel implements Funnel<OFAsyncGetReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFAsyncGetReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 27
+ sink.putByte((byte) 0x1b);
+ // fixed value property length = 32
+ sink.putShort((short) 0x20);
+ sink.putLong(message.xid);
+ sink.putLong(message.packetInMaskEqualMaster);
+ sink.putLong(message.packetInMaskSlave);
+ sink.putLong(message.portStatusMaskEqualMaster);
+ sink.putLong(message.portStatusMaskSlave);
+ sink.putLong(message.flowRemovedMaskEqualMaster);
+ sink.putLong(message.flowRemovedMaskSlave);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFAsyncGetReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFAsyncGetReplyVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 27
+ bb.writeByte((byte) 0x1b);
+ // fixed value property length = 32
+ bb.writeShort((short) 0x20);
+ bb.writeInt(U32.t(message.xid));
+ bb.writeInt(U32.t(message.packetInMaskEqualMaster));
+ bb.writeInt(U32.t(message.packetInMaskSlave));
+ bb.writeInt(U32.t(message.portStatusMaskEqualMaster));
+ bb.writeInt(U32.t(message.portStatusMaskSlave));
+ bb.writeInt(U32.t(message.flowRemovedMaskEqualMaster));
+ bb.writeInt(U32.t(message.flowRemovedMaskSlave));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFAsyncGetReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("packetInMaskEqualMaster=").append(packetInMaskEqualMaster);
+ b.append(", ");
+ b.append("packetInMaskSlave=").append(packetInMaskSlave);
+ b.append(", ");
+ b.append("portStatusMaskEqualMaster=").append(portStatusMaskEqualMaster);
+ b.append(", ");
+ b.append("portStatusMaskSlave=").append(portStatusMaskSlave);
+ b.append(", ");
+ b.append("flowRemovedMaskEqualMaster=").append(flowRemovedMaskEqualMaster);
+ b.append(", ");
+ b.append("flowRemovedMaskSlave=").append(flowRemovedMaskSlave);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFAsyncGetReplyVer13 other = (OFAsyncGetReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if( packetInMaskEqualMaster != other.packetInMaskEqualMaster)
+ return false;
+ if( packetInMaskSlave != other.packetInMaskSlave)
+ return false;
+ if( portStatusMaskEqualMaster != other.portStatusMaskEqualMaster)
+ return false;
+ if( portStatusMaskSlave != other.portStatusMaskSlave)
+ return false;
+ if( flowRemovedMaskEqualMaster != other.flowRemovedMaskEqualMaster)
+ return false;
+ if( flowRemovedMaskSlave != other.flowRemovedMaskSlave)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * (int) (packetInMaskEqualMaster ^ (packetInMaskEqualMaster >>> 32));
+ result = prime * (int) (packetInMaskSlave ^ (packetInMaskSlave >>> 32));
+ result = prime * (int) (portStatusMaskEqualMaster ^ (portStatusMaskEqualMaster >>> 32));
+ result = prime * (int) (portStatusMaskSlave ^ (portStatusMaskSlave >>> 32));
+ result = prime * (int) (flowRemovedMaskEqualMaster ^ (flowRemovedMaskEqualMaster >>> 32));
+ result = prime * (int) (flowRemovedMaskSlave ^ (flowRemovedMaskSlave >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFAsyncGetRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFAsyncGetRequestVer13.java
new file mode 100644
index 0000000..a430e07
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFAsyncGetRequestVer13.java
@@ -0,0 +1,550 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFAsyncGetRequestVer13 implements OFAsyncGetRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFAsyncGetRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 32;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static long DEFAULT_PACKET_IN_MASK_EQUAL_MASTER = 0x0L;
+ private final static long DEFAULT_PACKET_IN_MASK_SLAVE = 0x0L;
+ private final static long DEFAULT_PORT_STATUS_MASK_EQUAL_MASTER = 0x0L;
+ private final static long DEFAULT_PORT_STATUS_MASK_SLAVE = 0x0L;
+ private final static long DEFAULT_FLOW_REMOVED_MASK_EQUAL_MASTER = 0x0L;
+ private final static long DEFAULT_FLOW_REMOVED_MASK_SLAVE = 0x0L;
+
+ // OF message fields
+ private final long xid;
+ private final long packetInMaskEqualMaster;
+ private final long packetInMaskSlave;
+ private final long portStatusMaskEqualMaster;
+ private final long portStatusMaskSlave;
+ private final long flowRemovedMaskEqualMaster;
+ private final long flowRemovedMaskSlave;
+//
+ // Immutable default instance
+ final static OFAsyncGetRequestVer13 DEFAULT = new OFAsyncGetRequestVer13(
+ DEFAULT_XID, DEFAULT_PACKET_IN_MASK_EQUAL_MASTER, DEFAULT_PACKET_IN_MASK_SLAVE, DEFAULT_PORT_STATUS_MASK_EQUAL_MASTER, DEFAULT_PORT_STATUS_MASK_SLAVE, DEFAULT_FLOW_REMOVED_MASK_EQUAL_MASTER, DEFAULT_FLOW_REMOVED_MASK_SLAVE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFAsyncGetRequestVer13(long xid, long packetInMaskEqualMaster, long packetInMaskSlave, long portStatusMaskEqualMaster, long portStatusMaskSlave, long flowRemovedMaskEqualMaster, long flowRemovedMaskSlave) {
+ this.xid = xid;
+ this.packetInMaskEqualMaster = packetInMaskEqualMaster;
+ this.packetInMaskSlave = packetInMaskSlave;
+ this.portStatusMaskEqualMaster = portStatusMaskEqualMaster;
+ this.portStatusMaskSlave = portStatusMaskSlave;
+ this.flowRemovedMaskEqualMaster = flowRemovedMaskEqualMaster;
+ this.flowRemovedMaskSlave = flowRemovedMaskSlave;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.GET_ASYNC_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public long getPacketInMaskEqualMaster() {
+ return packetInMaskEqualMaster;
+ }
+
+ @Override
+ public long getPacketInMaskSlave() {
+ return packetInMaskSlave;
+ }
+
+ @Override
+ public long getPortStatusMaskEqualMaster() {
+ return portStatusMaskEqualMaster;
+ }
+
+ @Override
+ public long getPortStatusMaskSlave() {
+ return portStatusMaskSlave;
+ }
+
+ @Override
+ public long getFlowRemovedMaskEqualMaster() {
+ return flowRemovedMaskEqualMaster;
+ }
+
+ @Override
+ public long getFlowRemovedMaskSlave() {
+ return flowRemovedMaskSlave;
+ }
+
+
+
+ public OFAsyncGetRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFAsyncGetRequest.Builder {
+ final OFAsyncGetRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean packetInMaskEqualMasterSet;
+ private long packetInMaskEqualMaster;
+ private boolean packetInMaskSlaveSet;
+ private long packetInMaskSlave;
+ private boolean portStatusMaskEqualMasterSet;
+ private long portStatusMaskEqualMaster;
+ private boolean portStatusMaskSlaveSet;
+ private long portStatusMaskSlave;
+ private boolean flowRemovedMaskEqualMasterSet;
+ private long flowRemovedMaskEqualMaster;
+ private boolean flowRemovedMaskSlaveSet;
+ private long flowRemovedMaskSlave;
+
+ BuilderWithParent(OFAsyncGetRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.GET_ASYNC_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFAsyncGetRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getPacketInMaskEqualMaster() {
+ return packetInMaskEqualMaster;
+ }
+
+ @Override
+ public OFAsyncGetRequest.Builder setPacketInMaskEqualMaster(long packetInMaskEqualMaster) {
+ this.packetInMaskEqualMaster = packetInMaskEqualMaster;
+ this.packetInMaskEqualMasterSet = true;
+ return this;
+ }
+ @Override
+ public long getPacketInMaskSlave() {
+ return packetInMaskSlave;
+ }
+
+ @Override
+ public OFAsyncGetRequest.Builder setPacketInMaskSlave(long packetInMaskSlave) {
+ this.packetInMaskSlave = packetInMaskSlave;
+ this.packetInMaskSlaveSet = true;
+ return this;
+ }
+ @Override
+ public long getPortStatusMaskEqualMaster() {
+ return portStatusMaskEqualMaster;
+ }
+
+ @Override
+ public OFAsyncGetRequest.Builder setPortStatusMaskEqualMaster(long portStatusMaskEqualMaster) {
+ this.portStatusMaskEqualMaster = portStatusMaskEqualMaster;
+ this.portStatusMaskEqualMasterSet = true;
+ return this;
+ }
+ @Override
+ public long getPortStatusMaskSlave() {
+ return portStatusMaskSlave;
+ }
+
+ @Override
+ public OFAsyncGetRequest.Builder setPortStatusMaskSlave(long portStatusMaskSlave) {
+ this.portStatusMaskSlave = portStatusMaskSlave;
+ this.portStatusMaskSlaveSet = true;
+ return this;
+ }
+ @Override
+ public long getFlowRemovedMaskEqualMaster() {
+ return flowRemovedMaskEqualMaster;
+ }
+
+ @Override
+ public OFAsyncGetRequest.Builder setFlowRemovedMaskEqualMaster(long flowRemovedMaskEqualMaster) {
+ this.flowRemovedMaskEqualMaster = flowRemovedMaskEqualMaster;
+ this.flowRemovedMaskEqualMasterSet = true;
+ return this;
+ }
+ @Override
+ public long getFlowRemovedMaskSlave() {
+ return flowRemovedMaskSlave;
+ }
+
+ @Override
+ public OFAsyncGetRequest.Builder setFlowRemovedMaskSlave(long flowRemovedMaskSlave) {
+ this.flowRemovedMaskSlave = flowRemovedMaskSlave;
+ this.flowRemovedMaskSlaveSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFAsyncGetRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ long packetInMaskEqualMaster = this.packetInMaskEqualMasterSet ? this.packetInMaskEqualMaster : parentMessage.packetInMaskEqualMaster;
+ long packetInMaskSlave = this.packetInMaskSlaveSet ? this.packetInMaskSlave : parentMessage.packetInMaskSlave;
+ long portStatusMaskEqualMaster = this.portStatusMaskEqualMasterSet ? this.portStatusMaskEqualMaster : parentMessage.portStatusMaskEqualMaster;
+ long portStatusMaskSlave = this.portStatusMaskSlaveSet ? this.portStatusMaskSlave : parentMessage.portStatusMaskSlave;
+ long flowRemovedMaskEqualMaster = this.flowRemovedMaskEqualMasterSet ? this.flowRemovedMaskEqualMaster : parentMessage.flowRemovedMaskEqualMaster;
+ long flowRemovedMaskSlave = this.flowRemovedMaskSlaveSet ? this.flowRemovedMaskSlave : parentMessage.flowRemovedMaskSlave;
+
+ //
+ return new OFAsyncGetRequestVer13(
+ xid,
+ packetInMaskEqualMaster,
+ packetInMaskSlave,
+ portStatusMaskEqualMaster,
+ portStatusMaskSlave,
+ flowRemovedMaskEqualMaster,
+ flowRemovedMaskSlave
+ );
+ }
+
+ }
+
+ static class Builder implements OFAsyncGetRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean packetInMaskEqualMasterSet;
+ private long packetInMaskEqualMaster;
+ private boolean packetInMaskSlaveSet;
+ private long packetInMaskSlave;
+ private boolean portStatusMaskEqualMasterSet;
+ private long portStatusMaskEqualMaster;
+ private boolean portStatusMaskSlaveSet;
+ private long portStatusMaskSlave;
+ private boolean flowRemovedMaskEqualMasterSet;
+ private long flowRemovedMaskEqualMaster;
+ private boolean flowRemovedMaskSlaveSet;
+ private long flowRemovedMaskSlave;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.GET_ASYNC_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFAsyncGetRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getPacketInMaskEqualMaster() {
+ return packetInMaskEqualMaster;
+ }
+
+ @Override
+ public OFAsyncGetRequest.Builder setPacketInMaskEqualMaster(long packetInMaskEqualMaster) {
+ this.packetInMaskEqualMaster = packetInMaskEqualMaster;
+ this.packetInMaskEqualMasterSet = true;
+ return this;
+ }
+ @Override
+ public long getPacketInMaskSlave() {
+ return packetInMaskSlave;
+ }
+
+ @Override
+ public OFAsyncGetRequest.Builder setPacketInMaskSlave(long packetInMaskSlave) {
+ this.packetInMaskSlave = packetInMaskSlave;
+ this.packetInMaskSlaveSet = true;
+ return this;
+ }
+ @Override
+ public long getPortStatusMaskEqualMaster() {
+ return portStatusMaskEqualMaster;
+ }
+
+ @Override
+ public OFAsyncGetRequest.Builder setPortStatusMaskEqualMaster(long portStatusMaskEqualMaster) {
+ this.portStatusMaskEqualMaster = portStatusMaskEqualMaster;
+ this.portStatusMaskEqualMasterSet = true;
+ return this;
+ }
+ @Override
+ public long getPortStatusMaskSlave() {
+ return portStatusMaskSlave;
+ }
+
+ @Override
+ public OFAsyncGetRequest.Builder setPortStatusMaskSlave(long portStatusMaskSlave) {
+ this.portStatusMaskSlave = portStatusMaskSlave;
+ this.portStatusMaskSlaveSet = true;
+ return this;
+ }
+ @Override
+ public long getFlowRemovedMaskEqualMaster() {
+ return flowRemovedMaskEqualMaster;
+ }
+
+ @Override
+ public OFAsyncGetRequest.Builder setFlowRemovedMaskEqualMaster(long flowRemovedMaskEqualMaster) {
+ this.flowRemovedMaskEqualMaster = flowRemovedMaskEqualMaster;
+ this.flowRemovedMaskEqualMasterSet = true;
+ return this;
+ }
+ @Override
+ public long getFlowRemovedMaskSlave() {
+ return flowRemovedMaskSlave;
+ }
+
+ @Override
+ public OFAsyncGetRequest.Builder setFlowRemovedMaskSlave(long flowRemovedMaskSlave) {
+ this.flowRemovedMaskSlave = flowRemovedMaskSlave;
+ this.flowRemovedMaskSlaveSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFAsyncGetRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ long packetInMaskEqualMaster = this.packetInMaskEqualMasterSet ? this.packetInMaskEqualMaster : DEFAULT_PACKET_IN_MASK_EQUAL_MASTER;
+ long packetInMaskSlave = this.packetInMaskSlaveSet ? this.packetInMaskSlave : DEFAULT_PACKET_IN_MASK_SLAVE;
+ long portStatusMaskEqualMaster = this.portStatusMaskEqualMasterSet ? this.portStatusMaskEqualMaster : DEFAULT_PORT_STATUS_MASK_EQUAL_MASTER;
+ long portStatusMaskSlave = this.portStatusMaskSlaveSet ? this.portStatusMaskSlave : DEFAULT_PORT_STATUS_MASK_SLAVE;
+ long flowRemovedMaskEqualMaster = this.flowRemovedMaskEqualMasterSet ? this.flowRemovedMaskEqualMaster : DEFAULT_FLOW_REMOVED_MASK_EQUAL_MASTER;
+ long flowRemovedMaskSlave = this.flowRemovedMaskSlaveSet ? this.flowRemovedMaskSlave : DEFAULT_FLOW_REMOVED_MASK_SLAVE;
+
+
+ return new OFAsyncGetRequestVer13(
+ xid,
+ packetInMaskEqualMaster,
+ packetInMaskSlave,
+ portStatusMaskEqualMaster,
+ portStatusMaskSlave,
+ flowRemovedMaskEqualMaster,
+ flowRemovedMaskSlave
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFAsyncGetRequest> {
+ @Override
+ public OFAsyncGetRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 26
+ byte type = bb.readByte();
+ if(type != (byte) 0x1a)
+ throw new OFParseError("Wrong type: Expected=OFType.GET_ASYNC_REQUEST(26), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 32)
+ throw new OFParseError("Wrong length: Expected=32(32), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ long packetInMaskEqualMaster = U32.f(bb.readInt());
+ long packetInMaskSlave = U32.f(bb.readInt());
+ long portStatusMaskEqualMaster = U32.f(bb.readInt());
+ long portStatusMaskSlave = U32.f(bb.readInt());
+ long flowRemovedMaskEqualMaster = U32.f(bb.readInt());
+ long flowRemovedMaskSlave = U32.f(bb.readInt());
+
+ OFAsyncGetRequestVer13 asyncGetRequestVer13 = new OFAsyncGetRequestVer13(
+ xid,
+ packetInMaskEqualMaster,
+ packetInMaskSlave,
+ portStatusMaskEqualMaster,
+ portStatusMaskSlave,
+ flowRemovedMaskEqualMaster,
+ flowRemovedMaskSlave
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", asyncGetRequestVer13);
+ return asyncGetRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFAsyncGetRequestVer13Funnel FUNNEL = new OFAsyncGetRequestVer13Funnel();
+ static class OFAsyncGetRequestVer13Funnel implements Funnel<OFAsyncGetRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFAsyncGetRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 26
+ sink.putByte((byte) 0x1a);
+ // fixed value property length = 32
+ sink.putShort((short) 0x20);
+ sink.putLong(message.xid);
+ sink.putLong(message.packetInMaskEqualMaster);
+ sink.putLong(message.packetInMaskSlave);
+ sink.putLong(message.portStatusMaskEqualMaster);
+ sink.putLong(message.portStatusMaskSlave);
+ sink.putLong(message.flowRemovedMaskEqualMaster);
+ sink.putLong(message.flowRemovedMaskSlave);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFAsyncGetRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFAsyncGetRequestVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 26
+ bb.writeByte((byte) 0x1a);
+ // fixed value property length = 32
+ bb.writeShort((short) 0x20);
+ bb.writeInt(U32.t(message.xid));
+ bb.writeInt(U32.t(message.packetInMaskEqualMaster));
+ bb.writeInt(U32.t(message.packetInMaskSlave));
+ bb.writeInt(U32.t(message.portStatusMaskEqualMaster));
+ bb.writeInt(U32.t(message.portStatusMaskSlave));
+ bb.writeInt(U32.t(message.flowRemovedMaskEqualMaster));
+ bb.writeInt(U32.t(message.flowRemovedMaskSlave));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFAsyncGetRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("packetInMaskEqualMaster=").append(packetInMaskEqualMaster);
+ b.append(", ");
+ b.append("packetInMaskSlave=").append(packetInMaskSlave);
+ b.append(", ");
+ b.append("portStatusMaskEqualMaster=").append(portStatusMaskEqualMaster);
+ b.append(", ");
+ b.append("portStatusMaskSlave=").append(portStatusMaskSlave);
+ b.append(", ");
+ b.append("flowRemovedMaskEqualMaster=").append(flowRemovedMaskEqualMaster);
+ b.append(", ");
+ b.append("flowRemovedMaskSlave=").append(flowRemovedMaskSlave);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFAsyncGetRequestVer13 other = (OFAsyncGetRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if( packetInMaskEqualMaster != other.packetInMaskEqualMaster)
+ return false;
+ if( packetInMaskSlave != other.packetInMaskSlave)
+ return false;
+ if( portStatusMaskEqualMaster != other.portStatusMaskEqualMaster)
+ return false;
+ if( portStatusMaskSlave != other.portStatusMaskSlave)
+ return false;
+ if( flowRemovedMaskEqualMaster != other.flowRemovedMaskEqualMaster)
+ return false;
+ if( flowRemovedMaskSlave != other.flowRemovedMaskSlave)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * (int) (packetInMaskEqualMaster ^ (packetInMaskEqualMaster >>> 32));
+ result = prime * (int) (packetInMaskSlave ^ (packetInMaskSlave >>> 32));
+ result = prime * (int) (portStatusMaskEqualMaster ^ (portStatusMaskEqualMaster >>> 32));
+ result = prime * (int) (portStatusMaskSlave ^ (portStatusMaskSlave >>> 32));
+ result = prime * (int) (flowRemovedMaskEqualMaster ^ (flowRemovedMaskEqualMaster >>> 32));
+ result = prime * (int) (flowRemovedMaskSlave ^ (flowRemovedMaskSlave >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFAsyncSetVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFAsyncSetVer13.java
new file mode 100644
index 0000000..9bc7524
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFAsyncSetVer13.java
@@ -0,0 +1,550 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import java.util.Set;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFAsyncSetVer13 implements OFAsyncSet {
+ private static final Logger logger = LoggerFactory.getLogger(OFAsyncSetVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 32;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static long DEFAULT_PACKET_IN_MASK_EQUAL_MASTER = 0x0L;
+ private final static long DEFAULT_PACKET_IN_MASK_SLAVE = 0x0L;
+ private final static long DEFAULT_PORT_STATUS_MASK_EQUAL_MASTER = 0x0L;
+ private final static long DEFAULT_PORT_STATUS_MASK_SLAVE = 0x0L;
+ private final static long DEFAULT_FLOW_REMOVED_MASK_EQUAL_MASTER = 0x0L;
+ private final static long DEFAULT_FLOW_REMOVED_MASK_SLAVE = 0x0L;
+
+ // OF message fields
+ private final long xid;
+ private final long packetInMaskEqualMaster;
+ private final long packetInMaskSlave;
+ private final long portStatusMaskEqualMaster;
+ private final long portStatusMaskSlave;
+ private final long flowRemovedMaskEqualMaster;
+ private final long flowRemovedMaskSlave;
+//
+ // Immutable default instance
+ final static OFAsyncSetVer13 DEFAULT = new OFAsyncSetVer13(
+ DEFAULT_XID, DEFAULT_PACKET_IN_MASK_EQUAL_MASTER, DEFAULT_PACKET_IN_MASK_SLAVE, DEFAULT_PORT_STATUS_MASK_EQUAL_MASTER, DEFAULT_PORT_STATUS_MASK_SLAVE, DEFAULT_FLOW_REMOVED_MASK_EQUAL_MASTER, DEFAULT_FLOW_REMOVED_MASK_SLAVE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFAsyncSetVer13(long xid, long packetInMaskEqualMaster, long packetInMaskSlave, long portStatusMaskEqualMaster, long portStatusMaskSlave, long flowRemovedMaskEqualMaster, long flowRemovedMaskSlave) {
+ this.xid = xid;
+ this.packetInMaskEqualMaster = packetInMaskEqualMaster;
+ this.packetInMaskSlave = packetInMaskSlave;
+ this.portStatusMaskEqualMaster = portStatusMaskEqualMaster;
+ this.portStatusMaskSlave = portStatusMaskSlave;
+ this.flowRemovedMaskEqualMaster = flowRemovedMaskEqualMaster;
+ this.flowRemovedMaskSlave = flowRemovedMaskSlave;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.SET_ASYNC;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public long getPacketInMaskEqualMaster() {
+ return packetInMaskEqualMaster;
+ }
+
+ @Override
+ public long getPacketInMaskSlave() {
+ return packetInMaskSlave;
+ }
+
+ @Override
+ public long getPortStatusMaskEqualMaster() {
+ return portStatusMaskEqualMaster;
+ }
+
+ @Override
+ public long getPortStatusMaskSlave() {
+ return portStatusMaskSlave;
+ }
+
+ @Override
+ public long getFlowRemovedMaskEqualMaster() {
+ return flowRemovedMaskEqualMaster;
+ }
+
+ @Override
+ public long getFlowRemovedMaskSlave() {
+ return flowRemovedMaskSlave;
+ }
+
+
+
+ public OFAsyncSet.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFAsyncSet.Builder {
+ final OFAsyncSetVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean packetInMaskEqualMasterSet;
+ private long packetInMaskEqualMaster;
+ private boolean packetInMaskSlaveSet;
+ private long packetInMaskSlave;
+ private boolean portStatusMaskEqualMasterSet;
+ private long portStatusMaskEqualMaster;
+ private boolean portStatusMaskSlaveSet;
+ private long portStatusMaskSlave;
+ private boolean flowRemovedMaskEqualMasterSet;
+ private long flowRemovedMaskEqualMaster;
+ private boolean flowRemovedMaskSlaveSet;
+ private long flowRemovedMaskSlave;
+
+ BuilderWithParent(OFAsyncSetVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.SET_ASYNC;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFAsyncSet.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getPacketInMaskEqualMaster() {
+ return packetInMaskEqualMaster;
+ }
+
+ @Override
+ public OFAsyncSet.Builder setPacketInMaskEqualMaster(long packetInMaskEqualMaster) {
+ this.packetInMaskEqualMaster = packetInMaskEqualMaster;
+ this.packetInMaskEqualMasterSet = true;
+ return this;
+ }
+ @Override
+ public long getPacketInMaskSlave() {
+ return packetInMaskSlave;
+ }
+
+ @Override
+ public OFAsyncSet.Builder setPacketInMaskSlave(long packetInMaskSlave) {
+ this.packetInMaskSlave = packetInMaskSlave;
+ this.packetInMaskSlaveSet = true;
+ return this;
+ }
+ @Override
+ public long getPortStatusMaskEqualMaster() {
+ return portStatusMaskEqualMaster;
+ }
+
+ @Override
+ public OFAsyncSet.Builder setPortStatusMaskEqualMaster(long portStatusMaskEqualMaster) {
+ this.portStatusMaskEqualMaster = portStatusMaskEqualMaster;
+ this.portStatusMaskEqualMasterSet = true;
+ return this;
+ }
+ @Override
+ public long getPortStatusMaskSlave() {
+ return portStatusMaskSlave;
+ }
+
+ @Override
+ public OFAsyncSet.Builder setPortStatusMaskSlave(long portStatusMaskSlave) {
+ this.portStatusMaskSlave = portStatusMaskSlave;
+ this.portStatusMaskSlaveSet = true;
+ return this;
+ }
+ @Override
+ public long getFlowRemovedMaskEqualMaster() {
+ return flowRemovedMaskEqualMaster;
+ }
+
+ @Override
+ public OFAsyncSet.Builder setFlowRemovedMaskEqualMaster(long flowRemovedMaskEqualMaster) {
+ this.flowRemovedMaskEqualMaster = flowRemovedMaskEqualMaster;
+ this.flowRemovedMaskEqualMasterSet = true;
+ return this;
+ }
+ @Override
+ public long getFlowRemovedMaskSlave() {
+ return flowRemovedMaskSlave;
+ }
+
+ @Override
+ public OFAsyncSet.Builder setFlowRemovedMaskSlave(long flowRemovedMaskSlave) {
+ this.flowRemovedMaskSlave = flowRemovedMaskSlave;
+ this.flowRemovedMaskSlaveSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFAsyncSet build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ long packetInMaskEqualMaster = this.packetInMaskEqualMasterSet ? this.packetInMaskEqualMaster : parentMessage.packetInMaskEqualMaster;
+ long packetInMaskSlave = this.packetInMaskSlaveSet ? this.packetInMaskSlave : parentMessage.packetInMaskSlave;
+ long portStatusMaskEqualMaster = this.portStatusMaskEqualMasterSet ? this.portStatusMaskEqualMaster : parentMessage.portStatusMaskEqualMaster;
+ long portStatusMaskSlave = this.portStatusMaskSlaveSet ? this.portStatusMaskSlave : parentMessage.portStatusMaskSlave;
+ long flowRemovedMaskEqualMaster = this.flowRemovedMaskEqualMasterSet ? this.flowRemovedMaskEqualMaster : parentMessage.flowRemovedMaskEqualMaster;
+ long flowRemovedMaskSlave = this.flowRemovedMaskSlaveSet ? this.flowRemovedMaskSlave : parentMessage.flowRemovedMaskSlave;
+
+ //
+ return new OFAsyncSetVer13(
+ xid,
+ packetInMaskEqualMaster,
+ packetInMaskSlave,
+ portStatusMaskEqualMaster,
+ portStatusMaskSlave,
+ flowRemovedMaskEqualMaster,
+ flowRemovedMaskSlave
+ );
+ }
+
+ }
+
+ static class Builder implements OFAsyncSet.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean packetInMaskEqualMasterSet;
+ private long packetInMaskEqualMaster;
+ private boolean packetInMaskSlaveSet;
+ private long packetInMaskSlave;
+ private boolean portStatusMaskEqualMasterSet;
+ private long portStatusMaskEqualMaster;
+ private boolean portStatusMaskSlaveSet;
+ private long portStatusMaskSlave;
+ private boolean flowRemovedMaskEqualMasterSet;
+ private long flowRemovedMaskEqualMaster;
+ private boolean flowRemovedMaskSlaveSet;
+ private long flowRemovedMaskSlave;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.SET_ASYNC;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFAsyncSet.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getPacketInMaskEqualMaster() {
+ return packetInMaskEqualMaster;
+ }
+
+ @Override
+ public OFAsyncSet.Builder setPacketInMaskEqualMaster(long packetInMaskEqualMaster) {
+ this.packetInMaskEqualMaster = packetInMaskEqualMaster;
+ this.packetInMaskEqualMasterSet = true;
+ return this;
+ }
+ @Override
+ public long getPacketInMaskSlave() {
+ return packetInMaskSlave;
+ }
+
+ @Override
+ public OFAsyncSet.Builder setPacketInMaskSlave(long packetInMaskSlave) {
+ this.packetInMaskSlave = packetInMaskSlave;
+ this.packetInMaskSlaveSet = true;
+ return this;
+ }
+ @Override
+ public long getPortStatusMaskEqualMaster() {
+ return portStatusMaskEqualMaster;
+ }
+
+ @Override
+ public OFAsyncSet.Builder setPortStatusMaskEqualMaster(long portStatusMaskEqualMaster) {
+ this.portStatusMaskEqualMaster = portStatusMaskEqualMaster;
+ this.portStatusMaskEqualMasterSet = true;
+ return this;
+ }
+ @Override
+ public long getPortStatusMaskSlave() {
+ return portStatusMaskSlave;
+ }
+
+ @Override
+ public OFAsyncSet.Builder setPortStatusMaskSlave(long portStatusMaskSlave) {
+ this.portStatusMaskSlave = portStatusMaskSlave;
+ this.portStatusMaskSlaveSet = true;
+ return this;
+ }
+ @Override
+ public long getFlowRemovedMaskEqualMaster() {
+ return flowRemovedMaskEqualMaster;
+ }
+
+ @Override
+ public OFAsyncSet.Builder setFlowRemovedMaskEqualMaster(long flowRemovedMaskEqualMaster) {
+ this.flowRemovedMaskEqualMaster = flowRemovedMaskEqualMaster;
+ this.flowRemovedMaskEqualMasterSet = true;
+ return this;
+ }
+ @Override
+ public long getFlowRemovedMaskSlave() {
+ return flowRemovedMaskSlave;
+ }
+
+ @Override
+ public OFAsyncSet.Builder setFlowRemovedMaskSlave(long flowRemovedMaskSlave) {
+ this.flowRemovedMaskSlave = flowRemovedMaskSlave;
+ this.flowRemovedMaskSlaveSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFAsyncSet build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ long packetInMaskEqualMaster = this.packetInMaskEqualMasterSet ? this.packetInMaskEqualMaster : DEFAULT_PACKET_IN_MASK_EQUAL_MASTER;
+ long packetInMaskSlave = this.packetInMaskSlaveSet ? this.packetInMaskSlave : DEFAULT_PACKET_IN_MASK_SLAVE;
+ long portStatusMaskEqualMaster = this.portStatusMaskEqualMasterSet ? this.portStatusMaskEqualMaster : DEFAULT_PORT_STATUS_MASK_EQUAL_MASTER;
+ long portStatusMaskSlave = this.portStatusMaskSlaveSet ? this.portStatusMaskSlave : DEFAULT_PORT_STATUS_MASK_SLAVE;
+ long flowRemovedMaskEqualMaster = this.flowRemovedMaskEqualMasterSet ? this.flowRemovedMaskEqualMaster : DEFAULT_FLOW_REMOVED_MASK_EQUAL_MASTER;
+ long flowRemovedMaskSlave = this.flowRemovedMaskSlaveSet ? this.flowRemovedMaskSlave : DEFAULT_FLOW_REMOVED_MASK_SLAVE;
+
+
+ return new OFAsyncSetVer13(
+ xid,
+ packetInMaskEqualMaster,
+ packetInMaskSlave,
+ portStatusMaskEqualMaster,
+ portStatusMaskSlave,
+ flowRemovedMaskEqualMaster,
+ flowRemovedMaskSlave
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFAsyncSet> {
+ @Override
+ public OFAsyncSet readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 28
+ byte type = bb.readByte();
+ if(type != (byte) 0x1c)
+ throw new OFParseError("Wrong type: Expected=OFType.SET_ASYNC(28), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 32)
+ throw new OFParseError("Wrong length: Expected=32(32), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ long packetInMaskEqualMaster = U32.f(bb.readInt());
+ long packetInMaskSlave = U32.f(bb.readInt());
+ long portStatusMaskEqualMaster = U32.f(bb.readInt());
+ long portStatusMaskSlave = U32.f(bb.readInt());
+ long flowRemovedMaskEqualMaster = U32.f(bb.readInt());
+ long flowRemovedMaskSlave = U32.f(bb.readInt());
+
+ OFAsyncSetVer13 asyncSetVer13 = new OFAsyncSetVer13(
+ xid,
+ packetInMaskEqualMaster,
+ packetInMaskSlave,
+ portStatusMaskEqualMaster,
+ portStatusMaskSlave,
+ flowRemovedMaskEqualMaster,
+ flowRemovedMaskSlave
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", asyncSetVer13);
+ return asyncSetVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFAsyncSetVer13Funnel FUNNEL = new OFAsyncSetVer13Funnel();
+ static class OFAsyncSetVer13Funnel implements Funnel<OFAsyncSetVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFAsyncSetVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 28
+ sink.putByte((byte) 0x1c);
+ // fixed value property length = 32
+ sink.putShort((short) 0x20);
+ sink.putLong(message.xid);
+ sink.putLong(message.packetInMaskEqualMaster);
+ sink.putLong(message.packetInMaskSlave);
+ sink.putLong(message.portStatusMaskEqualMaster);
+ sink.putLong(message.portStatusMaskSlave);
+ sink.putLong(message.flowRemovedMaskEqualMaster);
+ sink.putLong(message.flowRemovedMaskSlave);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFAsyncSetVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFAsyncSetVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 28
+ bb.writeByte((byte) 0x1c);
+ // fixed value property length = 32
+ bb.writeShort((short) 0x20);
+ bb.writeInt(U32.t(message.xid));
+ bb.writeInt(U32.t(message.packetInMaskEqualMaster));
+ bb.writeInt(U32.t(message.packetInMaskSlave));
+ bb.writeInt(U32.t(message.portStatusMaskEqualMaster));
+ bb.writeInt(U32.t(message.portStatusMaskSlave));
+ bb.writeInt(U32.t(message.flowRemovedMaskEqualMaster));
+ bb.writeInt(U32.t(message.flowRemovedMaskSlave));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFAsyncSetVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("packetInMaskEqualMaster=").append(packetInMaskEqualMaster);
+ b.append(", ");
+ b.append("packetInMaskSlave=").append(packetInMaskSlave);
+ b.append(", ");
+ b.append("portStatusMaskEqualMaster=").append(portStatusMaskEqualMaster);
+ b.append(", ");
+ b.append("portStatusMaskSlave=").append(portStatusMaskSlave);
+ b.append(", ");
+ b.append("flowRemovedMaskEqualMaster=").append(flowRemovedMaskEqualMaster);
+ b.append(", ");
+ b.append("flowRemovedMaskSlave=").append(flowRemovedMaskSlave);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFAsyncSetVer13 other = (OFAsyncSetVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if( packetInMaskEqualMaster != other.packetInMaskEqualMaster)
+ return false;
+ if( packetInMaskSlave != other.packetInMaskSlave)
+ return false;
+ if( portStatusMaskEqualMaster != other.portStatusMaskEqualMaster)
+ return false;
+ if( portStatusMaskSlave != other.portStatusMaskSlave)
+ return false;
+ if( flowRemovedMaskEqualMaster != other.flowRemovedMaskEqualMaster)
+ return false;
+ if( flowRemovedMaskSlave != other.flowRemovedMaskSlave)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * (int) (packetInMaskEqualMaster ^ (packetInMaskEqualMaster >>> 32));
+ result = prime * (int) (packetInMaskSlave ^ (packetInMaskSlave >>> 32));
+ result = prime * (int) (portStatusMaskEqualMaster ^ (portStatusMaskEqualMaster >>> 32));
+ result = prime * (int) (portStatusMaskSlave ^ (portStatusMaskSlave >>> 32));
+ result = prime * (int) (flowRemovedMaskEqualMaster ^ (flowRemovedMaskEqualMaster >>> 32));
+ result = prime * (int) (flowRemovedMaskSlave ^ (flowRemovedMaskSlave >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBadActionCodeSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBadActionCodeSerializerVer13.java
new file mode 100644
index 0000000..5294b00
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBadActionCodeSerializerVer13.java
@@ -0,0 +1,144 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFBadActionCode;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+
+public class OFBadActionCodeSerializerVer13 {
+
+ public final static short BAD_TYPE_VAL = (short) 0x0;
+ public final static short BAD_LEN_VAL = (short) 0x1;
+ public final static short BAD_EXPERIMENTER_VAL = (short) 0x2;
+ public final static short BAD_EXPERIMENTER_TYPE_VAL = (short) 0x3;
+ public final static short BAD_OUT_PORT_VAL = (short) 0x4;
+ public final static short BAD_ARGUMENT_VAL = (short) 0x5;
+ public final static short EPERM_VAL = (short) 0x6;
+ public final static short TOO_MANY_VAL = (short) 0x7;
+ public final static short BAD_QUEUE_VAL = (short) 0x8;
+ public final static short BAD_OUT_GROUP_VAL = (short) 0x9;
+ public final static short MATCH_INCONSISTENT_VAL = (short) 0xa;
+ public final static short UNSUPPORTED_ORDER_VAL = (short) 0xb;
+ public final static short BAD_TAG_VAL = (short) 0xc;
+ public final static short BAD_SET_TYPE_VAL = (short) 0xd;
+ public final static short BAD_SET_LEN_VAL = (short) 0xe;
+ public final static short BAD_SET_ARGUMENT_VAL = (short) 0xf;
+
+ public static OFBadActionCode readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readShort());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, OFBadActionCode e) {
+ bb.writeShort(toWireValue(e));
+ }
+
+ public static void putTo(OFBadActionCode e, PrimitiveSink sink) {
+ sink.putShort(toWireValue(e));
+ }
+
+ public static OFBadActionCode ofWireValue(short val) {
+ switch(val) {
+ case BAD_TYPE_VAL:
+ return OFBadActionCode.BAD_TYPE;
+ case BAD_LEN_VAL:
+ return OFBadActionCode.BAD_LEN;
+ case BAD_EXPERIMENTER_VAL:
+ return OFBadActionCode.BAD_EXPERIMENTER;
+ case BAD_EXPERIMENTER_TYPE_VAL:
+ return OFBadActionCode.BAD_EXPERIMENTER_TYPE;
+ case BAD_OUT_PORT_VAL:
+ return OFBadActionCode.BAD_OUT_PORT;
+ case BAD_ARGUMENT_VAL:
+ return OFBadActionCode.BAD_ARGUMENT;
+ case EPERM_VAL:
+ return OFBadActionCode.EPERM;
+ case TOO_MANY_VAL:
+ return OFBadActionCode.TOO_MANY;
+ case BAD_QUEUE_VAL:
+ return OFBadActionCode.BAD_QUEUE;
+ case BAD_OUT_GROUP_VAL:
+ return OFBadActionCode.BAD_OUT_GROUP;
+ case MATCH_INCONSISTENT_VAL:
+ return OFBadActionCode.MATCH_INCONSISTENT;
+ case UNSUPPORTED_ORDER_VAL:
+ return OFBadActionCode.UNSUPPORTED_ORDER;
+ case BAD_TAG_VAL:
+ return OFBadActionCode.BAD_TAG;
+ case BAD_SET_TYPE_VAL:
+ return OFBadActionCode.BAD_SET_TYPE;
+ case BAD_SET_LEN_VAL:
+ return OFBadActionCode.BAD_SET_LEN;
+ case BAD_SET_ARGUMENT_VAL:
+ return OFBadActionCode.BAD_SET_ARGUMENT;
+ default:
+ throw new IllegalArgumentException("Illegal wire value for type OFBadActionCode in version 1.3: " + val);
+ }
+ }
+
+
+ public static short toWireValue(OFBadActionCode e) {
+ switch(e) {
+ case BAD_TYPE:
+ return BAD_TYPE_VAL;
+ case BAD_LEN:
+ return BAD_LEN_VAL;
+ case BAD_EXPERIMENTER:
+ return BAD_EXPERIMENTER_VAL;
+ case BAD_EXPERIMENTER_TYPE:
+ return BAD_EXPERIMENTER_TYPE_VAL;
+ case BAD_OUT_PORT:
+ return BAD_OUT_PORT_VAL;
+ case BAD_ARGUMENT:
+ return BAD_ARGUMENT_VAL;
+ case EPERM:
+ return EPERM_VAL;
+ case TOO_MANY:
+ return TOO_MANY_VAL;
+ case BAD_QUEUE:
+ return BAD_QUEUE_VAL;
+ case BAD_OUT_GROUP:
+ return BAD_OUT_GROUP_VAL;
+ case MATCH_INCONSISTENT:
+ return MATCH_INCONSISTENT_VAL;
+ case UNSUPPORTED_ORDER:
+ return UNSUPPORTED_ORDER_VAL;
+ case BAD_TAG:
+ return BAD_TAG_VAL;
+ case BAD_SET_TYPE:
+ return BAD_SET_TYPE_VAL;
+ case BAD_SET_LEN:
+ return BAD_SET_LEN_VAL;
+ case BAD_SET_ARGUMENT:
+ return BAD_SET_ARGUMENT_VAL;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFBadActionCode in version 1.3: " + e);
+ }
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBadActionErrorMsgVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBadActionErrorMsgVer13.java
new file mode 100644
index 0000000..ceee8c2
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBadActionErrorMsgVer13.java
@@ -0,0 +1,400 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBadActionErrorMsgVer13 implements OFBadActionErrorMsg {
+ private static final Logger logger = LoggerFactory.getLogger(OFBadActionErrorMsgVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 12;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static OFErrorCauseData DEFAULT_DATA = OFErrorCauseData.NONE;
+
+ // OF message fields
+ private final long xid;
+ private final OFBadActionCode code;
+ private final OFErrorCauseData data;
+//
+
+ // package private constructor - used by readers, builders, and factory
+ OFBadActionErrorMsgVer13(long xid, OFBadActionCode code, OFErrorCauseData data) {
+ this.xid = xid;
+ this.code = code;
+ this.data = data;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ERROR;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFErrorType getErrType() {
+ return OFErrorType.BAD_ACTION;
+ }
+
+ @Override
+ public OFBadActionCode getCode() {
+ return code;
+ }
+
+ @Override
+ public OFErrorCauseData getData() {
+ return data;
+ }
+
+
+
+ public OFBadActionErrorMsg.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBadActionErrorMsg.Builder {
+ final OFBadActionErrorMsgVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean codeSet;
+ private OFBadActionCode code;
+ private boolean dataSet;
+ private OFErrorCauseData data;
+
+ BuilderWithParent(OFBadActionErrorMsgVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ERROR;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBadActionErrorMsg.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorType getErrType() {
+ return OFErrorType.BAD_ACTION;
+ }
+
+ @Override
+ public OFBadActionCode getCode() {
+ return code;
+ }
+
+ @Override
+ public OFBadActionErrorMsg.Builder setCode(OFBadActionCode code) {
+ this.code = code;
+ this.codeSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorCauseData getData() {
+ return data;
+ }
+
+ @Override
+ public OFBadActionErrorMsg.Builder setData(OFErrorCauseData data) {
+ this.data = data;
+ this.dataSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBadActionErrorMsg build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ OFBadActionCode code = this.codeSet ? this.code : parentMessage.code;
+ if(code == null)
+ throw new NullPointerException("Property code must not be null");
+ OFErrorCauseData data = this.dataSet ? this.data : parentMessage.data;
+ if(data == null)
+ throw new NullPointerException("Property data must not be null");
+
+ //
+ return new OFBadActionErrorMsgVer13(
+ xid,
+ code,
+ data
+ );
+ }
+
+ }
+
+ static class Builder implements OFBadActionErrorMsg.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean codeSet;
+ private OFBadActionCode code;
+ private boolean dataSet;
+ private OFErrorCauseData data;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ERROR;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBadActionErrorMsg.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorType getErrType() {
+ return OFErrorType.BAD_ACTION;
+ }
+
+ @Override
+ public OFBadActionCode getCode() {
+ return code;
+ }
+
+ @Override
+ public OFBadActionErrorMsg.Builder setCode(OFBadActionCode code) {
+ this.code = code;
+ this.codeSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorCauseData getData() {
+ return data;
+ }
+
+ @Override
+ public OFBadActionErrorMsg.Builder setData(OFErrorCauseData data) {
+ this.data = data;
+ this.dataSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBadActionErrorMsg build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ if(!this.codeSet)
+ throw new IllegalStateException("Property code doesn't have default value -- must be set");
+ if(code == null)
+ throw new NullPointerException("Property code must not be null");
+ OFErrorCauseData data = this.dataSet ? this.data : DEFAULT_DATA;
+ if(data == null)
+ throw new NullPointerException("Property data must not be null");
+
+
+ return new OFBadActionErrorMsgVer13(
+ xid,
+ code,
+ data
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBadActionErrorMsg> {
+ @Override
+ public OFBadActionErrorMsg readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 1
+ byte type = bb.readByte();
+ if(type != (byte) 0x1)
+ throw new OFParseError("Wrong type: Expected=OFType.ERROR(1), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property errType == 2
+ short errType = bb.readShort();
+ if(errType != (short) 0x2)
+ throw new OFParseError("Wrong errType: Expected=OFErrorType.BAD_ACTION(2), got="+errType);
+ OFBadActionCode code = OFBadActionCodeSerializerVer13.readFrom(bb);
+ OFErrorCauseData data = OFErrorCauseData.read(bb, length - (bb.readerIndex() - start), OFVersion.OF_13);
+
+ OFBadActionErrorMsgVer13 badActionErrorMsgVer13 = new OFBadActionErrorMsgVer13(
+ xid,
+ code,
+ data
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", badActionErrorMsgVer13);
+ return badActionErrorMsgVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBadActionErrorMsgVer13Funnel FUNNEL = new OFBadActionErrorMsgVer13Funnel();
+ static class OFBadActionErrorMsgVer13Funnel implements Funnel<OFBadActionErrorMsgVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBadActionErrorMsgVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 1
+ sink.putByte((byte) 0x1);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property errType = 2
+ sink.putShort((short) 0x2);
+ OFBadActionCodeSerializerVer13.putTo(message.code, sink);
+ message.data.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBadActionErrorMsgVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBadActionErrorMsgVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 1
+ bb.writeByte((byte) 0x1);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property errType = 2
+ bb.writeShort((short) 0x2);
+ OFBadActionCodeSerializerVer13.writeTo(bb, message.code);
+ message.data.writeTo(bb);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBadActionErrorMsgVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("code=").append(code);
+ b.append(", ");
+ b.append("data=").append(data);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBadActionErrorMsgVer13 other = (OFBadActionErrorMsgVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (code == null) {
+ if (other.code != null)
+ return false;
+ } else if (!code.equals(other.code))
+ return false;
+ if (data == null) {
+ if (other.data != null)
+ return false;
+ } else if (!data.equals(other.data))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((code == null) ? 0 : code.hashCode());
+ result = prime * result + ((data == null) ? 0 : data.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBadInstructionCodeSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBadInstructionCodeSerializerVer13.java
new file mode 100644
index 0000000..86f6777
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBadInstructionCodeSerializerVer13.java
@@ -0,0 +1,109 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFBadInstructionCode;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+
+public class OFBadInstructionCodeSerializerVer13 {
+
+ public final static short UNKNOWN_INST_VAL = (short) 0x0;
+ public final static short UNSUP_INST_VAL = (short) 0x1;
+ public final static short BAD_TABLE_ID_VAL = (short) 0x2;
+ public final static short UNSUP_METADATA_VAL = (short) 0x3;
+ public final static short UNSUP_METADATA_MASK_VAL = (short) 0x4;
+ public final static short BAD_EXPERIMENTER_VAL = (short) 0x5;
+ public final static short BAD_EXPERIMENTER_TYPE_VAL = (short) 0x6;
+ public final static short BAD_LEN_VAL = (short) 0x7;
+ public final static short EPERM_VAL = (short) 0x8;
+
+ public static OFBadInstructionCode readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readShort());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, OFBadInstructionCode e) {
+ bb.writeShort(toWireValue(e));
+ }
+
+ public static void putTo(OFBadInstructionCode e, PrimitiveSink sink) {
+ sink.putShort(toWireValue(e));
+ }
+
+ public static OFBadInstructionCode ofWireValue(short val) {
+ switch(val) {
+ case UNKNOWN_INST_VAL:
+ return OFBadInstructionCode.UNKNOWN_INST;
+ case UNSUP_INST_VAL:
+ return OFBadInstructionCode.UNSUP_INST;
+ case BAD_TABLE_ID_VAL:
+ return OFBadInstructionCode.BAD_TABLE_ID;
+ case UNSUP_METADATA_VAL:
+ return OFBadInstructionCode.UNSUP_METADATA;
+ case UNSUP_METADATA_MASK_VAL:
+ return OFBadInstructionCode.UNSUP_METADATA_MASK;
+ case BAD_EXPERIMENTER_VAL:
+ return OFBadInstructionCode.BAD_EXPERIMENTER;
+ case BAD_EXPERIMENTER_TYPE_VAL:
+ return OFBadInstructionCode.BAD_EXPERIMENTER_TYPE;
+ case BAD_LEN_VAL:
+ return OFBadInstructionCode.BAD_LEN;
+ case EPERM_VAL:
+ return OFBadInstructionCode.EPERM;
+ default:
+ throw new IllegalArgumentException("Illegal wire value for type OFBadInstructionCode in version 1.3: " + val);
+ }
+ }
+
+
+ public static short toWireValue(OFBadInstructionCode e) {
+ switch(e) {
+ case UNKNOWN_INST:
+ return UNKNOWN_INST_VAL;
+ case UNSUP_INST:
+ return UNSUP_INST_VAL;
+ case BAD_TABLE_ID:
+ return BAD_TABLE_ID_VAL;
+ case UNSUP_METADATA:
+ return UNSUP_METADATA_VAL;
+ case UNSUP_METADATA_MASK:
+ return UNSUP_METADATA_MASK_VAL;
+ case BAD_EXPERIMENTER:
+ return BAD_EXPERIMENTER_VAL;
+ case BAD_EXPERIMENTER_TYPE:
+ return BAD_EXPERIMENTER_TYPE_VAL;
+ case BAD_LEN:
+ return BAD_LEN_VAL;
+ case EPERM:
+ return EPERM_VAL;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFBadInstructionCode in version 1.3: " + e);
+ }
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBadInstructionErrorMsgVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBadInstructionErrorMsgVer13.java
new file mode 100644
index 0000000..135e3f5
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBadInstructionErrorMsgVer13.java
@@ -0,0 +1,400 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBadInstructionErrorMsgVer13 implements OFBadInstructionErrorMsg {
+ private static final Logger logger = LoggerFactory.getLogger(OFBadInstructionErrorMsgVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 12;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static OFErrorCauseData DEFAULT_DATA = OFErrorCauseData.NONE;
+
+ // OF message fields
+ private final long xid;
+ private final OFBadInstructionCode code;
+ private final OFErrorCauseData data;
+//
+
+ // package private constructor - used by readers, builders, and factory
+ OFBadInstructionErrorMsgVer13(long xid, OFBadInstructionCode code, OFErrorCauseData data) {
+ this.xid = xid;
+ this.code = code;
+ this.data = data;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ERROR;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFErrorType getErrType() {
+ return OFErrorType.BAD_INSTRUCTION;
+ }
+
+ @Override
+ public OFBadInstructionCode getCode() {
+ return code;
+ }
+
+ @Override
+ public OFErrorCauseData getData() {
+ return data;
+ }
+
+
+
+ public OFBadInstructionErrorMsg.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBadInstructionErrorMsg.Builder {
+ final OFBadInstructionErrorMsgVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean codeSet;
+ private OFBadInstructionCode code;
+ private boolean dataSet;
+ private OFErrorCauseData data;
+
+ BuilderWithParent(OFBadInstructionErrorMsgVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ERROR;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBadInstructionErrorMsg.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorType getErrType() {
+ return OFErrorType.BAD_INSTRUCTION;
+ }
+
+ @Override
+ public OFBadInstructionCode getCode() {
+ return code;
+ }
+
+ @Override
+ public OFBadInstructionErrorMsg.Builder setCode(OFBadInstructionCode code) {
+ this.code = code;
+ this.codeSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorCauseData getData() {
+ return data;
+ }
+
+ @Override
+ public OFBadInstructionErrorMsg.Builder setData(OFErrorCauseData data) {
+ this.data = data;
+ this.dataSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBadInstructionErrorMsg build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ OFBadInstructionCode code = this.codeSet ? this.code : parentMessage.code;
+ if(code == null)
+ throw new NullPointerException("Property code must not be null");
+ OFErrorCauseData data = this.dataSet ? this.data : parentMessage.data;
+ if(data == null)
+ throw new NullPointerException("Property data must not be null");
+
+ //
+ return new OFBadInstructionErrorMsgVer13(
+ xid,
+ code,
+ data
+ );
+ }
+
+ }
+
+ static class Builder implements OFBadInstructionErrorMsg.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean codeSet;
+ private OFBadInstructionCode code;
+ private boolean dataSet;
+ private OFErrorCauseData data;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ERROR;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBadInstructionErrorMsg.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorType getErrType() {
+ return OFErrorType.BAD_INSTRUCTION;
+ }
+
+ @Override
+ public OFBadInstructionCode getCode() {
+ return code;
+ }
+
+ @Override
+ public OFBadInstructionErrorMsg.Builder setCode(OFBadInstructionCode code) {
+ this.code = code;
+ this.codeSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorCauseData getData() {
+ return data;
+ }
+
+ @Override
+ public OFBadInstructionErrorMsg.Builder setData(OFErrorCauseData data) {
+ this.data = data;
+ this.dataSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBadInstructionErrorMsg build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ if(!this.codeSet)
+ throw new IllegalStateException("Property code doesn't have default value -- must be set");
+ if(code == null)
+ throw new NullPointerException("Property code must not be null");
+ OFErrorCauseData data = this.dataSet ? this.data : DEFAULT_DATA;
+ if(data == null)
+ throw new NullPointerException("Property data must not be null");
+
+
+ return new OFBadInstructionErrorMsgVer13(
+ xid,
+ code,
+ data
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBadInstructionErrorMsg> {
+ @Override
+ public OFBadInstructionErrorMsg readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 1
+ byte type = bb.readByte();
+ if(type != (byte) 0x1)
+ throw new OFParseError("Wrong type: Expected=OFType.ERROR(1), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property errType == 3
+ short errType = bb.readShort();
+ if(errType != (short) 0x3)
+ throw new OFParseError("Wrong errType: Expected=OFErrorType.BAD_INSTRUCTION(3), got="+errType);
+ OFBadInstructionCode code = OFBadInstructionCodeSerializerVer13.readFrom(bb);
+ OFErrorCauseData data = OFErrorCauseData.read(bb, length - (bb.readerIndex() - start), OFVersion.OF_13);
+
+ OFBadInstructionErrorMsgVer13 badInstructionErrorMsgVer13 = new OFBadInstructionErrorMsgVer13(
+ xid,
+ code,
+ data
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", badInstructionErrorMsgVer13);
+ return badInstructionErrorMsgVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBadInstructionErrorMsgVer13Funnel FUNNEL = new OFBadInstructionErrorMsgVer13Funnel();
+ static class OFBadInstructionErrorMsgVer13Funnel implements Funnel<OFBadInstructionErrorMsgVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBadInstructionErrorMsgVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 1
+ sink.putByte((byte) 0x1);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property errType = 3
+ sink.putShort((short) 0x3);
+ OFBadInstructionCodeSerializerVer13.putTo(message.code, sink);
+ message.data.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBadInstructionErrorMsgVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBadInstructionErrorMsgVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 1
+ bb.writeByte((byte) 0x1);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property errType = 3
+ bb.writeShort((short) 0x3);
+ OFBadInstructionCodeSerializerVer13.writeTo(bb, message.code);
+ message.data.writeTo(bb);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBadInstructionErrorMsgVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("code=").append(code);
+ b.append(", ");
+ b.append("data=").append(data);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBadInstructionErrorMsgVer13 other = (OFBadInstructionErrorMsgVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (code == null) {
+ if (other.code != null)
+ return false;
+ } else if (!code.equals(other.code))
+ return false;
+ if (data == null) {
+ if (other.data != null)
+ return false;
+ } else if (!data.equals(other.data))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((code == null) ? 0 : code.hashCode());
+ result = prime * result + ((data == null) ? 0 : data.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBadMatchCodeSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBadMatchCodeSerializerVer13.java
new file mode 100644
index 0000000..e5a41a8
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBadMatchCodeSerializerVer13.java
@@ -0,0 +1,124 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFBadMatchCode;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+
+public class OFBadMatchCodeSerializerVer13 {
+
+ public final static short BAD_TYPE_VAL = (short) 0x0;
+ public final static short BAD_LEN_VAL = (short) 0x1;
+ public final static short BAD_TAG_VAL = (short) 0x2;
+ public final static short BAD_DL_ADDR_MASK_VAL = (short) 0x3;
+ public final static short BAD_NW_ADDR_MASK_VAL = (short) 0x4;
+ public final static short BAD_WILDCARDS_VAL = (short) 0x5;
+ public final static short BAD_FIELD_VAL = (short) 0x6;
+ public final static short BAD_VALUE_VAL = (short) 0x7;
+ public final static short BAD_MASK_VAL = (short) 0x8;
+ public final static short BAD_PREREQ_VAL = (short) 0x9;
+ public final static short DUP_FIELD_VAL = (short) 0xa;
+ public final static short EPERM_VAL = (short) 0xb;
+
+ public static OFBadMatchCode readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readShort());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, OFBadMatchCode e) {
+ bb.writeShort(toWireValue(e));
+ }
+
+ public static void putTo(OFBadMatchCode e, PrimitiveSink sink) {
+ sink.putShort(toWireValue(e));
+ }
+
+ public static OFBadMatchCode ofWireValue(short val) {
+ switch(val) {
+ case BAD_TYPE_VAL:
+ return OFBadMatchCode.BAD_TYPE;
+ case BAD_LEN_VAL:
+ return OFBadMatchCode.BAD_LEN;
+ case BAD_TAG_VAL:
+ return OFBadMatchCode.BAD_TAG;
+ case BAD_DL_ADDR_MASK_VAL:
+ return OFBadMatchCode.BAD_DL_ADDR_MASK;
+ case BAD_NW_ADDR_MASK_VAL:
+ return OFBadMatchCode.BAD_NW_ADDR_MASK;
+ case BAD_WILDCARDS_VAL:
+ return OFBadMatchCode.BAD_WILDCARDS;
+ case BAD_FIELD_VAL:
+ return OFBadMatchCode.BAD_FIELD;
+ case BAD_VALUE_VAL:
+ return OFBadMatchCode.BAD_VALUE;
+ case BAD_MASK_VAL:
+ return OFBadMatchCode.BAD_MASK;
+ case BAD_PREREQ_VAL:
+ return OFBadMatchCode.BAD_PREREQ;
+ case DUP_FIELD_VAL:
+ return OFBadMatchCode.DUP_FIELD;
+ case EPERM_VAL:
+ return OFBadMatchCode.EPERM;
+ default:
+ throw new IllegalArgumentException("Illegal wire value for type OFBadMatchCode in version 1.3: " + val);
+ }
+ }
+
+
+ public static short toWireValue(OFBadMatchCode e) {
+ switch(e) {
+ case BAD_TYPE:
+ return BAD_TYPE_VAL;
+ case BAD_LEN:
+ return BAD_LEN_VAL;
+ case BAD_TAG:
+ return BAD_TAG_VAL;
+ case BAD_DL_ADDR_MASK:
+ return BAD_DL_ADDR_MASK_VAL;
+ case BAD_NW_ADDR_MASK:
+ return BAD_NW_ADDR_MASK_VAL;
+ case BAD_WILDCARDS:
+ return BAD_WILDCARDS_VAL;
+ case BAD_FIELD:
+ return BAD_FIELD_VAL;
+ case BAD_VALUE:
+ return BAD_VALUE_VAL;
+ case BAD_MASK:
+ return BAD_MASK_VAL;
+ case BAD_PREREQ:
+ return BAD_PREREQ_VAL;
+ case DUP_FIELD:
+ return DUP_FIELD_VAL;
+ case EPERM:
+ return EPERM_VAL;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFBadMatchCode in version 1.3: " + e);
+ }
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBadMatchErrorMsgVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBadMatchErrorMsgVer13.java
new file mode 100644
index 0000000..bcdb0fa
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBadMatchErrorMsgVer13.java
@@ -0,0 +1,400 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBadMatchErrorMsgVer13 implements OFBadMatchErrorMsg {
+ private static final Logger logger = LoggerFactory.getLogger(OFBadMatchErrorMsgVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 12;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static OFErrorCauseData DEFAULT_DATA = OFErrorCauseData.NONE;
+
+ // OF message fields
+ private final long xid;
+ private final OFBadMatchCode code;
+ private final OFErrorCauseData data;
+//
+
+ // package private constructor - used by readers, builders, and factory
+ OFBadMatchErrorMsgVer13(long xid, OFBadMatchCode code, OFErrorCauseData data) {
+ this.xid = xid;
+ this.code = code;
+ this.data = data;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ERROR;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFErrorType getErrType() {
+ return OFErrorType.BAD_MATCH;
+ }
+
+ @Override
+ public OFBadMatchCode getCode() {
+ return code;
+ }
+
+ @Override
+ public OFErrorCauseData getData() {
+ return data;
+ }
+
+
+
+ public OFBadMatchErrorMsg.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBadMatchErrorMsg.Builder {
+ final OFBadMatchErrorMsgVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean codeSet;
+ private OFBadMatchCode code;
+ private boolean dataSet;
+ private OFErrorCauseData data;
+
+ BuilderWithParent(OFBadMatchErrorMsgVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ERROR;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBadMatchErrorMsg.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorType getErrType() {
+ return OFErrorType.BAD_MATCH;
+ }
+
+ @Override
+ public OFBadMatchCode getCode() {
+ return code;
+ }
+
+ @Override
+ public OFBadMatchErrorMsg.Builder setCode(OFBadMatchCode code) {
+ this.code = code;
+ this.codeSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorCauseData getData() {
+ return data;
+ }
+
+ @Override
+ public OFBadMatchErrorMsg.Builder setData(OFErrorCauseData data) {
+ this.data = data;
+ this.dataSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBadMatchErrorMsg build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ OFBadMatchCode code = this.codeSet ? this.code : parentMessage.code;
+ if(code == null)
+ throw new NullPointerException("Property code must not be null");
+ OFErrorCauseData data = this.dataSet ? this.data : parentMessage.data;
+ if(data == null)
+ throw new NullPointerException("Property data must not be null");
+
+ //
+ return new OFBadMatchErrorMsgVer13(
+ xid,
+ code,
+ data
+ );
+ }
+
+ }
+
+ static class Builder implements OFBadMatchErrorMsg.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean codeSet;
+ private OFBadMatchCode code;
+ private boolean dataSet;
+ private OFErrorCauseData data;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ERROR;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBadMatchErrorMsg.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorType getErrType() {
+ return OFErrorType.BAD_MATCH;
+ }
+
+ @Override
+ public OFBadMatchCode getCode() {
+ return code;
+ }
+
+ @Override
+ public OFBadMatchErrorMsg.Builder setCode(OFBadMatchCode code) {
+ this.code = code;
+ this.codeSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorCauseData getData() {
+ return data;
+ }
+
+ @Override
+ public OFBadMatchErrorMsg.Builder setData(OFErrorCauseData data) {
+ this.data = data;
+ this.dataSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBadMatchErrorMsg build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ if(!this.codeSet)
+ throw new IllegalStateException("Property code doesn't have default value -- must be set");
+ if(code == null)
+ throw new NullPointerException("Property code must not be null");
+ OFErrorCauseData data = this.dataSet ? this.data : DEFAULT_DATA;
+ if(data == null)
+ throw new NullPointerException("Property data must not be null");
+
+
+ return new OFBadMatchErrorMsgVer13(
+ xid,
+ code,
+ data
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBadMatchErrorMsg> {
+ @Override
+ public OFBadMatchErrorMsg readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 1
+ byte type = bb.readByte();
+ if(type != (byte) 0x1)
+ throw new OFParseError("Wrong type: Expected=OFType.ERROR(1), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property errType == 4
+ short errType = bb.readShort();
+ if(errType != (short) 0x4)
+ throw new OFParseError("Wrong errType: Expected=OFErrorType.BAD_MATCH(4), got="+errType);
+ OFBadMatchCode code = OFBadMatchCodeSerializerVer13.readFrom(bb);
+ OFErrorCauseData data = OFErrorCauseData.read(bb, length - (bb.readerIndex() - start), OFVersion.OF_13);
+
+ OFBadMatchErrorMsgVer13 badMatchErrorMsgVer13 = new OFBadMatchErrorMsgVer13(
+ xid,
+ code,
+ data
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", badMatchErrorMsgVer13);
+ return badMatchErrorMsgVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBadMatchErrorMsgVer13Funnel FUNNEL = new OFBadMatchErrorMsgVer13Funnel();
+ static class OFBadMatchErrorMsgVer13Funnel implements Funnel<OFBadMatchErrorMsgVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBadMatchErrorMsgVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 1
+ sink.putByte((byte) 0x1);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property errType = 4
+ sink.putShort((short) 0x4);
+ OFBadMatchCodeSerializerVer13.putTo(message.code, sink);
+ message.data.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBadMatchErrorMsgVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBadMatchErrorMsgVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 1
+ bb.writeByte((byte) 0x1);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property errType = 4
+ bb.writeShort((short) 0x4);
+ OFBadMatchCodeSerializerVer13.writeTo(bb, message.code);
+ message.data.writeTo(bb);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBadMatchErrorMsgVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("code=").append(code);
+ b.append(", ");
+ b.append("data=").append(data);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBadMatchErrorMsgVer13 other = (OFBadMatchErrorMsgVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (code == null) {
+ if (other.code != null)
+ return false;
+ } else if (!code.equals(other.code))
+ return false;
+ if (data == null) {
+ if (other.data != null)
+ return false;
+ } else if (!data.equals(other.data))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((code == null) ? 0 : code.hashCode());
+ result = prime * result + ((data == null) ? 0 : data.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBadRequestCodeSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBadRequestCodeSerializerVer13.java
new file mode 100644
index 0000000..6f47134
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBadRequestCodeSerializerVer13.java
@@ -0,0 +1,134 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFBadRequestCode;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+
+public class OFBadRequestCodeSerializerVer13 {
+
+ public final static short BAD_VERSION_VAL = (short) 0x0;
+ public final static short BAD_TYPE_VAL = (short) 0x1;
+ public final static short BAD_STAT_VAL = (short) 0x2;
+ public final static short BAD_EXPERIMENTER_VAL = (short) 0x3;
+ public final static short BAD_EXPERIMENTER_TYPE_VAL = (short) 0x4;
+ public final static short EPERM_VAL = (short) 0x5;
+ public final static short BAD_LEN_VAL = (short) 0x6;
+ public final static short BUFFER_EMPTY_VAL = (short) 0x7;
+ public final static short BUFFER_UNKNOWN_VAL = (short) 0x8;
+ public final static short BAD_TABLE_ID_VAL = (short) 0x9;
+ public final static short IS_SLAVE_VAL = (short) 0xa;
+ public final static short BAD_PORT_VAL = (short) 0xb;
+ public final static short BAD_PACKET_VAL = (short) 0xc;
+ public final static short MULTIPART_BUFFER_OVERFLOW_VAL = (short) 0xd;
+
+ public static OFBadRequestCode readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readShort());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, OFBadRequestCode e) {
+ bb.writeShort(toWireValue(e));
+ }
+
+ public static void putTo(OFBadRequestCode e, PrimitiveSink sink) {
+ sink.putShort(toWireValue(e));
+ }
+
+ public static OFBadRequestCode ofWireValue(short val) {
+ switch(val) {
+ case BAD_VERSION_VAL:
+ return OFBadRequestCode.BAD_VERSION;
+ case BAD_TYPE_VAL:
+ return OFBadRequestCode.BAD_TYPE;
+ case BAD_STAT_VAL:
+ return OFBadRequestCode.BAD_STAT;
+ case BAD_EXPERIMENTER_VAL:
+ return OFBadRequestCode.BAD_EXPERIMENTER;
+ case BAD_EXPERIMENTER_TYPE_VAL:
+ return OFBadRequestCode.BAD_EXPERIMENTER_TYPE;
+ case EPERM_VAL:
+ return OFBadRequestCode.EPERM;
+ case BAD_LEN_VAL:
+ return OFBadRequestCode.BAD_LEN;
+ case BUFFER_EMPTY_VAL:
+ return OFBadRequestCode.BUFFER_EMPTY;
+ case BUFFER_UNKNOWN_VAL:
+ return OFBadRequestCode.BUFFER_UNKNOWN;
+ case BAD_TABLE_ID_VAL:
+ return OFBadRequestCode.BAD_TABLE_ID;
+ case IS_SLAVE_VAL:
+ return OFBadRequestCode.IS_SLAVE;
+ case BAD_PORT_VAL:
+ return OFBadRequestCode.BAD_PORT;
+ case BAD_PACKET_VAL:
+ return OFBadRequestCode.BAD_PACKET;
+ case MULTIPART_BUFFER_OVERFLOW_VAL:
+ return OFBadRequestCode.MULTIPART_BUFFER_OVERFLOW;
+ default:
+ throw new IllegalArgumentException("Illegal wire value for type OFBadRequestCode in version 1.3: " + val);
+ }
+ }
+
+
+ public static short toWireValue(OFBadRequestCode e) {
+ switch(e) {
+ case BAD_VERSION:
+ return BAD_VERSION_VAL;
+ case BAD_TYPE:
+ return BAD_TYPE_VAL;
+ case BAD_STAT:
+ return BAD_STAT_VAL;
+ case BAD_EXPERIMENTER:
+ return BAD_EXPERIMENTER_VAL;
+ case BAD_EXPERIMENTER_TYPE:
+ return BAD_EXPERIMENTER_TYPE_VAL;
+ case EPERM:
+ return EPERM_VAL;
+ case BAD_LEN:
+ return BAD_LEN_VAL;
+ case BUFFER_EMPTY:
+ return BUFFER_EMPTY_VAL;
+ case BUFFER_UNKNOWN:
+ return BUFFER_UNKNOWN_VAL;
+ case BAD_TABLE_ID:
+ return BAD_TABLE_ID_VAL;
+ case IS_SLAVE:
+ return IS_SLAVE_VAL;
+ case BAD_PORT:
+ return BAD_PORT_VAL;
+ case BAD_PACKET:
+ return BAD_PACKET_VAL;
+ case MULTIPART_BUFFER_OVERFLOW:
+ return MULTIPART_BUFFER_OVERFLOW_VAL;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFBadRequestCode in version 1.3: " + e);
+ }
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBadRequestErrorMsgVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBadRequestErrorMsgVer13.java
new file mode 100644
index 0000000..f3a9109
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBadRequestErrorMsgVer13.java
@@ -0,0 +1,400 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBadRequestErrorMsgVer13 implements OFBadRequestErrorMsg {
+ private static final Logger logger = LoggerFactory.getLogger(OFBadRequestErrorMsgVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 12;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static OFErrorCauseData DEFAULT_DATA = OFErrorCauseData.NONE;
+
+ // OF message fields
+ private final long xid;
+ private final OFBadRequestCode code;
+ private final OFErrorCauseData data;
+//
+
+ // package private constructor - used by readers, builders, and factory
+ OFBadRequestErrorMsgVer13(long xid, OFBadRequestCode code, OFErrorCauseData data) {
+ this.xid = xid;
+ this.code = code;
+ this.data = data;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ERROR;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFErrorType getErrType() {
+ return OFErrorType.BAD_REQUEST;
+ }
+
+ @Override
+ public OFBadRequestCode getCode() {
+ return code;
+ }
+
+ @Override
+ public OFErrorCauseData getData() {
+ return data;
+ }
+
+
+
+ public OFBadRequestErrorMsg.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBadRequestErrorMsg.Builder {
+ final OFBadRequestErrorMsgVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean codeSet;
+ private OFBadRequestCode code;
+ private boolean dataSet;
+ private OFErrorCauseData data;
+
+ BuilderWithParent(OFBadRequestErrorMsgVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ERROR;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBadRequestErrorMsg.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorType getErrType() {
+ return OFErrorType.BAD_REQUEST;
+ }
+
+ @Override
+ public OFBadRequestCode getCode() {
+ return code;
+ }
+
+ @Override
+ public OFBadRequestErrorMsg.Builder setCode(OFBadRequestCode code) {
+ this.code = code;
+ this.codeSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorCauseData getData() {
+ return data;
+ }
+
+ @Override
+ public OFBadRequestErrorMsg.Builder setData(OFErrorCauseData data) {
+ this.data = data;
+ this.dataSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBadRequestErrorMsg build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ OFBadRequestCode code = this.codeSet ? this.code : parentMessage.code;
+ if(code == null)
+ throw new NullPointerException("Property code must not be null");
+ OFErrorCauseData data = this.dataSet ? this.data : parentMessage.data;
+ if(data == null)
+ throw new NullPointerException("Property data must not be null");
+
+ //
+ return new OFBadRequestErrorMsgVer13(
+ xid,
+ code,
+ data
+ );
+ }
+
+ }
+
+ static class Builder implements OFBadRequestErrorMsg.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean codeSet;
+ private OFBadRequestCode code;
+ private boolean dataSet;
+ private OFErrorCauseData data;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ERROR;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBadRequestErrorMsg.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorType getErrType() {
+ return OFErrorType.BAD_REQUEST;
+ }
+
+ @Override
+ public OFBadRequestCode getCode() {
+ return code;
+ }
+
+ @Override
+ public OFBadRequestErrorMsg.Builder setCode(OFBadRequestCode code) {
+ this.code = code;
+ this.codeSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorCauseData getData() {
+ return data;
+ }
+
+ @Override
+ public OFBadRequestErrorMsg.Builder setData(OFErrorCauseData data) {
+ this.data = data;
+ this.dataSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBadRequestErrorMsg build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ if(!this.codeSet)
+ throw new IllegalStateException("Property code doesn't have default value -- must be set");
+ if(code == null)
+ throw new NullPointerException("Property code must not be null");
+ OFErrorCauseData data = this.dataSet ? this.data : DEFAULT_DATA;
+ if(data == null)
+ throw new NullPointerException("Property data must not be null");
+
+
+ return new OFBadRequestErrorMsgVer13(
+ xid,
+ code,
+ data
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBadRequestErrorMsg> {
+ @Override
+ public OFBadRequestErrorMsg readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 1
+ byte type = bb.readByte();
+ if(type != (byte) 0x1)
+ throw new OFParseError("Wrong type: Expected=OFType.ERROR(1), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property errType == 1
+ short errType = bb.readShort();
+ if(errType != (short) 0x1)
+ throw new OFParseError("Wrong errType: Expected=OFErrorType.BAD_REQUEST(1), got="+errType);
+ OFBadRequestCode code = OFBadRequestCodeSerializerVer13.readFrom(bb);
+ OFErrorCauseData data = OFErrorCauseData.read(bb, length - (bb.readerIndex() - start), OFVersion.OF_13);
+
+ OFBadRequestErrorMsgVer13 badRequestErrorMsgVer13 = new OFBadRequestErrorMsgVer13(
+ xid,
+ code,
+ data
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", badRequestErrorMsgVer13);
+ return badRequestErrorMsgVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBadRequestErrorMsgVer13Funnel FUNNEL = new OFBadRequestErrorMsgVer13Funnel();
+ static class OFBadRequestErrorMsgVer13Funnel implements Funnel<OFBadRequestErrorMsgVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBadRequestErrorMsgVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 1
+ sink.putByte((byte) 0x1);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property errType = 1
+ sink.putShort((short) 0x1);
+ OFBadRequestCodeSerializerVer13.putTo(message.code, sink);
+ message.data.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBadRequestErrorMsgVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBadRequestErrorMsgVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 1
+ bb.writeByte((byte) 0x1);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property errType = 1
+ bb.writeShort((short) 0x1);
+ OFBadRequestCodeSerializerVer13.writeTo(bb, message.code);
+ message.data.writeTo(bb);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBadRequestErrorMsgVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("code=").append(code);
+ b.append(", ");
+ b.append("data=").append(data);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBadRequestErrorMsgVer13 other = (OFBadRequestErrorMsgVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (code == null) {
+ if (other.code != null)
+ return false;
+ } else if (!code.equals(other.code))
+ return false;
+ if (data == null) {
+ if (other.data != null)
+ return false;
+ } else if (!data.equals(other.data))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((code == null) ? 0 : code.hashCode());
+ result = prime * result + ((data == null) ? 0 : data.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBarrierReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBarrierReplyVer13.java
new file mode 100644
index 0000000..a0b2ee1
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBarrierReplyVer13.java
@@ -0,0 +1,268 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBarrierReplyVer13 implements OFBarrierReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFBarrierReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static long DEFAULT_XID = 0x0L;
+
+ // OF message fields
+ private final long xid;
+//
+ // Immutable default instance
+ final static OFBarrierReplyVer13 DEFAULT = new OFBarrierReplyVer13(
+ DEFAULT_XID
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBarrierReplyVer13(long xid) {
+ this.xid = xid;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.BARRIER_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+
+
+ public OFBarrierReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBarrierReply.Builder {
+ final OFBarrierReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+
+ BuilderWithParent(OFBarrierReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.BARRIER_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBarrierReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBarrierReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+
+ //
+ return new OFBarrierReplyVer13(
+ xid
+ );
+ }
+
+ }
+
+ static class Builder implements OFBarrierReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.BARRIER_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBarrierReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBarrierReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+
+
+ return new OFBarrierReplyVer13(
+ xid
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBarrierReply> {
+ @Override
+ public OFBarrierReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 21
+ byte type = bb.readByte();
+ if(type != (byte) 0x15)
+ throw new OFParseError("Wrong type: Expected=OFType.BARRIER_REPLY(21), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 8)
+ throw new OFParseError("Wrong length: Expected=8(8), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+
+ OFBarrierReplyVer13 barrierReplyVer13 = new OFBarrierReplyVer13(
+ xid
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", barrierReplyVer13);
+ return barrierReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBarrierReplyVer13Funnel FUNNEL = new OFBarrierReplyVer13Funnel();
+ static class OFBarrierReplyVer13Funnel implements Funnel<OFBarrierReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBarrierReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 21
+ sink.putByte((byte) 0x15);
+ // fixed value property length = 8
+ sink.putShort((short) 0x8);
+ sink.putLong(message.xid);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBarrierReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBarrierReplyVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 21
+ bb.writeByte((byte) 0x15);
+ // fixed value property length = 8
+ bb.writeShort((short) 0x8);
+ bb.writeInt(U32.t(message.xid));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBarrierReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBarrierReplyVer13 other = (OFBarrierReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBarrierRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBarrierRequestVer13.java
new file mode 100644
index 0000000..542294e
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBarrierRequestVer13.java
@@ -0,0 +1,268 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBarrierRequestVer13 implements OFBarrierRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFBarrierRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static long DEFAULT_XID = 0x0L;
+
+ // OF message fields
+ private final long xid;
+//
+ // Immutable default instance
+ final static OFBarrierRequestVer13 DEFAULT = new OFBarrierRequestVer13(
+ DEFAULT_XID
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBarrierRequestVer13(long xid) {
+ this.xid = xid;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.BARRIER_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+
+
+ public OFBarrierRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBarrierRequest.Builder {
+ final OFBarrierRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+
+ BuilderWithParent(OFBarrierRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.BARRIER_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBarrierRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBarrierRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+
+ //
+ return new OFBarrierRequestVer13(
+ xid
+ );
+ }
+
+ }
+
+ static class Builder implements OFBarrierRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.BARRIER_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBarrierRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBarrierRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+
+
+ return new OFBarrierRequestVer13(
+ xid
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBarrierRequest> {
+ @Override
+ public OFBarrierRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 20
+ byte type = bb.readByte();
+ if(type != (byte) 0x14)
+ throw new OFParseError("Wrong type: Expected=OFType.BARRIER_REQUEST(20), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 8)
+ throw new OFParseError("Wrong length: Expected=8(8), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+
+ OFBarrierRequestVer13 barrierRequestVer13 = new OFBarrierRequestVer13(
+ xid
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", barrierRequestVer13);
+ return barrierRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBarrierRequestVer13Funnel FUNNEL = new OFBarrierRequestVer13Funnel();
+ static class OFBarrierRequestVer13Funnel implements Funnel<OFBarrierRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBarrierRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 20
+ sink.putByte((byte) 0x14);
+ // fixed value property length = 8
+ sink.putShort((short) 0x8);
+ sink.putLong(message.xid);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBarrierRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBarrierRequestVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 20
+ bb.writeByte((byte) 0x14);
+ // fixed value property length = 8
+ bb.writeShort((short) 0x8);
+ bb.writeInt(U32.t(message.xid));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBarrierRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBarrierRequestVer13 other = (OFBarrierRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnArpIdleVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnArpIdleVer13.java
new file mode 100644
index 0000000..d9142d0
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnArpIdleVer13.java
@@ -0,0 +1,420 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnArpIdleVer13 implements OFBsnArpIdle {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnArpIdleVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 24;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static int DEFAULT_VLAN_VID = 0x0;
+ private final static IPv4Address DEFAULT_IPV4_ADDR = IPv4Address.NONE;
+
+ // OF message fields
+ private final long xid;
+ private final int vlanVid;
+ private final IPv4Address ipv4Addr;
+//
+ // Immutable default instance
+ final static OFBsnArpIdleVer13 DEFAULT = new OFBsnArpIdleVer13(
+ DEFAULT_XID, DEFAULT_VLAN_VID, DEFAULT_IPV4_ADDR
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnArpIdleVer13(long xid, int vlanVid, IPv4Address ipv4Addr) {
+ this.xid = xid;
+ this.vlanVid = vlanVid;
+ this.ipv4Addr = ipv4Addr;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x3cL;
+ }
+
+ @Override
+ public int getVlanVid() {
+ return vlanVid;
+ }
+
+ @Override
+ public IPv4Address getIpv4Addr() {
+ return ipv4Addr;
+ }
+
+
+
+ public OFBsnArpIdle.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnArpIdle.Builder {
+ final OFBsnArpIdleVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean vlanVidSet;
+ private int vlanVid;
+ private boolean ipv4AddrSet;
+ private IPv4Address ipv4Addr;
+
+ BuilderWithParent(OFBsnArpIdleVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnArpIdle.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x3cL;
+ }
+
+ @Override
+ public int getVlanVid() {
+ return vlanVid;
+ }
+
+ @Override
+ public OFBsnArpIdle.Builder setVlanVid(int vlanVid) {
+ this.vlanVid = vlanVid;
+ this.vlanVidSet = true;
+ return this;
+ }
+ @Override
+ public IPv4Address getIpv4Addr() {
+ return ipv4Addr;
+ }
+
+ @Override
+ public OFBsnArpIdle.Builder setIpv4Addr(IPv4Address ipv4Addr) {
+ this.ipv4Addr = ipv4Addr;
+ this.ipv4AddrSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnArpIdle build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ int vlanVid = this.vlanVidSet ? this.vlanVid : parentMessage.vlanVid;
+ IPv4Address ipv4Addr = this.ipv4AddrSet ? this.ipv4Addr : parentMessage.ipv4Addr;
+ if(ipv4Addr == null)
+ throw new NullPointerException("Property ipv4Addr must not be null");
+
+ //
+ return new OFBsnArpIdleVer13(
+ xid,
+ vlanVid,
+ ipv4Addr
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnArpIdle.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean vlanVidSet;
+ private int vlanVid;
+ private boolean ipv4AddrSet;
+ private IPv4Address ipv4Addr;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnArpIdle.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x3cL;
+ }
+
+ @Override
+ public int getVlanVid() {
+ return vlanVid;
+ }
+
+ @Override
+ public OFBsnArpIdle.Builder setVlanVid(int vlanVid) {
+ this.vlanVid = vlanVid;
+ this.vlanVidSet = true;
+ return this;
+ }
+ @Override
+ public IPv4Address getIpv4Addr() {
+ return ipv4Addr;
+ }
+
+ @Override
+ public OFBsnArpIdle.Builder setIpv4Addr(IPv4Address ipv4Addr) {
+ this.ipv4Addr = ipv4Addr;
+ this.ipv4AddrSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnArpIdle build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ int vlanVid = this.vlanVidSet ? this.vlanVid : DEFAULT_VLAN_VID;
+ IPv4Address ipv4Addr = this.ipv4AddrSet ? this.ipv4Addr : DEFAULT_IPV4_ADDR;
+ if(ipv4Addr == null)
+ throw new NullPointerException("Property ipv4Addr must not be null");
+
+
+ return new OFBsnArpIdleVer13(
+ xid,
+ vlanVid,
+ ipv4Addr
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnArpIdle> {
+ @Override
+ public OFBsnArpIdle readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 4
+ byte type = bb.readByte();
+ if(type != (byte) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 24)
+ throw new OFParseError("Wrong length: Expected=24(24), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x3cL
+ int subtype = bb.readInt();
+ if(subtype != 0x3c)
+ throw new OFParseError("Wrong subtype: Expected=0x3cL(0x3cL), got="+subtype);
+ int vlanVid = U16.f(bb.readShort());
+ // pad: 2 bytes
+ bb.skipBytes(2);
+ IPv4Address ipv4Addr = IPv4Address.read4Bytes(bb);
+
+ OFBsnArpIdleVer13 bsnArpIdleVer13 = new OFBsnArpIdleVer13(
+ xid,
+ vlanVid,
+ ipv4Addr
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnArpIdleVer13);
+ return bsnArpIdleVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnArpIdleVer13Funnel FUNNEL = new OFBsnArpIdleVer13Funnel();
+ static class OFBsnArpIdleVer13Funnel implements Funnel<OFBsnArpIdleVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnArpIdleVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property length = 24
+ sink.putShort((short) 0x18);
+ sink.putLong(message.xid);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x3cL
+ sink.putInt(0x3c);
+ sink.putInt(message.vlanVid);
+ // skip pad (2 bytes)
+ message.ipv4Addr.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnArpIdleVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnArpIdleVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property length = 24
+ bb.writeShort((short) 0x18);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x3cL
+ bb.writeInt(0x3c);
+ bb.writeShort(U16.t(message.vlanVid));
+ // pad: 2 bytes
+ bb.writeZero(2);
+ message.ipv4Addr.write4Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnArpIdleVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("vlanVid=").append(vlanVid);
+ b.append(", ");
+ b.append("ipv4Addr=").append(ipv4Addr);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnArpIdleVer13 other = (OFBsnArpIdleVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if( vlanVid != other.vlanVid)
+ return false;
+ if (ipv4Addr == null) {
+ if (other.ipv4Addr != null)
+ return false;
+ } else if (!ipv4Addr.equals(other.ipv4Addr))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + vlanVid;
+ result = prime * result + ((ipv4Addr == null) ? 0 : ipv4Addr.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnBwClearDataReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnBwClearDataReplyVer13.java
new file mode 100644
index 0000000..76559ed
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnBwClearDataReplyVer13.java
@@ -0,0 +1,361 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnBwClearDataReplyVer13 implements OFBsnBwClearDataReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnBwClearDataReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 20;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static long DEFAULT_STATUS = 0x0L;
+
+ // OF message fields
+ private final long xid;
+ private final long status;
+//
+ // Immutable default instance
+ final static OFBsnBwClearDataReplyVer13 DEFAULT = new OFBsnBwClearDataReplyVer13(
+ DEFAULT_XID, DEFAULT_STATUS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnBwClearDataReplyVer13(long xid, long status) {
+ this.xid = xid;
+ this.status = status;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x16L;
+ }
+
+ @Override
+ public long getStatus() {
+ return status;
+ }
+
+
+
+ public OFBsnBwClearDataReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnBwClearDataReply.Builder {
+ final OFBsnBwClearDataReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean statusSet;
+ private long status;
+
+ BuilderWithParent(OFBsnBwClearDataReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnBwClearDataReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x16L;
+ }
+
+ @Override
+ public long getStatus() {
+ return status;
+ }
+
+ @Override
+ public OFBsnBwClearDataReply.Builder setStatus(long status) {
+ this.status = status;
+ this.statusSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnBwClearDataReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ long status = this.statusSet ? this.status : parentMessage.status;
+
+ //
+ return new OFBsnBwClearDataReplyVer13(
+ xid,
+ status
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnBwClearDataReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean statusSet;
+ private long status;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnBwClearDataReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x16L;
+ }
+
+ @Override
+ public long getStatus() {
+ return status;
+ }
+
+ @Override
+ public OFBsnBwClearDataReply.Builder setStatus(long status) {
+ this.status = status;
+ this.statusSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnBwClearDataReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ long status = this.statusSet ? this.status : DEFAULT_STATUS;
+
+
+ return new OFBsnBwClearDataReplyVer13(
+ xid,
+ status
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnBwClearDataReply> {
+ @Override
+ public OFBsnBwClearDataReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 4
+ byte type = bb.readByte();
+ if(type != (byte) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 20)
+ throw new OFParseError("Wrong length: Expected=20(20), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x16L
+ int subtype = bb.readInt();
+ if(subtype != 0x16)
+ throw new OFParseError("Wrong subtype: Expected=0x16L(0x16L), got="+subtype);
+ long status = U32.f(bb.readInt());
+
+ OFBsnBwClearDataReplyVer13 bsnBwClearDataReplyVer13 = new OFBsnBwClearDataReplyVer13(
+ xid,
+ status
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnBwClearDataReplyVer13);
+ return bsnBwClearDataReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnBwClearDataReplyVer13Funnel FUNNEL = new OFBsnBwClearDataReplyVer13Funnel();
+ static class OFBsnBwClearDataReplyVer13Funnel implements Funnel<OFBsnBwClearDataReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnBwClearDataReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property length = 20
+ sink.putShort((short) 0x14);
+ sink.putLong(message.xid);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x16L
+ sink.putInt(0x16);
+ sink.putLong(message.status);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnBwClearDataReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnBwClearDataReplyVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property length = 20
+ bb.writeShort((short) 0x14);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x16L
+ bb.writeInt(0x16);
+ bb.writeInt(U32.t(message.status));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnBwClearDataReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("status=").append(status);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnBwClearDataReplyVer13 other = (OFBsnBwClearDataReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if( status != other.status)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * (int) (status ^ (status >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnBwClearDataRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnBwClearDataRequestVer13.java
new file mode 100644
index 0000000..3d7a03e
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnBwClearDataRequestVer13.java
@@ -0,0 +1,314 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnBwClearDataRequestVer13 implements OFBsnBwClearDataRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnBwClearDataRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 16;
+
+ private final static long DEFAULT_XID = 0x0L;
+
+ // OF message fields
+ private final long xid;
+//
+ // Immutable default instance
+ final static OFBsnBwClearDataRequestVer13 DEFAULT = new OFBsnBwClearDataRequestVer13(
+ DEFAULT_XID
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnBwClearDataRequestVer13(long xid) {
+ this.xid = xid;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x15L;
+ }
+
+
+
+ public OFBsnBwClearDataRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnBwClearDataRequest.Builder {
+ final OFBsnBwClearDataRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+
+ BuilderWithParent(OFBsnBwClearDataRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnBwClearDataRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x15L;
+ }
+
+
+
+ @Override
+ public OFBsnBwClearDataRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+
+ //
+ return new OFBsnBwClearDataRequestVer13(
+ xid
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnBwClearDataRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnBwClearDataRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x15L;
+ }
+
+//
+ @Override
+ public OFBsnBwClearDataRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+
+
+ return new OFBsnBwClearDataRequestVer13(
+ xid
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnBwClearDataRequest> {
+ @Override
+ public OFBsnBwClearDataRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 4
+ byte type = bb.readByte();
+ if(type != (byte) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 16)
+ throw new OFParseError("Wrong length: Expected=16(16), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x15L
+ int subtype = bb.readInt();
+ if(subtype != 0x15)
+ throw new OFParseError("Wrong subtype: Expected=0x15L(0x15L), got="+subtype);
+
+ OFBsnBwClearDataRequestVer13 bsnBwClearDataRequestVer13 = new OFBsnBwClearDataRequestVer13(
+ xid
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnBwClearDataRequestVer13);
+ return bsnBwClearDataRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnBwClearDataRequestVer13Funnel FUNNEL = new OFBsnBwClearDataRequestVer13Funnel();
+ static class OFBsnBwClearDataRequestVer13Funnel implements Funnel<OFBsnBwClearDataRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnBwClearDataRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property length = 16
+ sink.putShort((short) 0x10);
+ sink.putLong(message.xid);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x15L
+ sink.putInt(0x15);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnBwClearDataRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnBwClearDataRequestVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property length = 16
+ bb.writeShort((short) 0x10);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x15L
+ bb.writeInt(0x15);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnBwClearDataRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnBwClearDataRequestVer13 other = (OFBsnBwClearDataRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnBwEnableGetReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnBwEnableGetReplyVer13.java
new file mode 100644
index 0000000..790cf84
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnBwEnableGetReplyVer13.java
@@ -0,0 +1,361 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnBwEnableGetReplyVer13 implements OFBsnBwEnableGetReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnBwEnableGetReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 20;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static long DEFAULT_ENABLED = 0x0L;
+
+ // OF message fields
+ private final long xid;
+ private final long enabled;
+//
+ // Immutable default instance
+ final static OFBsnBwEnableGetReplyVer13 DEFAULT = new OFBsnBwEnableGetReplyVer13(
+ DEFAULT_XID, DEFAULT_ENABLED
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnBwEnableGetReplyVer13(long xid, long enabled) {
+ this.xid = xid;
+ this.enabled = enabled;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x14L;
+ }
+
+ @Override
+ public long getEnabled() {
+ return enabled;
+ }
+
+
+
+ public OFBsnBwEnableGetReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnBwEnableGetReply.Builder {
+ final OFBsnBwEnableGetReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean enabledSet;
+ private long enabled;
+
+ BuilderWithParent(OFBsnBwEnableGetReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnBwEnableGetReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x14L;
+ }
+
+ @Override
+ public long getEnabled() {
+ return enabled;
+ }
+
+ @Override
+ public OFBsnBwEnableGetReply.Builder setEnabled(long enabled) {
+ this.enabled = enabled;
+ this.enabledSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnBwEnableGetReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ long enabled = this.enabledSet ? this.enabled : parentMessage.enabled;
+
+ //
+ return new OFBsnBwEnableGetReplyVer13(
+ xid,
+ enabled
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnBwEnableGetReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean enabledSet;
+ private long enabled;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnBwEnableGetReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x14L;
+ }
+
+ @Override
+ public long getEnabled() {
+ return enabled;
+ }
+
+ @Override
+ public OFBsnBwEnableGetReply.Builder setEnabled(long enabled) {
+ this.enabled = enabled;
+ this.enabledSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnBwEnableGetReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ long enabled = this.enabledSet ? this.enabled : DEFAULT_ENABLED;
+
+
+ return new OFBsnBwEnableGetReplyVer13(
+ xid,
+ enabled
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnBwEnableGetReply> {
+ @Override
+ public OFBsnBwEnableGetReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 4
+ byte type = bb.readByte();
+ if(type != (byte) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 20)
+ throw new OFParseError("Wrong length: Expected=20(20), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x14L
+ int subtype = bb.readInt();
+ if(subtype != 0x14)
+ throw new OFParseError("Wrong subtype: Expected=0x14L(0x14L), got="+subtype);
+ long enabled = U32.f(bb.readInt());
+
+ OFBsnBwEnableGetReplyVer13 bsnBwEnableGetReplyVer13 = new OFBsnBwEnableGetReplyVer13(
+ xid,
+ enabled
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnBwEnableGetReplyVer13);
+ return bsnBwEnableGetReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnBwEnableGetReplyVer13Funnel FUNNEL = new OFBsnBwEnableGetReplyVer13Funnel();
+ static class OFBsnBwEnableGetReplyVer13Funnel implements Funnel<OFBsnBwEnableGetReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnBwEnableGetReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property length = 20
+ sink.putShort((short) 0x14);
+ sink.putLong(message.xid);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x14L
+ sink.putInt(0x14);
+ sink.putLong(message.enabled);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnBwEnableGetReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnBwEnableGetReplyVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property length = 20
+ bb.writeShort((short) 0x14);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x14L
+ bb.writeInt(0x14);
+ bb.writeInt(U32.t(message.enabled));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnBwEnableGetReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("enabled=").append(enabled);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnBwEnableGetReplyVer13 other = (OFBsnBwEnableGetReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if( enabled != other.enabled)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * (int) (enabled ^ (enabled >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnBwEnableGetRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnBwEnableGetRequestVer13.java
new file mode 100644
index 0000000..f53670a
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnBwEnableGetRequestVer13.java
@@ -0,0 +1,314 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnBwEnableGetRequestVer13 implements OFBsnBwEnableGetRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnBwEnableGetRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 16;
+
+ private final static long DEFAULT_XID = 0x0L;
+
+ // OF message fields
+ private final long xid;
+//
+ // Immutable default instance
+ final static OFBsnBwEnableGetRequestVer13 DEFAULT = new OFBsnBwEnableGetRequestVer13(
+ DEFAULT_XID
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnBwEnableGetRequestVer13(long xid) {
+ this.xid = xid;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x13L;
+ }
+
+
+
+ public OFBsnBwEnableGetRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnBwEnableGetRequest.Builder {
+ final OFBsnBwEnableGetRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+
+ BuilderWithParent(OFBsnBwEnableGetRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnBwEnableGetRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x13L;
+ }
+
+
+
+ @Override
+ public OFBsnBwEnableGetRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+
+ //
+ return new OFBsnBwEnableGetRequestVer13(
+ xid
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnBwEnableGetRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnBwEnableGetRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x13L;
+ }
+
+//
+ @Override
+ public OFBsnBwEnableGetRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+
+
+ return new OFBsnBwEnableGetRequestVer13(
+ xid
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnBwEnableGetRequest> {
+ @Override
+ public OFBsnBwEnableGetRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 4
+ byte type = bb.readByte();
+ if(type != (byte) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 16)
+ throw new OFParseError("Wrong length: Expected=16(16), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x13L
+ int subtype = bb.readInt();
+ if(subtype != 0x13)
+ throw new OFParseError("Wrong subtype: Expected=0x13L(0x13L), got="+subtype);
+
+ OFBsnBwEnableGetRequestVer13 bsnBwEnableGetRequestVer13 = new OFBsnBwEnableGetRequestVer13(
+ xid
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnBwEnableGetRequestVer13);
+ return bsnBwEnableGetRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnBwEnableGetRequestVer13Funnel FUNNEL = new OFBsnBwEnableGetRequestVer13Funnel();
+ static class OFBsnBwEnableGetRequestVer13Funnel implements Funnel<OFBsnBwEnableGetRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnBwEnableGetRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property length = 16
+ sink.putShort((short) 0x10);
+ sink.putLong(message.xid);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x13L
+ sink.putInt(0x13);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnBwEnableGetRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnBwEnableGetRequestVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property length = 16
+ bb.writeShort((short) 0x10);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x13L
+ bb.writeInt(0x13);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnBwEnableGetRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnBwEnableGetRequestVer13 other = (OFBsnBwEnableGetRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnBwEnableSetReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnBwEnableSetReplyVer13.java
new file mode 100644
index 0000000..31c4e20
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnBwEnableSetReplyVer13.java
@@ -0,0 +1,408 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import java.util.Set;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnBwEnableSetReplyVer13 implements OFBsnBwEnableSetReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnBwEnableSetReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 24;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static long DEFAULT_ENABLE = 0x0L;
+ private final static long DEFAULT_STATUS = 0x0L;
+
+ // OF message fields
+ private final long xid;
+ private final long enable;
+ private final long status;
+//
+ // Immutable default instance
+ final static OFBsnBwEnableSetReplyVer13 DEFAULT = new OFBsnBwEnableSetReplyVer13(
+ DEFAULT_XID, DEFAULT_ENABLE, DEFAULT_STATUS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnBwEnableSetReplyVer13(long xid, long enable, long status) {
+ this.xid = xid;
+ this.enable = enable;
+ this.status = status;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x17L;
+ }
+
+ @Override
+ public long getEnable() {
+ return enable;
+ }
+
+ @Override
+ public long getStatus() {
+ return status;
+ }
+
+
+
+ public OFBsnBwEnableSetReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnBwEnableSetReply.Builder {
+ final OFBsnBwEnableSetReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean enableSet;
+ private long enable;
+ private boolean statusSet;
+ private long status;
+
+ BuilderWithParent(OFBsnBwEnableSetReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnBwEnableSetReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x17L;
+ }
+
+ @Override
+ public long getEnable() {
+ return enable;
+ }
+
+ @Override
+ public OFBsnBwEnableSetReply.Builder setEnable(long enable) {
+ this.enable = enable;
+ this.enableSet = true;
+ return this;
+ }
+ @Override
+ public long getStatus() {
+ return status;
+ }
+
+ @Override
+ public OFBsnBwEnableSetReply.Builder setStatus(long status) {
+ this.status = status;
+ this.statusSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnBwEnableSetReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ long enable = this.enableSet ? this.enable : parentMessage.enable;
+ long status = this.statusSet ? this.status : parentMessage.status;
+
+ //
+ return new OFBsnBwEnableSetReplyVer13(
+ xid,
+ enable,
+ status
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnBwEnableSetReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean enableSet;
+ private long enable;
+ private boolean statusSet;
+ private long status;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnBwEnableSetReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x17L;
+ }
+
+ @Override
+ public long getEnable() {
+ return enable;
+ }
+
+ @Override
+ public OFBsnBwEnableSetReply.Builder setEnable(long enable) {
+ this.enable = enable;
+ this.enableSet = true;
+ return this;
+ }
+ @Override
+ public long getStatus() {
+ return status;
+ }
+
+ @Override
+ public OFBsnBwEnableSetReply.Builder setStatus(long status) {
+ this.status = status;
+ this.statusSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnBwEnableSetReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ long enable = this.enableSet ? this.enable : DEFAULT_ENABLE;
+ long status = this.statusSet ? this.status : DEFAULT_STATUS;
+
+
+ return new OFBsnBwEnableSetReplyVer13(
+ xid,
+ enable,
+ status
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnBwEnableSetReply> {
+ @Override
+ public OFBsnBwEnableSetReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 4
+ byte type = bb.readByte();
+ if(type != (byte) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 24)
+ throw new OFParseError("Wrong length: Expected=24(24), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x17L
+ int subtype = bb.readInt();
+ if(subtype != 0x17)
+ throw new OFParseError("Wrong subtype: Expected=0x17L(0x17L), got="+subtype);
+ long enable = U32.f(bb.readInt());
+ long status = U32.f(bb.readInt());
+
+ OFBsnBwEnableSetReplyVer13 bsnBwEnableSetReplyVer13 = new OFBsnBwEnableSetReplyVer13(
+ xid,
+ enable,
+ status
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnBwEnableSetReplyVer13);
+ return bsnBwEnableSetReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnBwEnableSetReplyVer13Funnel FUNNEL = new OFBsnBwEnableSetReplyVer13Funnel();
+ static class OFBsnBwEnableSetReplyVer13Funnel implements Funnel<OFBsnBwEnableSetReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnBwEnableSetReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property length = 24
+ sink.putShort((short) 0x18);
+ sink.putLong(message.xid);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x17L
+ sink.putInt(0x17);
+ sink.putLong(message.enable);
+ sink.putLong(message.status);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnBwEnableSetReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnBwEnableSetReplyVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property length = 24
+ bb.writeShort((short) 0x18);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x17L
+ bb.writeInt(0x17);
+ bb.writeInt(U32.t(message.enable));
+ bb.writeInt(U32.t(message.status));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnBwEnableSetReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("enable=").append(enable);
+ b.append(", ");
+ b.append("status=").append(status);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnBwEnableSetReplyVer13 other = (OFBsnBwEnableSetReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if( enable != other.enable)
+ return false;
+ if( status != other.status)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * (int) (enable ^ (enable >>> 32));
+ result = prime * (int) (status ^ (status >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnBwEnableSetRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnBwEnableSetRequestVer13.java
new file mode 100644
index 0000000..c11d81f
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnBwEnableSetRequestVer13.java
@@ -0,0 +1,361 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import java.util.Set;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnBwEnableSetRequestVer13 implements OFBsnBwEnableSetRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnBwEnableSetRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 20;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static long DEFAULT_ENABLE = 0x0L;
+
+ // OF message fields
+ private final long xid;
+ private final long enable;
+//
+ // Immutable default instance
+ final static OFBsnBwEnableSetRequestVer13 DEFAULT = new OFBsnBwEnableSetRequestVer13(
+ DEFAULT_XID, DEFAULT_ENABLE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnBwEnableSetRequestVer13(long xid, long enable) {
+ this.xid = xid;
+ this.enable = enable;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x12L;
+ }
+
+ @Override
+ public long getEnable() {
+ return enable;
+ }
+
+
+
+ public OFBsnBwEnableSetRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnBwEnableSetRequest.Builder {
+ final OFBsnBwEnableSetRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean enableSet;
+ private long enable;
+
+ BuilderWithParent(OFBsnBwEnableSetRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnBwEnableSetRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x12L;
+ }
+
+ @Override
+ public long getEnable() {
+ return enable;
+ }
+
+ @Override
+ public OFBsnBwEnableSetRequest.Builder setEnable(long enable) {
+ this.enable = enable;
+ this.enableSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnBwEnableSetRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ long enable = this.enableSet ? this.enable : parentMessage.enable;
+
+ //
+ return new OFBsnBwEnableSetRequestVer13(
+ xid,
+ enable
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnBwEnableSetRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean enableSet;
+ private long enable;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnBwEnableSetRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x12L;
+ }
+
+ @Override
+ public long getEnable() {
+ return enable;
+ }
+
+ @Override
+ public OFBsnBwEnableSetRequest.Builder setEnable(long enable) {
+ this.enable = enable;
+ this.enableSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnBwEnableSetRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ long enable = this.enableSet ? this.enable : DEFAULT_ENABLE;
+
+
+ return new OFBsnBwEnableSetRequestVer13(
+ xid,
+ enable
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnBwEnableSetRequest> {
+ @Override
+ public OFBsnBwEnableSetRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 4
+ byte type = bb.readByte();
+ if(type != (byte) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 20)
+ throw new OFParseError("Wrong length: Expected=20(20), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x12L
+ int subtype = bb.readInt();
+ if(subtype != 0x12)
+ throw new OFParseError("Wrong subtype: Expected=0x12L(0x12L), got="+subtype);
+ long enable = U32.f(bb.readInt());
+
+ OFBsnBwEnableSetRequestVer13 bsnBwEnableSetRequestVer13 = new OFBsnBwEnableSetRequestVer13(
+ xid,
+ enable
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnBwEnableSetRequestVer13);
+ return bsnBwEnableSetRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnBwEnableSetRequestVer13Funnel FUNNEL = new OFBsnBwEnableSetRequestVer13Funnel();
+ static class OFBsnBwEnableSetRequestVer13Funnel implements Funnel<OFBsnBwEnableSetRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnBwEnableSetRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property length = 20
+ sink.putShort((short) 0x14);
+ sink.putLong(message.xid);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x12L
+ sink.putInt(0x12);
+ sink.putLong(message.enable);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnBwEnableSetRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnBwEnableSetRequestVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property length = 20
+ bb.writeShort((short) 0x14);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x12L
+ bb.writeInt(0x12);
+ bb.writeInt(U32.t(message.enable));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnBwEnableSetRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("enable=").append(enable);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnBwEnableSetRequestVer13 other = (OFBsnBwEnableSetRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if( enable != other.enable)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * (int) (enable ^ (enable >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnControllerConnectionStateSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnControllerConnectionStateSerializerVer13.java
new file mode 100644
index 0000000..176c93f
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnControllerConnectionStateSerializerVer13.java
@@ -0,0 +1,74 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFBsnControllerConnectionState;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+
+public class OFBsnControllerConnectionStateSerializerVer13 {
+
+ public final static byte BSN_CONTROLLER_CONNECTION_STATE_DISCONNECTED_VAL = (byte) 0x0;
+ public final static byte BSN_CONTROLLER_CONNECTION_STATE_CONNECTED_VAL = (byte) 0x1;
+
+ public static OFBsnControllerConnectionState readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readByte());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, OFBsnControllerConnectionState e) {
+ bb.writeByte(toWireValue(e));
+ }
+
+ public static void putTo(OFBsnControllerConnectionState e, PrimitiveSink sink) {
+ sink.putByte(toWireValue(e));
+ }
+
+ public static OFBsnControllerConnectionState ofWireValue(byte val) {
+ switch(val) {
+ case BSN_CONTROLLER_CONNECTION_STATE_DISCONNECTED_VAL:
+ return OFBsnControllerConnectionState.BSN_CONTROLLER_CONNECTION_STATE_DISCONNECTED;
+ case BSN_CONTROLLER_CONNECTION_STATE_CONNECTED_VAL:
+ return OFBsnControllerConnectionState.BSN_CONTROLLER_CONNECTION_STATE_CONNECTED;
+ default:
+ throw new IllegalArgumentException("Illegal wire value for type OFBsnControllerConnectionState in version 1.3: " + val);
+ }
+ }
+
+
+ public static byte toWireValue(OFBsnControllerConnectionState e) {
+ switch(e) {
+ case BSN_CONTROLLER_CONNECTION_STATE_DISCONNECTED:
+ return BSN_CONTROLLER_CONNECTION_STATE_DISCONNECTED_VAL;
+ case BSN_CONTROLLER_CONNECTION_STATE_CONNECTED:
+ return BSN_CONTROLLER_CONNECTION_STATE_CONNECTED_VAL;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFBsnControllerConnectionState in version 1.3: " + e);
+ }
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnControllerConnectionVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnControllerConnectionVer13.java
new file mode 100644
index 0000000..d2c9aa6
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnControllerConnectionVer13.java
@@ -0,0 +1,392 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnControllerConnectionVer13 implements OFBsnControllerConnection {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnControllerConnectionVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 264;
+
+ private final static OFAuxId DEFAULT_AUXILIARY_ID = OFAuxId.MAIN;
+ private final static String DEFAULT_URI = "";
+
+ // OF message fields
+ private final OFBsnControllerConnectionState state;
+ private final OFAuxId auxiliaryId;
+ private final OFControllerRole role;
+ private final String uri;
+//
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnControllerConnectionVer13(OFBsnControllerConnectionState state, OFAuxId auxiliaryId, OFControllerRole role, String uri) {
+ this.state = state;
+ this.auxiliaryId = auxiliaryId;
+ this.role = role;
+ this.uri = uri;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFBsnControllerConnectionState getState() {
+ return state;
+ }
+
+ @Override
+ public OFAuxId getAuxiliaryId() {
+ return auxiliaryId;
+ }
+
+ @Override
+ public OFControllerRole getRole() {
+ return role;
+ }
+
+ @Override
+ public String getUri() {
+ return uri;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFBsnControllerConnection.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnControllerConnection.Builder {
+ final OFBsnControllerConnectionVer13 parentMessage;
+
+ // OF message fields
+ private boolean stateSet;
+ private OFBsnControllerConnectionState state;
+ private boolean auxiliaryIdSet;
+ private OFAuxId auxiliaryId;
+ private boolean roleSet;
+ private OFControllerRole role;
+ private boolean uriSet;
+ private String uri;
+
+ BuilderWithParent(OFBsnControllerConnectionVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFBsnControllerConnectionState getState() {
+ return state;
+ }
+
+ @Override
+ public OFBsnControllerConnection.Builder setState(OFBsnControllerConnectionState state) {
+ this.state = state;
+ this.stateSet = true;
+ return this;
+ }
+ @Override
+ public OFAuxId getAuxiliaryId() {
+ return auxiliaryId;
+ }
+
+ @Override
+ public OFBsnControllerConnection.Builder setAuxiliaryId(OFAuxId auxiliaryId) {
+ this.auxiliaryId = auxiliaryId;
+ this.auxiliaryIdSet = true;
+ return this;
+ }
+ @Override
+ public OFControllerRole getRole() {
+ return role;
+ }
+
+ @Override
+ public OFBsnControllerConnection.Builder setRole(OFControllerRole role) {
+ this.role = role;
+ this.roleSet = true;
+ return this;
+ }
+ @Override
+ public String getUri() {
+ return uri;
+ }
+
+ @Override
+ public OFBsnControllerConnection.Builder setUri(String uri) {
+ this.uri = uri;
+ this.uriSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFBsnControllerConnection build() {
+ OFBsnControllerConnectionState state = this.stateSet ? this.state : parentMessage.state;
+ if(state == null)
+ throw new NullPointerException("Property state must not be null");
+ OFAuxId auxiliaryId = this.auxiliaryIdSet ? this.auxiliaryId : parentMessage.auxiliaryId;
+ if(auxiliaryId == null)
+ throw new NullPointerException("Property auxiliaryId must not be null");
+ OFControllerRole role = this.roleSet ? this.role : parentMessage.role;
+ if(role == null)
+ throw new NullPointerException("Property role must not be null");
+ String uri = this.uriSet ? this.uri : parentMessage.uri;
+ if(uri == null)
+ throw new NullPointerException("Property uri must not be null");
+
+ //
+ return new OFBsnControllerConnectionVer13(
+ state,
+ auxiliaryId,
+ role,
+ uri
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnControllerConnection.Builder {
+ // OF message fields
+ private boolean stateSet;
+ private OFBsnControllerConnectionState state;
+ private boolean auxiliaryIdSet;
+ private OFAuxId auxiliaryId;
+ private boolean roleSet;
+ private OFControllerRole role;
+ private boolean uriSet;
+ private String uri;
+
+ @Override
+ public OFBsnControllerConnectionState getState() {
+ return state;
+ }
+
+ @Override
+ public OFBsnControllerConnection.Builder setState(OFBsnControllerConnectionState state) {
+ this.state = state;
+ this.stateSet = true;
+ return this;
+ }
+ @Override
+ public OFAuxId getAuxiliaryId() {
+ return auxiliaryId;
+ }
+
+ @Override
+ public OFBsnControllerConnection.Builder setAuxiliaryId(OFAuxId auxiliaryId) {
+ this.auxiliaryId = auxiliaryId;
+ this.auxiliaryIdSet = true;
+ return this;
+ }
+ @Override
+ public OFControllerRole getRole() {
+ return role;
+ }
+
+ @Override
+ public OFBsnControllerConnection.Builder setRole(OFControllerRole role) {
+ this.role = role;
+ this.roleSet = true;
+ return this;
+ }
+ @Override
+ public String getUri() {
+ return uri;
+ }
+
+ @Override
+ public OFBsnControllerConnection.Builder setUri(String uri) {
+ this.uri = uri;
+ this.uriSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFBsnControllerConnection build() {
+ if(!this.stateSet)
+ throw new IllegalStateException("Property state doesn't have default value -- must be set");
+ if(state == null)
+ throw new NullPointerException("Property state must not be null");
+ OFAuxId auxiliaryId = this.auxiliaryIdSet ? this.auxiliaryId : DEFAULT_AUXILIARY_ID;
+ if(auxiliaryId == null)
+ throw new NullPointerException("Property auxiliaryId must not be null");
+ if(!this.roleSet)
+ throw new IllegalStateException("Property role doesn't have default value -- must be set");
+ if(role == null)
+ throw new NullPointerException("Property role must not be null");
+ String uri = this.uriSet ? this.uri : DEFAULT_URI;
+ if(uri == null)
+ throw new NullPointerException("Property uri must not be null");
+
+
+ return new OFBsnControllerConnectionVer13(
+ state,
+ auxiliaryId,
+ role,
+ uri
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnControllerConnection> {
+ @Override
+ public OFBsnControllerConnection readFrom(ChannelBuffer bb) throws OFParseError {
+ OFBsnControllerConnectionState state = OFBsnControllerConnectionStateSerializerVer13.readFrom(bb);
+ OFAuxId auxiliaryId = OFAuxId.readByte(bb);
+ // pad: 2 bytes
+ bb.skipBytes(2);
+ OFControllerRole role = OFControllerRoleSerializerVer13.readFrom(bb);
+ String uri = ChannelUtils.readFixedLengthString(bb, 256);
+
+ OFBsnControllerConnectionVer13 bsnControllerConnectionVer13 = new OFBsnControllerConnectionVer13(
+ state,
+ auxiliaryId,
+ role,
+ uri
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnControllerConnectionVer13);
+ return bsnControllerConnectionVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnControllerConnectionVer13Funnel FUNNEL = new OFBsnControllerConnectionVer13Funnel();
+ static class OFBsnControllerConnectionVer13Funnel implements Funnel<OFBsnControllerConnectionVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnControllerConnectionVer13 message, PrimitiveSink sink) {
+ OFBsnControllerConnectionStateSerializerVer13.putTo(message.state, sink);
+ message.auxiliaryId.putTo(sink);
+ // skip pad (2 bytes)
+ OFControllerRoleSerializerVer13.putTo(message.role, sink);
+ sink.putUnencodedChars(message.uri);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnControllerConnectionVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnControllerConnectionVer13 message) {
+ OFBsnControllerConnectionStateSerializerVer13.writeTo(bb, message.state);
+ message.auxiliaryId.writeByte(bb);
+ // pad: 2 bytes
+ bb.writeZero(2);
+ OFControllerRoleSerializerVer13.writeTo(bb, message.role);
+ ChannelUtils.writeFixedLengthString(bb, message.uri, 256);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnControllerConnectionVer13(");
+ b.append("state=").append(state);
+ b.append(", ");
+ b.append("auxiliaryId=").append(auxiliaryId);
+ b.append(", ");
+ b.append("role=").append(role);
+ b.append(", ");
+ b.append("uri=").append(uri);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnControllerConnectionVer13 other = (OFBsnControllerConnectionVer13) obj;
+
+ if (state == null) {
+ if (other.state != null)
+ return false;
+ } else if (!state.equals(other.state))
+ return false;
+ if (auxiliaryId == null) {
+ if (other.auxiliaryId != null)
+ return false;
+ } else if (!auxiliaryId.equals(other.auxiliaryId))
+ return false;
+ if (role == null) {
+ if (other.role != null)
+ return false;
+ } else if (!role.equals(other.role))
+ return false;
+ if (uri == null) {
+ if (other.uri != null)
+ return false;
+ } else if (!uri.equals(other.uri))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((state == null) ? 0 : state.hashCode());
+ result = prime * result + ((auxiliaryId == null) ? 0 : auxiliaryId.hashCode());
+ result = prime * result + ((role == null) ? 0 : role.hashCode());
+ result = prime * result + ((uri == null) ? 0 : uri.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnControllerConnectionsReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnControllerConnectionsReplyVer13.java
new file mode 100644
index 0000000..0491ffb
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnControllerConnectionsReplyVer13.java
@@ -0,0 +1,375 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnControllerConnectionsReplyVer13 implements OFBsnControllerConnectionsReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnControllerConnectionsReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 16;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static List<OFBsnControllerConnection> DEFAULT_CONNECTIONS = ImmutableList.<OFBsnControllerConnection>of();
+
+ // OF message fields
+ private final long xid;
+ private final List<OFBsnControllerConnection> connections;
+//
+ // Immutable default instance
+ final static OFBsnControllerConnectionsReplyVer13 DEFAULT = new OFBsnControllerConnectionsReplyVer13(
+ DEFAULT_XID, DEFAULT_CONNECTIONS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnControllerConnectionsReplyVer13(long xid, List<OFBsnControllerConnection> connections) {
+ this.xid = xid;
+ this.connections = connections;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x39L;
+ }
+
+ @Override
+ public List<OFBsnControllerConnection> getConnections() {
+ return connections;
+ }
+
+
+
+ public OFBsnControllerConnectionsReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnControllerConnectionsReply.Builder {
+ final OFBsnControllerConnectionsReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean connectionsSet;
+ private List<OFBsnControllerConnection> connections;
+
+ BuilderWithParent(OFBsnControllerConnectionsReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnControllerConnectionsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x39L;
+ }
+
+ @Override
+ public List<OFBsnControllerConnection> getConnections() {
+ return connections;
+ }
+
+ @Override
+ public OFBsnControllerConnectionsReply.Builder setConnections(List<OFBsnControllerConnection> connections) {
+ this.connections = connections;
+ this.connectionsSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnControllerConnectionsReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ List<OFBsnControllerConnection> connections = this.connectionsSet ? this.connections : parentMessage.connections;
+ if(connections == null)
+ throw new NullPointerException("Property connections must not be null");
+
+ //
+ return new OFBsnControllerConnectionsReplyVer13(
+ xid,
+ connections
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnControllerConnectionsReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean connectionsSet;
+ private List<OFBsnControllerConnection> connections;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnControllerConnectionsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x39L;
+ }
+
+ @Override
+ public List<OFBsnControllerConnection> getConnections() {
+ return connections;
+ }
+
+ @Override
+ public OFBsnControllerConnectionsReply.Builder setConnections(List<OFBsnControllerConnection> connections) {
+ this.connections = connections;
+ this.connectionsSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnControllerConnectionsReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ List<OFBsnControllerConnection> connections = this.connectionsSet ? this.connections : DEFAULT_CONNECTIONS;
+ if(connections == null)
+ throw new NullPointerException("Property connections must not be null");
+
+
+ return new OFBsnControllerConnectionsReplyVer13(
+ xid,
+ connections
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnControllerConnectionsReply> {
+ @Override
+ public OFBsnControllerConnectionsReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 4
+ byte type = bb.readByte();
+ if(type != (byte) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x39L
+ int subtype = bb.readInt();
+ if(subtype != 0x39)
+ throw new OFParseError("Wrong subtype: Expected=0x39L(0x39L), got="+subtype);
+ List<OFBsnControllerConnection> connections = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFBsnControllerConnectionVer13.READER);
+
+ OFBsnControllerConnectionsReplyVer13 bsnControllerConnectionsReplyVer13 = new OFBsnControllerConnectionsReplyVer13(
+ xid,
+ connections
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnControllerConnectionsReplyVer13);
+ return bsnControllerConnectionsReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnControllerConnectionsReplyVer13Funnel FUNNEL = new OFBsnControllerConnectionsReplyVer13Funnel();
+ static class OFBsnControllerConnectionsReplyVer13Funnel implements Funnel<OFBsnControllerConnectionsReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnControllerConnectionsReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 4
+ sink.putByte((byte) 0x4);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x39L
+ sink.putInt(0x39);
+ FunnelUtils.putList(message.connections, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnControllerConnectionsReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnControllerConnectionsReplyVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 4
+ bb.writeByte((byte) 0x4);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x39L
+ bb.writeInt(0x39);
+ ChannelUtils.writeList(bb, message.connections);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnControllerConnectionsReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("connections=").append(connections);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnControllerConnectionsReplyVer13 other = (OFBsnControllerConnectionsReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (connections == null) {
+ if (other.connections != null)
+ return false;
+ } else if (!connections.equals(other.connections))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((connections == null) ? 0 : connections.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnControllerConnectionsRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnControllerConnectionsRequestVer13.java
new file mode 100644
index 0000000..52dc1bb
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnControllerConnectionsRequestVer13.java
@@ -0,0 +1,314 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnControllerConnectionsRequestVer13 implements OFBsnControllerConnectionsRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnControllerConnectionsRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 16;
+
+ private final static long DEFAULT_XID = 0x0L;
+
+ // OF message fields
+ private final long xid;
+//
+ // Immutable default instance
+ final static OFBsnControllerConnectionsRequestVer13 DEFAULT = new OFBsnControllerConnectionsRequestVer13(
+ DEFAULT_XID
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnControllerConnectionsRequestVer13(long xid) {
+ this.xid = xid;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x38L;
+ }
+
+
+
+ public OFBsnControllerConnectionsRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnControllerConnectionsRequest.Builder {
+ final OFBsnControllerConnectionsRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+
+ BuilderWithParent(OFBsnControllerConnectionsRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnControllerConnectionsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x38L;
+ }
+
+
+
+ @Override
+ public OFBsnControllerConnectionsRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+
+ //
+ return new OFBsnControllerConnectionsRequestVer13(
+ xid
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnControllerConnectionsRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnControllerConnectionsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x38L;
+ }
+
+//
+ @Override
+ public OFBsnControllerConnectionsRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+
+
+ return new OFBsnControllerConnectionsRequestVer13(
+ xid
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnControllerConnectionsRequest> {
+ @Override
+ public OFBsnControllerConnectionsRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 4
+ byte type = bb.readByte();
+ if(type != (byte) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 16)
+ throw new OFParseError("Wrong length: Expected=16(16), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x38L
+ int subtype = bb.readInt();
+ if(subtype != 0x38)
+ throw new OFParseError("Wrong subtype: Expected=0x38L(0x38L), got="+subtype);
+
+ OFBsnControllerConnectionsRequestVer13 bsnControllerConnectionsRequestVer13 = new OFBsnControllerConnectionsRequestVer13(
+ xid
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnControllerConnectionsRequestVer13);
+ return bsnControllerConnectionsRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnControllerConnectionsRequestVer13Funnel FUNNEL = new OFBsnControllerConnectionsRequestVer13Funnel();
+ static class OFBsnControllerConnectionsRequestVer13Funnel implements Funnel<OFBsnControllerConnectionsRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnControllerConnectionsRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property length = 16
+ sink.putShort((short) 0x10);
+ sink.putLong(message.xid);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x38L
+ sink.putInt(0x38);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnControllerConnectionsRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnControllerConnectionsRequestVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property length = 16
+ bb.writeShort((short) 0x10);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x38L
+ bb.writeInt(0x38);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnControllerConnectionsRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnControllerConnectionsRequestVer13 other = (OFBsnControllerConnectionsRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnControllerRoleReasonSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnControllerRoleReasonSerializerVer13.java
new file mode 100644
index 0000000..0e19498
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnControllerRoleReasonSerializerVer13.java
@@ -0,0 +1,79 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFBsnControllerRoleReason;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+
+public class OFBsnControllerRoleReasonSerializerVer13 {
+
+ public final static byte BSN_CONTROLLER_ROLE_REASON_MASTER_REQUEST_VAL = (byte) 0x0;
+ public final static byte BSN_CONTROLLER_ROLE_REASON_CONFIG_VAL = (byte) 0x1;
+ public final static byte BSN_CONTROLLER_ROLE_REASON_EXPERIMENTER_VAL = (byte) 0x2;
+
+ public static OFBsnControllerRoleReason readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readByte());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, OFBsnControllerRoleReason e) {
+ bb.writeByte(toWireValue(e));
+ }
+
+ public static void putTo(OFBsnControllerRoleReason e, PrimitiveSink sink) {
+ sink.putByte(toWireValue(e));
+ }
+
+ public static OFBsnControllerRoleReason ofWireValue(byte val) {
+ switch(val) {
+ case BSN_CONTROLLER_ROLE_REASON_MASTER_REQUEST_VAL:
+ return OFBsnControllerRoleReason.BSN_CONTROLLER_ROLE_REASON_MASTER_REQUEST;
+ case BSN_CONTROLLER_ROLE_REASON_CONFIG_VAL:
+ return OFBsnControllerRoleReason.BSN_CONTROLLER_ROLE_REASON_CONFIG;
+ case BSN_CONTROLLER_ROLE_REASON_EXPERIMENTER_VAL:
+ return OFBsnControllerRoleReason.BSN_CONTROLLER_ROLE_REASON_EXPERIMENTER;
+ default:
+ throw new IllegalArgumentException("Illegal wire value for type OFBsnControllerRoleReason in version 1.3: " + val);
+ }
+ }
+
+
+ public static byte toWireValue(OFBsnControllerRoleReason e) {
+ switch(e) {
+ case BSN_CONTROLLER_ROLE_REASON_MASTER_REQUEST:
+ return BSN_CONTROLLER_ROLE_REASON_MASTER_REQUEST_VAL;
+ case BSN_CONTROLLER_ROLE_REASON_CONFIG:
+ return BSN_CONTROLLER_ROLE_REASON_CONFIG_VAL;
+ case BSN_CONTROLLER_ROLE_REASON_EXPERIMENTER:
+ return BSN_CONTROLLER_ROLE_REASON_EXPERIMENTER_VAL;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFBsnControllerRoleReason in version 1.3: " + e);
+ }
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnDebugCounterDescStatsEntryVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnDebugCounterDescStatsEntryVer13.java
new file mode 100644
index 0000000..dd61e5c
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnDebugCounterDescStatsEntryVer13.java
@@ -0,0 +1,337 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnDebugCounterDescStatsEntryVer13 implements OFBsnDebugCounterDescStatsEntry {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnDebugCounterDescStatsEntryVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 328;
+
+ private final static U64 DEFAULT_COUNTER_ID = U64.ZERO;
+ private final static String DEFAULT_NAME = "";
+ private final static String DEFAULT_DESCRIPTION = "";
+
+ // OF message fields
+ private final U64 counterId;
+ private final String name;
+ private final String description;
+//
+ // Immutable default instance
+ final static OFBsnDebugCounterDescStatsEntryVer13 DEFAULT = new OFBsnDebugCounterDescStatsEntryVer13(
+ DEFAULT_COUNTER_ID, DEFAULT_NAME, DEFAULT_DESCRIPTION
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnDebugCounterDescStatsEntryVer13(U64 counterId, String name, String description) {
+ this.counterId = counterId;
+ this.name = name;
+ this.description = description;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public U64 getCounterId() {
+ return counterId;
+ }
+
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ @Override
+ public String getDescription() {
+ return description;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFBsnDebugCounterDescStatsEntry.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnDebugCounterDescStatsEntry.Builder {
+ final OFBsnDebugCounterDescStatsEntryVer13 parentMessage;
+
+ // OF message fields
+ private boolean counterIdSet;
+ private U64 counterId;
+ private boolean nameSet;
+ private String name;
+ private boolean descriptionSet;
+ private String description;
+
+ BuilderWithParent(OFBsnDebugCounterDescStatsEntryVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public U64 getCounterId() {
+ return counterId;
+ }
+
+ @Override
+ public OFBsnDebugCounterDescStatsEntry.Builder setCounterId(U64 counterId) {
+ this.counterId = counterId;
+ this.counterIdSet = true;
+ return this;
+ }
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ @Override
+ public OFBsnDebugCounterDescStatsEntry.Builder setName(String name) {
+ this.name = name;
+ this.nameSet = true;
+ return this;
+ }
+ @Override
+ public String getDescription() {
+ return description;
+ }
+
+ @Override
+ public OFBsnDebugCounterDescStatsEntry.Builder setDescription(String description) {
+ this.description = description;
+ this.descriptionSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFBsnDebugCounterDescStatsEntry build() {
+ U64 counterId = this.counterIdSet ? this.counterId : parentMessage.counterId;
+ if(counterId == null)
+ throw new NullPointerException("Property counterId must not be null");
+ String name = this.nameSet ? this.name : parentMessage.name;
+ if(name == null)
+ throw new NullPointerException("Property name must not be null");
+ String description = this.descriptionSet ? this.description : parentMessage.description;
+ if(description == null)
+ throw new NullPointerException("Property description must not be null");
+
+ //
+ return new OFBsnDebugCounterDescStatsEntryVer13(
+ counterId,
+ name,
+ description
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnDebugCounterDescStatsEntry.Builder {
+ // OF message fields
+ private boolean counterIdSet;
+ private U64 counterId;
+ private boolean nameSet;
+ private String name;
+ private boolean descriptionSet;
+ private String description;
+
+ @Override
+ public U64 getCounterId() {
+ return counterId;
+ }
+
+ @Override
+ public OFBsnDebugCounterDescStatsEntry.Builder setCounterId(U64 counterId) {
+ this.counterId = counterId;
+ this.counterIdSet = true;
+ return this;
+ }
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ @Override
+ public OFBsnDebugCounterDescStatsEntry.Builder setName(String name) {
+ this.name = name;
+ this.nameSet = true;
+ return this;
+ }
+ @Override
+ public String getDescription() {
+ return description;
+ }
+
+ @Override
+ public OFBsnDebugCounterDescStatsEntry.Builder setDescription(String description) {
+ this.description = description;
+ this.descriptionSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFBsnDebugCounterDescStatsEntry build() {
+ U64 counterId = this.counterIdSet ? this.counterId : DEFAULT_COUNTER_ID;
+ if(counterId == null)
+ throw new NullPointerException("Property counterId must not be null");
+ String name = this.nameSet ? this.name : DEFAULT_NAME;
+ if(name == null)
+ throw new NullPointerException("Property name must not be null");
+ String description = this.descriptionSet ? this.description : DEFAULT_DESCRIPTION;
+ if(description == null)
+ throw new NullPointerException("Property description must not be null");
+
+
+ return new OFBsnDebugCounterDescStatsEntryVer13(
+ counterId,
+ name,
+ description
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnDebugCounterDescStatsEntry> {
+ @Override
+ public OFBsnDebugCounterDescStatsEntry readFrom(ChannelBuffer bb) throws OFParseError {
+ U64 counterId = U64.ofRaw(bb.readLong());
+ String name = ChannelUtils.readFixedLengthString(bb, 64);
+ String description = ChannelUtils.readFixedLengthString(bb, 256);
+
+ OFBsnDebugCounterDescStatsEntryVer13 bsnDebugCounterDescStatsEntryVer13 = new OFBsnDebugCounterDescStatsEntryVer13(
+ counterId,
+ name,
+ description
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnDebugCounterDescStatsEntryVer13);
+ return bsnDebugCounterDescStatsEntryVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnDebugCounterDescStatsEntryVer13Funnel FUNNEL = new OFBsnDebugCounterDescStatsEntryVer13Funnel();
+ static class OFBsnDebugCounterDescStatsEntryVer13Funnel implements Funnel<OFBsnDebugCounterDescStatsEntryVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnDebugCounterDescStatsEntryVer13 message, PrimitiveSink sink) {
+ message.counterId.putTo(sink);
+ sink.putUnencodedChars(message.name);
+ sink.putUnencodedChars(message.description);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnDebugCounterDescStatsEntryVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnDebugCounterDescStatsEntryVer13 message) {
+ bb.writeLong(message.counterId.getValue());
+ ChannelUtils.writeFixedLengthString(bb, message.name, 64);
+ ChannelUtils.writeFixedLengthString(bb, message.description, 256);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnDebugCounterDescStatsEntryVer13(");
+ b.append("counterId=").append(counterId);
+ b.append(", ");
+ b.append("name=").append(name);
+ b.append(", ");
+ b.append("description=").append(description);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnDebugCounterDescStatsEntryVer13 other = (OFBsnDebugCounterDescStatsEntryVer13) obj;
+
+ if (counterId == null) {
+ if (other.counterId != null)
+ return false;
+ } else if (!counterId.equals(other.counterId))
+ return false;
+ if (name == null) {
+ if (other.name != null)
+ return false;
+ } else if (!name.equals(other.name))
+ return false;
+ if (description == null) {
+ if (other.description != null)
+ return false;
+ } else if (!description.equals(other.description))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((counterId == null) ? 0 : counterId.hashCode());
+ result = prime * result + ((name == null) ? 0 : name.hashCode());
+ result = prime * result + ((description == null) ? 0 : description.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnDebugCounterDescStatsReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnDebugCounterDescStatsReplyVer13.java
new file mode 100644
index 0000000..d28c78a
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnDebugCounterDescStatsReplyVer13.java
@@ -0,0 +1,458 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnDebugCounterDescStatsReplyVer13 implements OFBsnDebugCounterDescStatsReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnDebugCounterDescStatsReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 24;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsReplyFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsReplyFlags>of();
+ private final static List<OFBsnDebugCounterDescStatsEntry> DEFAULT_ENTRIES = ImmutableList.<OFBsnDebugCounterDescStatsEntry>of();
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsReplyFlags> flags;
+ private final List<OFBsnDebugCounterDescStatsEntry> entries;
+//
+ // Immutable default instance
+ final static OFBsnDebugCounterDescStatsReplyVer13 DEFAULT = new OFBsnDebugCounterDescStatsReplyVer13(
+ DEFAULT_XID, DEFAULT_FLAGS, DEFAULT_ENTRIES
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnDebugCounterDescStatsReplyVer13(long xid, Set<OFStatsReplyFlags> flags, List<OFBsnDebugCounterDescStatsEntry> entries) {
+ this.xid = xid;
+ this.flags = flags;
+ this.entries = entries;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0xdL;
+ }
+
+ @Override
+ public List<OFBsnDebugCounterDescStatsEntry> getEntries() {
+ return entries;
+ }
+
+
+
+ public OFBsnDebugCounterDescStatsReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnDebugCounterDescStatsReply.Builder {
+ final OFBsnDebugCounterDescStatsReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean entriesSet;
+ private List<OFBsnDebugCounterDescStatsEntry> entries;
+
+ BuilderWithParent(OFBsnDebugCounterDescStatsReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnDebugCounterDescStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnDebugCounterDescStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0xdL;
+ }
+
+ @Override
+ public List<OFBsnDebugCounterDescStatsEntry> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFBsnDebugCounterDescStatsReply.Builder setEntries(List<OFBsnDebugCounterDescStatsEntry> entries) {
+ this.entries = entries;
+ this.entriesSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnDebugCounterDescStatsReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ List<OFBsnDebugCounterDescStatsEntry> entries = this.entriesSet ? this.entries : parentMessage.entries;
+ if(entries == null)
+ throw new NullPointerException("Property entries must not be null");
+
+ //
+ return new OFBsnDebugCounterDescStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnDebugCounterDescStatsReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean entriesSet;
+ private List<OFBsnDebugCounterDescStatsEntry> entries;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnDebugCounterDescStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnDebugCounterDescStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0xdL;
+ }
+
+ @Override
+ public List<OFBsnDebugCounterDescStatsEntry> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFBsnDebugCounterDescStatsReply.Builder setEntries(List<OFBsnDebugCounterDescStatsEntry> entries) {
+ this.entries = entries;
+ this.entriesSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnDebugCounterDescStatsReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ List<OFBsnDebugCounterDescStatsEntry> entries = this.entriesSet ? this.entries : DEFAULT_ENTRIES;
+ if(entries == null)
+ throw new NullPointerException("Property entries must not be null");
+
+
+ return new OFBsnDebugCounterDescStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnDebugCounterDescStatsReply> {
+ @Override
+ public OFBsnDebugCounterDescStatsReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 19
+ byte type = bb.readByte();
+ if(type != (byte) 0x13)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REPLY(19), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 65535
+ short statsType = bb.readShort();
+ if(statsType != (short) 0xffff)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.EXPERIMENTER(65535), got="+statsType);
+ Set<OFStatsReplyFlags> flags = OFStatsReplyFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0xdL
+ int subtype = bb.readInt();
+ if(subtype != 0xd)
+ throw new OFParseError("Wrong subtype: Expected=0xdL(0xdL), got="+subtype);
+ List<OFBsnDebugCounterDescStatsEntry> entries = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFBsnDebugCounterDescStatsEntryVer13.READER);
+
+ OFBsnDebugCounterDescStatsReplyVer13 bsnDebugCounterDescStatsReplyVer13 = new OFBsnDebugCounterDescStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnDebugCounterDescStatsReplyVer13);
+ return bsnDebugCounterDescStatsReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnDebugCounterDescStatsReplyVer13Funnel FUNNEL = new OFBsnDebugCounterDescStatsReplyVer13Funnel();
+ static class OFBsnDebugCounterDescStatsReplyVer13Funnel implements Funnel<OFBsnDebugCounterDescStatsReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnDebugCounterDescStatsReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 19
+ sink.putByte((byte) 0x13);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property statsType = 65535
+ sink.putShort((short) 0xffff);
+ OFStatsReplyFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0xdL
+ sink.putInt(0xd);
+ FunnelUtils.putList(message.entries, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnDebugCounterDescStatsReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnDebugCounterDescStatsReplyVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 19
+ bb.writeByte((byte) 0x13);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 65535
+ bb.writeShort((short) 0xffff);
+ OFStatsReplyFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0xdL
+ bb.writeInt(0xd);
+ ChannelUtils.writeList(bb, message.entries);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnDebugCounterDescStatsReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("entries=").append(entries);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnDebugCounterDescStatsReplyVer13 other = (OFBsnDebugCounterDescStatsReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if (entries == null) {
+ if (other.entries != null)
+ return false;
+ } else if (!entries.equals(other.entries))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * result + ((entries == null) ? 0 : entries.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnDebugCounterDescStatsRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnDebugCounterDescStatsRequestVer13.java
new file mode 100644
index 0000000..c190f18
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnDebugCounterDescStatsRequestVer13.java
@@ -0,0 +1,397 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnDebugCounterDescStatsRequestVer13 implements OFBsnDebugCounterDescStatsRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnDebugCounterDescStatsRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 24;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsRequestFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsRequestFlags>of();
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsRequestFlags> flags;
+//
+ // Immutable default instance
+ final static OFBsnDebugCounterDescStatsRequestVer13 DEFAULT = new OFBsnDebugCounterDescStatsRequestVer13(
+ DEFAULT_XID, DEFAULT_FLAGS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnDebugCounterDescStatsRequestVer13(long xid, Set<OFStatsRequestFlags> flags) {
+ this.xid = xid;
+ this.flags = flags;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0xdL;
+ }
+
+
+
+ public OFBsnDebugCounterDescStatsRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnDebugCounterDescStatsRequest.Builder {
+ final OFBsnDebugCounterDescStatsRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+
+ BuilderWithParent(OFBsnDebugCounterDescStatsRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnDebugCounterDescStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnDebugCounterDescStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0xdL;
+ }
+
+
+
+ @Override
+ public OFBsnDebugCounterDescStatsRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+
+ //
+ return new OFBsnDebugCounterDescStatsRequestVer13(
+ xid,
+ flags
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnDebugCounterDescStatsRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnDebugCounterDescStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnDebugCounterDescStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0xdL;
+ }
+
+//
+ @Override
+ public OFBsnDebugCounterDescStatsRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+
+
+ return new OFBsnDebugCounterDescStatsRequestVer13(
+ xid,
+ flags
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnDebugCounterDescStatsRequest> {
+ @Override
+ public OFBsnDebugCounterDescStatsRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 18
+ byte type = bb.readByte();
+ if(type != (byte) 0x12)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REQUEST(18), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 24)
+ throw new OFParseError("Wrong length: Expected=24(24), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 65535
+ short statsType = bb.readShort();
+ if(statsType != (short) 0xffff)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.EXPERIMENTER(65535), got="+statsType);
+ Set<OFStatsRequestFlags> flags = OFStatsRequestFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0xdL
+ int subtype = bb.readInt();
+ if(subtype != 0xd)
+ throw new OFParseError("Wrong subtype: Expected=0xdL(0xdL), got="+subtype);
+
+ OFBsnDebugCounterDescStatsRequestVer13 bsnDebugCounterDescStatsRequestVer13 = new OFBsnDebugCounterDescStatsRequestVer13(
+ xid,
+ flags
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnDebugCounterDescStatsRequestVer13);
+ return bsnDebugCounterDescStatsRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnDebugCounterDescStatsRequestVer13Funnel FUNNEL = new OFBsnDebugCounterDescStatsRequestVer13Funnel();
+ static class OFBsnDebugCounterDescStatsRequestVer13Funnel implements Funnel<OFBsnDebugCounterDescStatsRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnDebugCounterDescStatsRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 18
+ sink.putByte((byte) 0x12);
+ // fixed value property length = 24
+ sink.putShort((short) 0x18);
+ sink.putLong(message.xid);
+ // fixed value property statsType = 65535
+ sink.putShort((short) 0xffff);
+ OFStatsRequestFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0xdL
+ sink.putInt(0xd);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnDebugCounterDescStatsRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnDebugCounterDescStatsRequestVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 18
+ bb.writeByte((byte) 0x12);
+ // fixed value property length = 24
+ bb.writeShort((short) 0x18);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 65535
+ bb.writeShort((short) 0xffff);
+ OFStatsRequestFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0xdL
+ bb.writeInt(0xd);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnDebugCounterDescStatsRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnDebugCounterDescStatsRequestVer13 other = (OFBsnDebugCounterDescStatsRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnDebugCounterStatsEntryVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnDebugCounterStatsEntryVer13.java
new file mode 100644
index 0000000..8fecd3e
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnDebugCounterStatsEntryVer13.java
@@ -0,0 +1,283 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnDebugCounterStatsEntryVer13 implements OFBsnDebugCounterStatsEntry {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnDebugCounterStatsEntryVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 16;
+
+ private final static U64 DEFAULT_COUNTER_ID = U64.ZERO;
+ private final static U64 DEFAULT_VALUE = U64.ZERO;
+
+ // OF message fields
+ private final U64 counterId;
+ private final U64 value;
+//
+ // Immutable default instance
+ final static OFBsnDebugCounterStatsEntryVer13 DEFAULT = new OFBsnDebugCounterStatsEntryVer13(
+ DEFAULT_COUNTER_ID, DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnDebugCounterStatsEntryVer13(U64 counterId, U64 value) {
+ this.counterId = counterId;
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public U64 getCounterId() {
+ return counterId;
+ }
+
+ @Override
+ public U64 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFBsnDebugCounterStatsEntry.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnDebugCounterStatsEntry.Builder {
+ final OFBsnDebugCounterStatsEntryVer13 parentMessage;
+
+ // OF message fields
+ private boolean counterIdSet;
+ private U64 counterId;
+ private boolean valueSet;
+ private U64 value;
+
+ BuilderWithParent(OFBsnDebugCounterStatsEntryVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public U64 getCounterId() {
+ return counterId;
+ }
+
+ @Override
+ public OFBsnDebugCounterStatsEntry.Builder setCounterId(U64 counterId) {
+ this.counterId = counterId;
+ this.counterIdSet = true;
+ return this;
+ }
+ @Override
+ public U64 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFBsnDebugCounterStatsEntry.Builder setValue(U64 value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFBsnDebugCounterStatsEntry build() {
+ U64 counterId = this.counterIdSet ? this.counterId : parentMessage.counterId;
+ if(counterId == null)
+ throw new NullPointerException("Property counterId must not be null");
+ U64 value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFBsnDebugCounterStatsEntryVer13(
+ counterId,
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnDebugCounterStatsEntry.Builder {
+ // OF message fields
+ private boolean counterIdSet;
+ private U64 counterId;
+ private boolean valueSet;
+ private U64 value;
+
+ @Override
+ public U64 getCounterId() {
+ return counterId;
+ }
+
+ @Override
+ public OFBsnDebugCounterStatsEntry.Builder setCounterId(U64 counterId) {
+ this.counterId = counterId;
+ this.counterIdSet = true;
+ return this;
+ }
+ @Override
+ public U64 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFBsnDebugCounterStatsEntry.Builder setValue(U64 value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFBsnDebugCounterStatsEntry build() {
+ U64 counterId = this.counterIdSet ? this.counterId : DEFAULT_COUNTER_ID;
+ if(counterId == null)
+ throw new NullPointerException("Property counterId must not be null");
+ U64 value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFBsnDebugCounterStatsEntryVer13(
+ counterId,
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnDebugCounterStatsEntry> {
+ @Override
+ public OFBsnDebugCounterStatsEntry readFrom(ChannelBuffer bb) throws OFParseError {
+ U64 counterId = U64.ofRaw(bb.readLong());
+ U64 value = U64.ofRaw(bb.readLong());
+
+ OFBsnDebugCounterStatsEntryVer13 bsnDebugCounterStatsEntryVer13 = new OFBsnDebugCounterStatsEntryVer13(
+ counterId,
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnDebugCounterStatsEntryVer13);
+ return bsnDebugCounterStatsEntryVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnDebugCounterStatsEntryVer13Funnel FUNNEL = new OFBsnDebugCounterStatsEntryVer13Funnel();
+ static class OFBsnDebugCounterStatsEntryVer13Funnel implements Funnel<OFBsnDebugCounterStatsEntryVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnDebugCounterStatsEntryVer13 message, PrimitiveSink sink) {
+ message.counterId.putTo(sink);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnDebugCounterStatsEntryVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnDebugCounterStatsEntryVer13 message) {
+ bb.writeLong(message.counterId.getValue());
+ bb.writeLong(message.value.getValue());
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnDebugCounterStatsEntryVer13(");
+ b.append("counterId=").append(counterId);
+ b.append(", ");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnDebugCounterStatsEntryVer13 other = (OFBsnDebugCounterStatsEntryVer13) obj;
+
+ if (counterId == null) {
+ if (other.counterId != null)
+ return false;
+ } else if (!counterId.equals(other.counterId))
+ return false;
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((counterId == null) ? 0 : counterId.hashCode());
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnDebugCounterStatsReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnDebugCounterStatsReplyVer13.java
new file mode 100644
index 0000000..9d967ce
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnDebugCounterStatsReplyVer13.java
@@ -0,0 +1,458 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnDebugCounterStatsReplyVer13 implements OFBsnDebugCounterStatsReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnDebugCounterStatsReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 24;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsReplyFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsReplyFlags>of();
+ private final static List<OFBsnDebugCounterStatsEntry> DEFAULT_ENTRIES = ImmutableList.<OFBsnDebugCounterStatsEntry>of();
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsReplyFlags> flags;
+ private final List<OFBsnDebugCounterStatsEntry> entries;
+//
+ // Immutable default instance
+ final static OFBsnDebugCounterStatsReplyVer13 DEFAULT = new OFBsnDebugCounterStatsReplyVer13(
+ DEFAULT_XID, DEFAULT_FLAGS, DEFAULT_ENTRIES
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnDebugCounterStatsReplyVer13(long xid, Set<OFStatsReplyFlags> flags, List<OFBsnDebugCounterStatsEntry> entries) {
+ this.xid = xid;
+ this.flags = flags;
+ this.entries = entries;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0xcL;
+ }
+
+ @Override
+ public List<OFBsnDebugCounterStatsEntry> getEntries() {
+ return entries;
+ }
+
+
+
+ public OFBsnDebugCounterStatsReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnDebugCounterStatsReply.Builder {
+ final OFBsnDebugCounterStatsReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean entriesSet;
+ private List<OFBsnDebugCounterStatsEntry> entries;
+
+ BuilderWithParent(OFBsnDebugCounterStatsReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnDebugCounterStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnDebugCounterStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0xcL;
+ }
+
+ @Override
+ public List<OFBsnDebugCounterStatsEntry> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFBsnDebugCounterStatsReply.Builder setEntries(List<OFBsnDebugCounterStatsEntry> entries) {
+ this.entries = entries;
+ this.entriesSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnDebugCounterStatsReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ List<OFBsnDebugCounterStatsEntry> entries = this.entriesSet ? this.entries : parentMessage.entries;
+ if(entries == null)
+ throw new NullPointerException("Property entries must not be null");
+
+ //
+ return new OFBsnDebugCounterStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnDebugCounterStatsReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean entriesSet;
+ private List<OFBsnDebugCounterStatsEntry> entries;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnDebugCounterStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnDebugCounterStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0xcL;
+ }
+
+ @Override
+ public List<OFBsnDebugCounterStatsEntry> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFBsnDebugCounterStatsReply.Builder setEntries(List<OFBsnDebugCounterStatsEntry> entries) {
+ this.entries = entries;
+ this.entriesSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnDebugCounterStatsReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ List<OFBsnDebugCounterStatsEntry> entries = this.entriesSet ? this.entries : DEFAULT_ENTRIES;
+ if(entries == null)
+ throw new NullPointerException("Property entries must not be null");
+
+
+ return new OFBsnDebugCounterStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnDebugCounterStatsReply> {
+ @Override
+ public OFBsnDebugCounterStatsReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 19
+ byte type = bb.readByte();
+ if(type != (byte) 0x13)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REPLY(19), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 65535
+ short statsType = bb.readShort();
+ if(statsType != (short) 0xffff)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.EXPERIMENTER(65535), got="+statsType);
+ Set<OFStatsReplyFlags> flags = OFStatsReplyFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0xcL
+ int subtype = bb.readInt();
+ if(subtype != 0xc)
+ throw new OFParseError("Wrong subtype: Expected=0xcL(0xcL), got="+subtype);
+ List<OFBsnDebugCounterStatsEntry> entries = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFBsnDebugCounterStatsEntryVer13.READER);
+
+ OFBsnDebugCounterStatsReplyVer13 bsnDebugCounterStatsReplyVer13 = new OFBsnDebugCounterStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnDebugCounterStatsReplyVer13);
+ return bsnDebugCounterStatsReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnDebugCounterStatsReplyVer13Funnel FUNNEL = new OFBsnDebugCounterStatsReplyVer13Funnel();
+ static class OFBsnDebugCounterStatsReplyVer13Funnel implements Funnel<OFBsnDebugCounterStatsReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnDebugCounterStatsReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 19
+ sink.putByte((byte) 0x13);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property statsType = 65535
+ sink.putShort((short) 0xffff);
+ OFStatsReplyFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0xcL
+ sink.putInt(0xc);
+ FunnelUtils.putList(message.entries, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnDebugCounterStatsReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnDebugCounterStatsReplyVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 19
+ bb.writeByte((byte) 0x13);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 65535
+ bb.writeShort((short) 0xffff);
+ OFStatsReplyFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0xcL
+ bb.writeInt(0xc);
+ ChannelUtils.writeList(bb, message.entries);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnDebugCounterStatsReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("entries=").append(entries);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnDebugCounterStatsReplyVer13 other = (OFBsnDebugCounterStatsReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if (entries == null) {
+ if (other.entries != null)
+ return false;
+ } else if (!entries.equals(other.entries))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * result + ((entries == null) ? 0 : entries.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnDebugCounterStatsRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnDebugCounterStatsRequestVer13.java
new file mode 100644
index 0000000..d57eff6
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnDebugCounterStatsRequestVer13.java
@@ -0,0 +1,397 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnDebugCounterStatsRequestVer13 implements OFBsnDebugCounterStatsRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnDebugCounterStatsRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 24;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsRequestFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsRequestFlags>of();
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsRequestFlags> flags;
+//
+ // Immutable default instance
+ final static OFBsnDebugCounterStatsRequestVer13 DEFAULT = new OFBsnDebugCounterStatsRequestVer13(
+ DEFAULT_XID, DEFAULT_FLAGS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnDebugCounterStatsRequestVer13(long xid, Set<OFStatsRequestFlags> flags) {
+ this.xid = xid;
+ this.flags = flags;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0xcL;
+ }
+
+
+
+ public OFBsnDebugCounterStatsRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnDebugCounterStatsRequest.Builder {
+ final OFBsnDebugCounterStatsRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+
+ BuilderWithParent(OFBsnDebugCounterStatsRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnDebugCounterStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnDebugCounterStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0xcL;
+ }
+
+
+
+ @Override
+ public OFBsnDebugCounterStatsRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+
+ //
+ return new OFBsnDebugCounterStatsRequestVer13(
+ xid,
+ flags
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnDebugCounterStatsRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnDebugCounterStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnDebugCounterStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0xcL;
+ }
+
+//
+ @Override
+ public OFBsnDebugCounterStatsRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+
+
+ return new OFBsnDebugCounterStatsRequestVer13(
+ xid,
+ flags
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnDebugCounterStatsRequest> {
+ @Override
+ public OFBsnDebugCounterStatsRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 18
+ byte type = bb.readByte();
+ if(type != (byte) 0x12)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REQUEST(18), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 24)
+ throw new OFParseError("Wrong length: Expected=24(24), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 65535
+ short statsType = bb.readShort();
+ if(statsType != (short) 0xffff)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.EXPERIMENTER(65535), got="+statsType);
+ Set<OFStatsRequestFlags> flags = OFStatsRequestFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0xcL
+ int subtype = bb.readInt();
+ if(subtype != 0xc)
+ throw new OFParseError("Wrong subtype: Expected=0xcL(0xcL), got="+subtype);
+
+ OFBsnDebugCounterStatsRequestVer13 bsnDebugCounterStatsRequestVer13 = new OFBsnDebugCounterStatsRequestVer13(
+ xid,
+ flags
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnDebugCounterStatsRequestVer13);
+ return bsnDebugCounterStatsRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnDebugCounterStatsRequestVer13Funnel FUNNEL = new OFBsnDebugCounterStatsRequestVer13Funnel();
+ static class OFBsnDebugCounterStatsRequestVer13Funnel implements Funnel<OFBsnDebugCounterStatsRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnDebugCounterStatsRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 18
+ sink.putByte((byte) 0x12);
+ // fixed value property length = 24
+ sink.putShort((short) 0x18);
+ sink.putLong(message.xid);
+ // fixed value property statsType = 65535
+ sink.putShort((short) 0xffff);
+ OFStatsRequestFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0xcL
+ sink.putInt(0xc);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnDebugCounterStatsRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnDebugCounterStatsRequestVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 18
+ bb.writeByte((byte) 0x12);
+ // fixed value property length = 24
+ bb.writeShort((short) 0x18);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 65535
+ bb.writeShort((short) 0xffff);
+ OFStatsRequestFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0xcL
+ bb.writeInt(0xc);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnDebugCounterStatsRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnDebugCounterStatsRequestVer13 other = (OFBsnDebugCounterStatsRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnFlowChecksumBucketStatsEntryVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnFlowChecksumBucketStatsEntryVer13.java
new file mode 100644
index 0000000..5540700
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnFlowChecksumBucketStatsEntryVer13.java
@@ -0,0 +1,229 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnFlowChecksumBucketStatsEntryVer13 implements OFBsnFlowChecksumBucketStatsEntry {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnFlowChecksumBucketStatsEntryVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static U64 DEFAULT_CHECKSUM = U64.ZERO;
+
+ // OF message fields
+ private final U64 checksum;
+//
+ // Immutable default instance
+ final static OFBsnFlowChecksumBucketStatsEntryVer13 DEFAULT = new OFBsnFlowChecksumBucketStatsEntryVer13(
+ DEFAULT_CHECKSUM
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnFlowChecksumBucketStatsEntryVer13(U64 checksum) {
+ this.checksum = checksum;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public U64 getChecksum() {
+ return checksum;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFBsnFlowChecksumBucketStatsEntry.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnFlowChecksumBucketStatsEntry.Builder {
+ final OFBsnFlowChecksumBucketStatsEntryVer13 parentMessage;
+
+ // OF message fields
+ private boolean checksumSet;
+ private U64 checksum;
+
+ BuilderWithParent(OFBsnFlowChecksumBucketStatsEntryVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public U64 getChecksum() {
+ return checksum;
+ }
+
+ @Override
+ public OFBsnFlowChecksumBucketStatsEntry.Builder setChecksum(U64 checksum) {
+ this.checksum = checksum;
+ this.checksumSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFBsnFlowChecksumBucketStatsEntry build() {
+ U64 checksum = this.checksumSet ? this.checksum : parentMessage.checksum;
+ if(checksum == null)
+ throw new NullPointerException("Property checksum must not be null");
+
+ //
+ return new OFBsnFlowChecksumBucketStatsEntryVer13(
+ checksum
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnFlowChecksumBucketStatsEntry.Builder {
+ // OF message fields
+ private boolean checksumSet;
+ private U64 checksum;
+
+ @Override
+ public U64 getChecksum() {
+ return checksum;
+ }
+
+ @Override
+ public OFBsnFlowChecksumBucketStatsEntry.Builder setChecksum(U64 checksum) {
+ this.checksum = checksum;
+ this.checksumSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFBsnFlowChecksumBucketStatsEntry build() {
+ U64 checksum = this.checksumSet ? this.checksum : DEFAULT_CHECKSUM;
+ if(checksum == null)
+ throw new NullPointerException("Property checksum must not be null");
+
+
+ return new OFBsnFlowChecksumBucketStatsEntryVer13(
+ checksum
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnFlowChecksumBucketStatsEntry> {
+ @Override
+ public OFBsnFlowChecksumBucketStatsEntry readFrom(ChannelBuffer bb) throws OFParseError {
+ U64 checksum = U64.ofRaw(bb.readLong());
+
+ OFBsnFlowChecksumBucketStatsEntryVer13 bsnFlowChecksumBucketStatsEntryVer13 = new OFBsnFlowChecksumBucketStatsEntryVer13(
+ checksum
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnFlowChecksumBucketStatsEntryVer13);
+ return bsnFlowChecksumBucketStatsEntryVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnFlowChecksumBucketStatsEntryVer13Funnel FUNNEL = new OFBsnFlowChecksumBucketStatsEntryVer13Funnel();
+ static class OFBsnFlowChecksumBucketStatsEntryVer13Funnel implements Funnel<OFBsnFlowChecksumBucketStatsEntryVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnFlowChecksumBucketStatsEntryVer13 message, PrimitiveSink sink) {
+ message.checksum.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnFlowChecksumBucketStatsEntryVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnFlowChecksumBucketStatsEntryVer13 message) {
+ bb.writeLong(message.checksum.getValue());
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnFlowChecksumBucketStatsEntryVer13(");
+ b.append("checksum=").append(checksum);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnFlowChecksumBucketStatsEntryVer13 other = (OFBsnFlowChecksumBucketStatsEntryVer13) obj;
+
+ if (checksum == null) {
+ if (other.checksum != null)
+ return false;
+ } else if (!checksum.equals(other.checksum))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((checksum == null) ? 0 : checksum.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnFlowChecksumBucketStatsReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnFlowChecksumBucketStatsReplyVer13.java
new file mode 100644
index 0000000..be34e7c
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnFlowChecksumBucketStatsReplyVer13.java
@@ -0,0 +1,458 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnFlowChecksumBucketStatsReplyVer13 implements OFBsnFlowChecksumBucketStatsReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnFlowChecksumBucketStatsReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 24;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsReplyFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsReplyFlags>of();
+ private final static List<OFBsnFlowChecksumBucketStatsEntry> DEFAULT_ENTRIES = ImmutableList.<OFBsnFlowChecksumBucketStatsEntry>of();
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsReplyFlags> flags;
+ private final List<OFBsnFlowChecksumBucketStatsEntry> entries;
+//
+ // Immutable default instance
+ final static OFBsnFlowChecksumBucketStatsReplyVer13 DEFAULT = new OFBsnFlowChecksumBucketStatsReplyVer13(
+ DEFAULT_XID, DEFAULT_FLAGS, DEFAULT_ENTRIES
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnFlowChecksumBucketStatsReplyVer13(long xid, Set<OFStatsReplyFlags> flags, List<OFBsnFlowChecksumBucketStatsEntry> entries) {
+ this.xid = xid;
+ this.flags = flags;
+ this.entries = entries;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0xaL;
+ }
+
+ @Override
+ public List<OFBsnFlowChecksumBucketStatsEntry> getEntries() {
+ return entries;
+ }
+
+
+
+ public OFBsnFlowChecksumBucketStatsReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnFlowChecksumBucketStatsReply.Builder {
+ final OFBsnFlowChecksumBucketStatsReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean entriesSet;
+ private List<OFBsnFlowChecksumBucketStatsEntry> entries;
+
+ BuilderWithParent(OFBsnFlowChecksumBucketStatsReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnFlowChecksumBucketStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnFlowChecksumBucketStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0xaL;
+ }
+
+ @Override
+ public List<OFBsnFlowChecksumBucketStatsEntry> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFBsnFlowChecksumBucketStatsReply.Builder setEntries(List<OFBsnFlowChecksumBucketStatsEntry> entries) {
+ this.entries = entries;
+ this.entriesSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnFlowChecksumBucketStatsReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ List<OFBsnFlowChecksumBucketStatsEntry> entries = this.entriesSet ? this.entries : parentMessage.entries;
+ if(entries == null)
+ throw new NullPointerException("Property entries must not be null");
+
+ //
+ return new OFBsnFlowChecksumBucketStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnFlowChecksumBucketStatsReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean entriesSet;
+ private List<OFBsnFlowChecksumBucketStatsEntry> entries;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnFlowChecksumBucketStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnFlowChecksumBucketStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0xaL;
+ }
+
+ @Override
+ public List<OFBsnFlowChecksumBucketStatsEntry> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFBsnFlowChecksumBucketStatsReply.Builder setEntries(List<OFBsnFlowChecksumBucketStatsEntry> entries) {
+ this.entries = entries;
+ this.entriesSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnFlowChecksumBucketStatsReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ List<OFBsnFlowChecksumBucketStatsEntry> entries = this.entriesSet ? this.entries : DEFAULT_ENTRIES;
+ if(entries == null)
+ throw new NullPointerException("Property entries must not be null");
+
+
+ return new OFBsnFlowChecksumBucketStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnFlowChecksumBucketStatsReply> {
+ @Override
+ public OFBsnFlowChecksumBucketStatsReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 19
+ byte type = bb.readByte();
+ if(type != (byte) 0x13)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REPLY(19), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 65535
+ short statsType = bb.readShort();
+ if(statsType != (short) 0xffff)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.EXPERIMENTER(65535), got="+statsType);
+ Set<OFStatsReplyFlags> flags = OFStatsReplyFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0xaL
+ int subtype = bb.readInt();
+ if(subtype != 0xa)
+ throw new OFParseError("Wrong subtype: Expected=0xaL(0xaL), got="+subtype);
+ List<OFBsnFlowChecksumBucketStatsEntry> entries = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFBsnFlowChecksumBucketStatsEntryVer13.READER);
+
+ OFBsnFlowChecksumBucketStatsReplyVer13 bsnFlowChecksumBucketStatsReplyVer13 = new OFBsnFlowChecksumBucketStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnFlowChecksumBucketStatsReplyVer13);
+ return bsnFlowChecksumBucketStatsReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnFlowChecksumBucketStatsReplyVer13Funnel FUNNEL = new OFBsnFlowChecksumBucketStatsReplyVer13Funnel();
+ static class OFBsnFlowChecksumBucketStatsReplyVer13Funnel implements Funnel<OFBsnFlowChecksumBucketStatsReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnFlowChecksumBucketStatsReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 19
+ sink.putByte((byte) 0x13);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property statsType = 65535
+ sink.putShort((short) 0xffff);
+ OFStatsReplyFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0xaL
+ sink.putInt(0xa);
+ FunnelUtils.putList(message.entries, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnFlowChecksumBucketStatsReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnFlowChecksumBucketStatsReplyVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 19
+ bb.writeByte((byte) 0x13);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 65535
+ bb.writeShort((short) 0xffff);
+ OFStatsReplyFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0xaL
+ bb.writeInt(0xa);
+ ChannelUtils.writeList(bb, message.entries);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnFlowChecksumBucketStatsReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("entries=").append(entries);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnFlowChecksumBucketStatsReplyVer13 other = (OFBsnFlowChecksumBucketStatsReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if (entries == null) {
+ if (other.entries != null)
+ return false;
+ } else if (!entries.equals(other.entries))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * result + ((entries == null) ? 0 : entries.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnFlowChecksumBucketStatsRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnFlowChecksumBucketStatsRequestVer13.java
new file mode 100644
index 0000000..5ed672b
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnFlowChecksumBucketStatsRequestVer13.java
@@ -0,0 +1,451 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnFlowChecksumBucketStatsRequestVer13 implements OFBsnFlowChecksumBucketStatsRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnFlowChecksumBucketStatsRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 25;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsRequestFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsRequestFlags>of();
+ private final static TableId DEFAULT_TABLE_ID = TableId.ALL;
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsRequestFlags> flags;
+ private final TableId tableId;
+//
+ // Immutable default instance
+ final static OFBsnFlowChecksumBucketStatsRequestVer13 DEFAULT = new OFBsnFlowChecksumBucketStatsRequestVer13(
+ DEFAULT_XID, DEFAULT_FLAGS, DEFAULT_TABLE_ID
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnFlowChecksumBucketStatsRequestVer13(long xid, Set<OFStatsRequestFlags> flags, TableId tableId) {
+ this.xid = xid;
+ this.flags = flags;
+ this.tableId = tableId;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0xaL;
+ }
+
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+
+
+ public OFBsnFlowChecksumBucketStatsRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnFlowChecksumBucketStatsRequest.Builder {
+ final OFBsnFlowChecksumBucketStatsRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+ private boolean tableIdSet;
+ private TableId tableId;
+
+ BuilderWithParent(OFBsnFlowChecksumBucketStatsRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnFlowChecksumBucketStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnFlowChecksumBucketStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0xaL;
+ }
+
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFBsnFlowChecksumBucketStatsRequest.Builder setTableId(TableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnFlowChecksumBucketStatsRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ TableId tableId = this.tableIdSet ? this.tableId : parentMessage.tableId;
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+
+ //
+ return new OFBsnFlowChecksumBucketStatsRequestVer13(
+ xid,
+ flags,
+ tableId
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnFlowChecksumBucketStatsRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+ private boolean tableIdSet;
+ private TableId tableId;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnFlowChecksumBucketStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnFlowChecksumBucketStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0xaL;
+ }
+
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFBsnFlowChecksumBucketStatsRequest.Builder setTableId(TableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnFlowChecksumBucketStatsRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ TableId tableId = this.tableIdSet ? this.tableId : DEFAULT_TABLE_ID;
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+
+
+ return new OFBsnFlowChecksumBucketStatsRequestVer13(
+ xid,
+ flags,
+ tableId
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnFlowChecksumBucketStatsRequest> {
+ @Override
+ public OFBsnFlowChecksumBucketStatsRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 18
+ byte type = bb.readByte();
+ if(type != (byte) 0x12)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REQUEST(18), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 25)
+ throw new OFParseError("Wrong length: Expected=25(25), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 65535
+ short statsType = bb.readShort();
+ if(statsType != (short) 0xffff)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.EXPERIMENTER(65535), got="+statsType);
+ Set<OFStatsRequestFlags> flags = OFStatsRequestFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0xaL
+ int subtype = bb.readInt();
+ if(subtype != 0xa)
+ throw new OFParseError("Wrong subtype: Expected=0xaL(0xaL), got="+subtype);
+ TableId tableId = TableId.readByte(bb);
+
+ OFBsnFlowChecksumBucketStatsRequestVer13 bsnFlowChecksumBucketStatsRequestVer13 = new OFBsnFlowChecksumBucketStatsRequestVer13(
+ xid,
+ flags,
+ tableId
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnFlowChecksumBucketStatsRequestVer13);
+ return bsnFlowChecksumBucketStatsRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnFlowChecksumBucketStatsRequestVer13Funnel FUNNEL = new OFBsnFlowChecksumBucketStatsRequestVer13Funnel();
+ static class OFBsnFlowChecksumBucketStatsRequestVer13Funnel implements Funnel<OFBsnFlowChecksumBucketStatsRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnFlowChecksumBucketStatsRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 18
+ sink.putByte((byte) 0x12);
+ // fixed value property length = 25
+ sink.putShort((short) 0x19);
+ sink.putLong(message.xid);
+ // fixed value property statsType = 65535
+ sink.putShort((short) 0xffff);
+ OFStatsRequestFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0xaL
+ sink.putInt(0xa);
+ message.tableId.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnFlowChecksumBucketStatsRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnFlowChecksumBucketStatsRequestVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 18
+ bb.writeByte((byte) 0x12);
+ // fixed value property length = 25
+ bb.writeShort((short) 0x19);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 65535
+ bb.writeShort((short) 0xffff);
+ OFStatsRequestFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0xaL
+ bb.writeInt(0xa);
+ message.tableId.writeByte(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnFlowChecksumBucketStatsRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("tableId=").append(tableId);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnFlowChecksumBucketStatsRequestVer13 other = (OFBsnFlowChecksumBucketStatsRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if (tableId == null) {
+ if (other.tableId != null)
+ return false;
+ } else if (!tableId.equals(other.tableId))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * result + ((tableId == null) ? 0 : tableId.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnFlowIdleEnableGetReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnFlowIdleEnableGetReplyVer13.java
new file mode 100644
index 0000000..288377a
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnFlowIdleEnableGetReplyVer13.java
@@ -0,0 +1,361 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnFlowIdleEnableGetReplyVer13 implements OFBsnFlowIdleEnableGetReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnFlowIdleEnableGetReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 20;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static long DEFAULT_ENABLED = 0x0L;
+
+ // OF message fields
+ private final long xid;
+ private final long enabled;
+//
+ // Immutable default instance
+ final static OFBsnFlowIdleEnableGetReplyVer13 DEFAULT = new OFBsnFlowIdleEnableGetReplyVer13(
+ DEFAULT_XID, DEFAULT_ENABLED
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnFlowIdleEnableGetReplyVer13(long xid, long enabled) {
+ this.xid = xid;
+ this.enabled = enabled;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x27L;
+ }
+
+ @Override
+ public long getEnabled() {
+ return enabled;
+ }
+
+
+
+ public OFBsnFlowIdleEnableGetReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnFlowIdleEnableGetReply.Builder {
+ final OFBsnFlowIdleEnableGetReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean enabledSet;
+ private long enabled;
+
+ BuilderWithParent(OFBsnFlowIdleEnableGetReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnFlowIdleEnableGetReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x27L;
+ }
+
+ @Override
+ public long getEnabled() {
+ return enabled;
+ }
+
+ @Override
+ public OFBsnFlowIdleEnableGetReply.Builder setEnabled(long enabled) {
+ this.enabled = enabled;
+ this.enabledSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnFlowIdleEnableGetReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ long enabled = this.enabledSet ? this.enabled : parentMessage.enabled;
+
+ //
+ return new OFBsnFlowIdleEnableGetReplyVer13(
+ xid,
+ enabled
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnFlowIdleEnableGetReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean enabledSet;
+ private long enabled;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnFlowIdleEnableGetReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x27L;
+ }
+
+ @Override
+ public long getEnabled() {
+ return enabled;
+ }
+
+ @Override
+ public OFBsnFlowIdleEnableGetReply.Builder setEnabled(long enabled) {
+ this.enabled = enabled;
+ this.enabledSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnFlowIdleEnableGetReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ long enabled = this.enabledSet ? this.enabled : DEFAULT_ENABLED;
+
+
+ return new OFBsnFlowIdleEnableGetReplyVer13(
+ xid,
+ enabled
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnFlowIdleEnableGetReply> {
+ @Override
+ public OFBsnFlowIdleEnableGetReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 4
+ byte type = bb.readByte();
+ if(type != (byte) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 20)
+ throw new OFParseError("Wrong length: Expected=20(20), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x27L
+ int subtype = bb.readInt();
+ if(subtype != 0x27)
+ throw new OFParseError("Wrong subtype: Expected=0x27L(0x27L), got="+subtype);
+ long enabled = U32.f(bb.readInt());
+
+ OFBsnFlowIdleEnableGetReplyVer13 bsnFlowIdleEnableGetReplyVer13 = new OFBsnFlowIdleEnableGetReplyVer13(
+ xid,
+ enabled
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnFlowIdleEnableGetReplyVer13);
+ return bsnFlowIdleEnableGetReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnFlowIdleEnableGetReplyVer13Funnel FUNNEL = new OFBsnFlowIdleEnableGetReplyVer13Funnel();
+ static class OFBsnFlowIdleEnableGetReplyVer13Funnel implements Funnel<OFBsnFlowIdleEnableGetReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnFlowIdleEnableGetReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property length = 20
+ sink.putShort((short) 0x14);
+ sink.putLong(message.xid);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x27L
+ sink.putInt(0x27);
+ sink.putLong(message.enabled);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnFlowIdleEnableGetReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnFlowIdleEnableGetReplyVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property length = 20
+ bb.writeShort((short) 0x14);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x27L
+ bb.writeInt(0x27);
+ bb.writeInt(U32.t(message.enabled));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnFlowIdleEnableGetReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("enabled=").append(enabled);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnFlowIdleEnableGetReplyVer13 other = (OFBsnFlowIdleEnableGetReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if( enabled != other.enabled)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * (int) (enabled ^ (enabled >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnFlowIdleEnableGetRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnFlowIdleEnableGetRequestVer13.java
new file mode 100644
index 0000000..af54989
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnFlowIdleEnableGetRequestVer13.java
@@ -0,0 +1,314 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnFlowIdleEnableGetRequestVer13 implements OFBsnFlowIdleEnableGetRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnFlowIdleEnableGetRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 16;
+
+ private final static long DEFAULT_XID = 0x0L;
+
+ // OF message fields
+ private final long xid;
+//
+ // Immutable default instance
+ final static OFBsnFlowIdleEnableGetRequestVer13 DEFAULT = new OFBsnFlowIdleEnableGetRequestVer13(
+ DEFAULT_XID
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnFlowIdleEnableGetRequestVer13(long xid) {
+ this.xid = xid;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x26L;
+ }
+
+
+
+ public OFBsnFlowIdleEnableGetRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnFlowIdleEnableGetRequest.Builder {
+ final OFBsnFlowIdleEnableGetRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+
+ BuilderWithParent(OFBsnFlowIdleEnableGetRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnFlowIdleEnableGetRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x26L;
+ }
+
+
+
+ @Override
+ public OFBsnFlowIdleEnableGetRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+
+ //
+ return new OFBsnFlowIdleEnableGetRequestVer13(
+ xid
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnFlowIdleEnableGetRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnFlowIdleEnableGetRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x26L;
+ }
+
+//
+ @Override
+ public OFBsnFlowIdleEnableGetRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+
+
+ return new OFBsnFlowIdleEnableGetRequestVer13(
+ xid
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnFlowIdleEnableGetRequest> {
+ @Override
+ public OFBsnFlowIdleEnableGetRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 4
+ byte type = bb.readByte();
+ if(type != (byte) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 16)
+ throw new OFParseError("Wrong length: Expected=16(16), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x26L
+ int subtype = bb.readInt();
+ if(subtype != 0x26)
+ throw new OFParseError("Wrong subtype: Expected=0x26L(0x26L), got="+subtype);
+
+ OFBsnFlowIdleEnableGetRequestVer13 bsnFlowIdleEnableGetRequestVer13 = new OFBsnFlowIdleEnableGetRequestVer13(
+ xid
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnFlowIdleEnableGetRequestVer13);
+ return bsnFlowIdleEnableGetRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnFlowIdleEnableGetRequestVer13Funnel FUNNEL = new OFBsnFlowIdleEnableGetRequestVer13Funnel();
+ static class OFBsnFlowIdleEnableGetRequestVer13Funnel implements Funnel<OFBsnFlowIdleEnableGetRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnFlowIdleEnableGetRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property length = 16
+ sink.putShort((short) 0x10);
+ sink.putLong(message.xid);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x26L
+ sink.putInt(0x26);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnFlowIdleEnableGetRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnFlowIdleEnableGetRequestVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property length = 16
+ bb.writeShort((short) 0x10);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x26L
+ bb.writeInt(0x26);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnFlowIdleEnableGetRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnFlowIdleEnableGetRequestVer13 other = (OFBsnFlowIdleEnableGetRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnFlowIdleEnableSetReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnFlowIdleEnableSetReplyVer13.java
new file mode 100644
index 0000000..12e255f
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnFlowIdleEnableSetReplyVer13.java
@@ -0,0 +1,408 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import java.util.Set;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnFlowIdleEnableSetReplyVer13 implements OFBsnFlowIdleEnableSetReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnFlowIdleEnableSetReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 24;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static long DEFAULT_ENABLE = 0x0L;
+ private final static long DEFAULT_STATUS = 0x0L;
+
+ // OF message fields
+ private final long xid;
+ private final long enable;
+ private final long status;
+//
+ // Immutable default instance
+ final static OFBsnFlowIdleEnableSetReplyVer13 DEFAULT = new OFBsnFlowIdleEnableSetReplyVer13(
+ DEFAULT_XID, DEFAULT_ENABLE, DEFAULT_STATUS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnFlowIdleEnableSetReplyVer13(long xid, long enable, long status) {
+ this.xid = xid;
+ this.enable = enable;
+ this.status = status;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x25L;
+ }
+
+ @Override
+ public long getEnable() {
+ return enable;
+ }
+
+ @Override
+ public long getStatus() {
+ return status;
+ }
+
+
+
+ public OFBsnFlowIdleEnableSetReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnFlowIdleEnableSetReply.Builder {
+ final OFBsnFlowIdleEnableSetReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean enableSet;
+ private long enable;
+ private boolean statusSet;
+ private long status;
+
+ BuilderWithParent(OFBsnFlowIdleEnableSetReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnFlowIdleEnableSetReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x25L;
+ }
+
+ @Override
+ public long getEnable() {
+ return enable;
+ }
+
+ @Override
+ public OFBsnFlowIdleEnableSetReply.Builder setEnable(long enable) {
+ this.enable = enable;
+ this.enableSet = true;
+ return this;
+ }
+ @Override
+ public long getStatus() {
+ return status;
+ }
+
+ @Override
+ public OFBsnFlowIdleEnableSetReply.Builder setStatus(long status) {
+ this.status = status;
+ this.statusSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnFlowIdleEnableSetReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ long enable = this.enableSet ? this.enable : parentMessage.enable;
+ long status = this.statusSet ? this.status : parentMessage.status;
+
+ //
+ return new OFBsnFlowIdleEnableSetReplyVer13(
+ xid,
+ enable,
+ status
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnFlowIdleEnableSetReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean enableSet;
+ private long enable;
+ private boolean statusSet;
+ private long status;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnFlowIdleEnableSetReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x25L;
+ }
+
+ @Override
+ public long getEnable() {
+ return enable;
+ }
+
+ @Override
+ public OFBsnFlowIdleEnableSetReply.Builder setEnable(long enable) {
+ this.enable = enable;
+ this.enableSet = true;
+ return this;
+ }
+ @Override
+ public long getStatus() {
+ return status;
+ }
+
+ @Override
+ public OFBsnFlowIdleEnableSetReply.Builder setStatus(long status) {
+ this.status = status;
+ this.statusSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnFlowIdleEnableSetReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ long enable = this.enableSet ? this.enable : DEFAULT_ENABLE;
+ long status = this.statusSet ? this.status : DEFAULT_STATUS;
+
+
+ return new OFBsnFlowIdleEnableSetReplyVer13(
+ xid,
+ enable,
+ status
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnFlowIdleEnableSetReply> {
+ @Override
+ public OFBsnFlowIdleEnableSetReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 4
+ byte type = bb.readByte();
+ if(type != (byte) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 24)
+ throw new OFParseError("Wrong length: Expected=24(24), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x25L
+ int subtype = bb.readInt();
+ if(subtype != 0x25)
+ throw new OFParseError("Wrong subtype: Expected=0x25L(0x25L), got="+subtype);
+ long enable = U32.f(bb.readInt());
+ long status = U32.f(bb.readInt());
+
+ OFBsnFlowIdleEnableSetReplyVer13 bsnFlowIdleEnableSetReplyVer13 = new OFBsnFlowIdleEnableSetReplyVer13(
+ xid,
+ enable,
+ status
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnFlowIdleEnableSetReplyVer13);
+ return bsnFlowIdleEnableSetReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnFlowIdleEnableSetReplyVer13Funnel FUNNEL = new OFBsnFlowIdleEnableSetReplyVer13Funnel();
+ static class OFBsnFlowIdleEnableSetReplyVer13Funnel implements Funnel<OFBsnFlowIdleEnableSetReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnFlowIdleEnableSetReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property length = 24
+ sink.putShort((short) 0x18);
+ sink.putLong(message.xid);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x25L
+ sink.putInt(0x25);
+ sink.putLong(message.enable);
+ sink.putLong(message.status);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnFlowIdleEnableSetReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnFlowIdleEnableSetReplyVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property length = 24
+ bb.writeShort((short) 0x18);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x25L
+ bb.writeInt(0x25);
+ bb.writeInt(U32.t(message.enable));
+ bb.writeInt(U32.t(message.status));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnFlowIdleEnableSetReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("enable=").append(enable);
+ b.append(", ");
+ b.append("status=").append(status);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnFlowIdleEnableSetReplyVer13 other = (OFBsnFlowIdleEnableSetReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if( enable != other.enable)
+ return false;
+ if( status != other.status)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * (int) (enable ^ (enable >>> 32));
+ result = prime * (int) (status ^ (status >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnFlowIdleEnableSetRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnFlowIdleEnableSetRequestVer13.java
new file mode 100644
index 0000000..a4a5a16
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnFlowIdleEnableSetRequestVer13.java
@@ -0,0 +1,361 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import java.util.Set;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnFlowIdleEnableSetRequestVer13 implements OFBsnFlowIdleEnableSetRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnFlowIdleEnableSetRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 20;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static long DEFAULT_ENABLE = 0x0L;
+
+ // OF message fields
+ private final long xid;
+ private final long enable;
+//
+ // Immutable default instance
+ final static OFBsnFlowIdleEnableSetRequestVer13 DEFAULT = new OFBsnFlowIdleEnableSetRequestVer13(
+ DEFAULT_XID, DEFAULT_ENABLE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnFlowIdleEnableSetRequestVer13(long xid, long enable) {
+ this.xid = xid;
+ this.enable = enable;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x24L;
+ }
+
+ @Override
+ public long getEnable() {
+ return enable;
+ }
+
+
+
+ public OFBsnFlowIdleEnableSetRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnFlowIdleEnableSetRequest.Builder {
+ final OFBsnFlowIdleEnableSetRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean enableSet;
+ private long enable;
+
+ BuilderWithParent(OFBsnFlowIdleEnableSetRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnFlowIdleEnableSetRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x24L;
+ }
+
+ @Override
+ public long getEnable() {
+ return enable;
+ }
+
+ @Override
+ public OFBsnFlowIdleEnableSetRequest.Builder setEnable(long enable) {
+ this.enable = enable;
+ this.enableSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnFlowIdleEnableSetRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ long enable = this.enableSet ? this.enable : parentMessage.enable;
+
+ //
+ return new OFBsnFlowIdleEnableSetRequestVer13(
+ xid,
+ enable
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnFlowIdleEnableSetRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean enableSet;
+ private long enable;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnFlowIdleEnableSetRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x24L;
+ }
+
+ @Override
+ public long getEnable() {
+ return enable;
+ }
+
+ @Override
+ public OFBsnFlowIdleEnableSetRequest.Builder setEnable(long enable) {
+ this.enable = enable;
+ this.enableSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnFlowIdleEnableSetRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ long enable = this.enableSet ? this.enable : DEFAULT_ENABLE;
+
+
+ return new OFBsnFlowIdleEnableSetRequestVer13(
+ xid,
+ enable
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnFlowIdleEnableSetRequest> {
+ @Override
+ public OFBsnFlowIdleEnableSetRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 4
+ byte type = bb.readByte();
+ if(type != (byte) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 20)
+ throw new OFParseError("Wrong length: Expected=20(20), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x24L
+ int subtype = bb.readInt();
+ if(subtype != 0x24)
+ throw new OFParseError("Wrong subtype: Expected=0x24L(0x24L), got="+subtype);
+ long enable = U32.f(bb.readInt());
+
+ OFBsnFlowIdleEnableSetRequestVer13 bsnFlowIdleEnableSetRequestVer13 = new OFBsnFlowIdleEnableSetRequestVer13(
+ xid,
+ enable
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnFlowIdleEnableSetRequestVer13);
+ return bsnFlowIdleEnableSetRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnFlowIdleEnableSetRequestVer13Funnel FUNNEL = new OFBsnFlowIdleEnableSetRequestVer13Funnel();
+ static class OFBsnFlowIdleEnableSetRequestVer13Funnel implements Funnel<OFBsnFlowIdleEnableSetRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnFlowIdleEnableSetRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property length = 20
+ sink.putShort((short) 0x14);
+ sink.putLong(message.xid);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x24L
+ sink.putInt(0x24);
+ sink.putLong(message.enable);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnFlowIdleEnableSetRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnFlowIdleEnableSetRequestVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property length = 20
+ bb.writeShort((short) 0x14);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x24L
+ bb.writeInt(0x24);
+ bb.writeInt(U32.t(message.enable));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnFlowIdleEnableSetRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("enable=").append(enable);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnFlowIdleEnableSetRequestVer13 other = (OFBsnFlowIdleEnableSetRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if( enable != other.enable)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * (int) (enable ^ (enable >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnFlowIdleVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnFlowIdleVer13.java
new file mode 100644
index 0000000..1b2bfd2
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnFlowIdleVer13.java
@@ -0,0 +1,533 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnFlowIdleVer13 implements OFBsnFlowIdle {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnFlowIdleVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 40;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static U64 DEFAULT_COOKIE = U64.ZERO;
+ private final static int DEFAULT_PRIORITY = 0x0;
+ private final static TableId DEFAULT_TABLE_ID = TableId.ALL;
+ private final static Match DEFAULT_MATCH = OFFactoryVer13.MATCH_WILDCARD_ALL;
+
+ // OF message fields
+ private final long xid;
+ private final U64 cookie;
+ private final int priority;
+ private final TableId tableId;
+ private final Match match;
+//
+ // Immutable default instance
+ final static OFBsnFlowIdleVer13 DEFAULT = new OFBsnFlowIdleVer13(
+ DEFAULT_XID, DEFAULT_COOKIE, DEFAULT_PRIORITY, DEFAULT_TABLE_ID, DEFAULT_MATCH
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnFlowIdleVer13(long xid, U64 cookie, int priority, TableId tableId, Match match) {
+ this.xid = xid;
+ this.cookie = cookie;
+ this.priority = priority;
+ this.tableId = tableId;
+ this.match = match;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x28L;
+ }
+
+ @Override
+ public U64 getCookie() {
+ return cookie;
+ }
+
+ @Override
+ public int getPriority() {
+ return priority;
+ }
+
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public Match getMatch() {
+ return match;
+ }
+
+
+
+ public OFBsnFlowIdle.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnFlowIdle.Builder {
+ final OFBsnFlowIdleVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean cookieSet;
+ private U64 cookie;
+ private boolean prioritySet;
+ private int priority;
+ private boolean tableIdSet;
+ private TableId tableId;
+ private boolean matchSet;
+ private Match match;
+
+ BuilderWithParent(OFBsnFlowIdleVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnFlowIdle.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x28L;
+ }
+
+ @Override
+ public U64 getCookie() {
+ return cookie;
+ }
+
+ @Override
+ public OFBsnFlowIdle.Builder setCookie(U64 cookie) {
+ this.cookie = cookie;
+ this.cookieSet = true;
+ return this;
+ }
+ @Override
+ public int getPriority() {
+ return priority;
+ }
+
+ @Override
+ public OFBsnFlowIdle.Builder setPriority(int priority) {
+ this.priority = priority;
+ this.prioritySet = true;
+ return this;
+ }
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFBsnFlowIdle.Builder setTableId(TableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+ @Override
+ public Match getMatch() {
+ return match;
+ }
+
+ @Override
+ public OFBsnFlowIdle.Builder setMatch(Match match) {
+ this.match = match;
+ this.matchSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnFlowIdle build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ U64 cookie = this.cookieSet ? this.cookie : parentMessage.cookie;
+ if(cookie == null)
+ throw new NullPointerException("Property cookie must not be null");
+ int priority = this.prioritySet ? this.priority : parentMessage.priority;
+ TableId tableId = this.tableIdSet ? this.tableId : parentMessage.tableId;
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+ Match match = this.matchSet ? this.match : parentMessage.match;
+ if(match == null)
+ throw new NullPointerException("Property match must not be null");
+
+ //
+ return new OFBsnFlowIdleVer13(
+ xid,
+ cookie,
+ priority,
+ tableId,
+ match
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnFlowIdle.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean cookieSet;
+ private U64 cookie;
+ private boolean prioritySet;
+ private int priority;
+ private boolean tableIdSet;
+ private TableId tableId;
+ private boolean matchSet;
+ private Match match;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnFlowIdle.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x28L;
+ }
+
+ @Override
+ public U64 getCookie() {
+ return cookie;
+ }
+
+ @Override
+ public OFBsnFlowIdle.Builder setCookie(U64 cookie) {
+ this.cookie = cookie;
+ this.cookieSet = true;
+ return this;
+ }
+ @Override
+ public int getPriority() {
+ return priority;
+ }
+
+ @Override
+ public OFBsnFlowIdle.Builder setPriority(int priority) {
+ this.priority = priority;
+ this.prioritySet = true;
+ return this;
+ }
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFBsnFlowIdle.Builder setTableId(TableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+ @Override
+ public Match getMatch() {
+ return match;
+ }
+
+ @Override
+ public OFBsnFlowIdle.Builder setMatch(Match match) {
+ this.match = match;
+ this.matchSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnFlowIdle build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ U64 cookie = this.cookieSet ? this.cookie : DEFAULT_COOKIE;
+ if(cookie == null)
+ throw new NullPointerException("Property cookie must not be null");
+ int priority = this.prioritySet ? this.priority : DEFAULT_PRIORITY;
+ TableId tableId = this.tableIdSet ? this.tableId : DEFAULT_TABLE_ID;
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+ Match match = this.matchSet ? this.match : DEFAULT_MATCH;
+ if(match == null)
+ throw new NullPointerException("Property match must not be null");
+
+
+ return new OFBsnFlowIdleVer13(
+ xid,
+ cookie,
+ priority,
+ tableId,
+ match
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnFlowIdle> {
+ @Override
+ public OFBsnFlowIdle readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 4
+ byte type = bb.readByte();
+ if(type != (byte) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x28L
+ int subtype = bb.readInt();
+ if(subtype != 0x28)
+ throw new OFParseError("Wrong subtype: Expected=0x28L(0x28L), got="+subtype);
+ U64 cookie = U64.ofRaw(bb.readLong());
+ int priority = U16.f(bb.readShort());
+ TableId tableId = TableId.readByte(bb);
+ // pad: 5 bytes
+ bb.skipBytes(5);
+ Match match = ChannelUtilsVer13.readOFMatch(bb);
+
+ OFBsnFlowIdleVer13 bsnFlowIdleVer13 = new OFBsnFlowIdleVer13(
+ xid,
+ cookie,
+ priority,
+ tableId,
+ match
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnFlowIdleVer13);
+ return bsnFlowIdleVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnFlowIdleVer13Funnel FUNNEL = new OFBsnFlowIdleVer13Funnel();
+ static class OFBsnFlowIdleVer13Funnel implements Funnel<OFBsnFlowIdleVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnFlowIdleVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 4
+ sink.putByte((byte) 0x4);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x28L
+ sink.putInt(0x28);
+ message.cookie.putTo(sink);
+ sink.putInt(message.priority);
+ message.tableId.putTo(sink);
+ // skip pad (5 bytes)
+ message.match.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnFlowIdleVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnFlowIdleVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 4
+ bb.writeByte((byte) 0x4);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x28L
+ bb.writeInt(0x28);
+ bb.writeLong(message.cookie.getValue());
+ bb.writeShort(U16.t(message.priority));
+ message.tableId.writeByte(bb);
+ // pad: 5 bytes
+ bb.writeZero(5);
+ message.match.writeTo(bb);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnFlowIdleVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("cookie=").append(cookie);
+ b.append(", ");
+ b.append("priority=").append(priority);
+ b.append(", ");
+ b.append("tableId=").append(tableId);
+ b.append(", ");
+ b.append("match=").append(match);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnFlowIdleVer13 other = (OFBsnFlowIdleVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (cookie == null) {
+ if (other.cookie != null)
+ return false;
+ } else if (!cookie.equals(other.cookie))
+ return false;
+ if( priority != other.priority)
+ return false;
+ if (tableId == null) {
+ if (other.tableId != null)
+ return false;
+ } else if (!tableId.equals(other.tableId))
+ return false;
+ if (match == null) {
+ if (other.match != null)
+ return false;
+ } else if (!match.equals(other.match))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((cookie == null) ? 0 : cookie.hashCode());
+ result = prime * result + priority;
+ result = prime * result + ((tableId == null) ? 0 : tableId.hashCode());
+ result = prime * result + ((match == null) ? 0 : match.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableBucketStatsEntryVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableBucketStatsEntryVer13.java
new file mode 100644
index 0000000..7d332b7
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableBucketStatsEntryVer13.java
@@ -0,0 +1,229 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnGentableBucketStatsEntryVer13 implements OFBsnGentableBucketStatsEntry {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnGentableBucketStatsEntryVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 16;
+
+ private final static U128 DEFAULT_CHECKSUM = U128.ZERO;
+
+ // OF message fields
+ private final U128 checksum;
+//
+ // Immutable default instance
+ final static OFBsnGentableBucketStatsEntryVer13 DEFAULT = new OFBsnGentableBucketStatsEntryVer13(
+ DEFAULT_CHECKSUM
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnGentableBucketStatsEntryVer13(U128 checksum) {
+ this.checksum = checksum;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public U128 getChecksum() {
+ return checksum;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFBsnGentableBucketStatsEntry.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnGentableBucketStatsEntry.Builder {
+ final OFBsnGentableBucketStatsEntryVer13 parentMessage;
+
+ // OF message fields
+ private boolean checksumSet;
+ private U128 checksum;
+
+ BuilderWithParent(OFBsnGentableBucketStatsEntryVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public U128 getChecksum() {
+ return checksum;
+ }
+
+ @Override
+ public OFBsnGentableBucketStatsEntry.Builder setChecksum(U128 checksum) {
+ this.checksum = checksum;
+ this.checksumSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFBsnGentableBucketStatsEntry build() {
+ U128 checksum = this.checksumSet ? this.checksum : parentMessage.checksum;
+ if(checksum == null)
+ throw new NullPointerException("Property checksum must not be null");
+
+ //
+ return new OFBsnGentableBucketStatsEntryVer13(
+ checksum
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnGentableBucketStatsEntry.Builder {
+ // OF message fields
+ private boolean checksumSet;
+ private U128 checksum;
+
+ @Override
+ public U128 getChecksum() {
+ return checksum;
+ }
+
+ @Override
+ public OFBsnGentableBucketStatsEntry.Builder setChecksum(U128 checksum) {
+ this.checksum = checksum;
+ this.checksumSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFBsnGentableBucketStatsEntry build() {
+ U128 checksum = this.checksumSet ? this.checksum : DEFAULT_CHECKSUM;
+ if(checksum == null)
+ throw new NullPointerException("Property checksum must not be null");
+
+
+ return new OFBsnGentableBucketStatsEntryVer13(
+ checksum
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnGentableBucketStatsEntry> {
+ @Override
+ public OFBsnGentableBucketStatsEntry readFrom(ChannelBuffer bb) throws OFParseError {
+ U128 checksum = U128.read16Bytes(bb);
+
+ OFBsnGentableBucketStatsEntryVer13 bsnGentableBucketStatsEntryVer13 = new OFBsnGentableBucketStatsEntryVer13(
+ checksum
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnGentableBucketStatsEntryVer13);
+ return bsnGentableBucketStatsEntryVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnGentableBucketStatsEntryVer13Funnel FUNNEL = new OFBsnGentableBucketStatsEntryVer13Funnel();
+ static class OFBsnGentableBucketStatsEntryVer13Funnel implements Funnel<OFBsnGentableBucketStatsEntryVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnGentableBucketStatsEntryVer13 message, PrimitiveSink sink) {
+ message.checksum.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnGentableBucketStatsEntryVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnGentableBucketStatsEntryVer13 message) {
+ message.checksum.write16Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnGentableBucketStatsEntryVer13(");
+ b.append("checksum=").append(checksum);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnGentableBucketStatsEntryVer13 other = (OFBsnGentableBucketStatsEntryVer13) obj;
+
+ if (checksum == null) {
+ if (other.checksum != null)
+ return false;
+ } else if (!checksum.equals(other.checksum))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((checksum == null) ? 0 : checksum.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableBucketStatsReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableBucketStatsReplyVer13.java
new file mode 100644
index 0000000..2c991f5
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableBucketStatsReplyVer13.java
@@ -0,0 +1,458 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnGentableBucketStatsReplyVer13 implements OFBsnGentableBucketStatsReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnGentableBucketStatsReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 24;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsReplyFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsReplyFlags>of();
+ private final static List<OFBsnGentableBucketStatsEntry> DEFAULT_ENTRIES = ImmutableList.<OFBsnGentableBucketStatsEntry>of();
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsReplyFlags> flags;
+ private final List<OFBsnGentableBucketStatsEntry> entries;
+//
+ // Immutable default instance
+ final static OFBsnGentableBucketStatsReplyVer13 DEFAULT = new OFBsnGentableBucketStatsReplyVer13(
+ DEFAULT_XID, DEFAULT_FLAGS, DEFAULT_ENTRIES
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnGentableBucketStatsReplyVer13(long xid, Set<OFStatsReplyFlags> flags, List<OFBsnGentableBucketStatsEntry> entries) {
+ this.xid = xid;
+ this.flags = flags;
+ this.entries = entries;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x5L;
+ }
+
+ @Override
+ public List<OFBsnGentableBucketStatsEntry> getEntries() {
+ return entries;
+ }
+
+
+
+ public OFBsnGentableBucketStatsReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnGentableBucketStatsReply.Builder {
+ final OFBsnGentableBucketStatsReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean entriesSet;
+ private List<OFBsnGentableBucketStatsEntry> entries;
+
+ BuilderWithParent(OFBsnGentableBucketStatsReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnGentableBucketStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnGentableBucketStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x5L;
+ }
+
+ @Override
+ public List<OFBsnGentableBucketStatsEntry> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFBsnGentableBucketStatsReply.Builder setEntries(List<OFBsnGentableBucketStatsEntry> entries) {
+ this.entries = entries;
+ this.entriesSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnGentableBucketStatsReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ List<OFBsnGentableBucketStatsEntry> entries = this.entriesSet ? this.entries : parentMessage.entries;
+ if(entries == null)
+ throw new NullPointerException("Property entries must not be null");
+
+ //
+ return new OFBsnGentableBucketStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnGentableBucketStatsReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean entriesSet;
+ private List<OFBsnGentableBucketStatsEntry> entries;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnGentableBucketStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnGentableBucketStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x5L;
+ }
+
+ @Override
+ public List<OFBsnGentableBucketStatsEntry> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFBsnGentableBucketStatsReply.Builder setEntries(List<OFBsnGentableBucketStatsEntry> entries) {
+ this.entries = entries;
+ this.entriesSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnGentableBucketStatsReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ List<OFBsnGentableBucketStatsEntry> entries = this.entriesSet ? this.entries : DEFAULT_ENTRIES;
+ if(entries == null)
+ throw new NullPointerException("Property entries must not be null");
+
+
+ return new OFBsnGentableBucketStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnGentableBucketStatsReply> {
+ @Override
+ public OFBsnGentableBucketStatsReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 19
+ byte type = bb.readByte();
+ if(type != (byte) 0x13)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REPLY(19), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 65535
+ short statsType = bb.readShort();
+ if(statsType != (short) 0xffff)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.EXPERIMENTER(65535), got="+statsType);
+ Set<OFStatsReplyFlags> flags = OFStatsReplyFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x5L
+ int subtype = bb.readInt();
+ if(subtype != 0x5)
+ throw new OFParseError("Wrong subtype: Expected=0x5L(0x5L), got="+subtype);
+ List<OFBsnGentableBucketStatsEntry> entries = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFBsnGentableBucketStatsEntryVer13.READER);
+
+ OFBsnGentableBucketStatsReplyVer13 bsnGentableBucketStatsReplyVer13 = new OFBsnGentableBucketStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnGentableBucketStatsReplyVer13);
+ return bsnGentableBucketStatsReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnGentableBucketStatsReplyVer13Funnel FUNNEL = new OFBsnGentableBucketStatsReplyVer13Funnel();
+ static class OFBsnGentableBucketStatsReplyVer13Funnel implements Funnel<OFBsnGentableBucketStatsReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnGentableBucketStatsReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 19
+ sink.putByte((byte) 0x13);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property statsType = 65535
+ sink.putShort((short) 0xffff);
+ OFStatsReplyFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x5L
+ sink.putInt(0x5);
+ FunnelUtils.putList(message.entries, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnGentableBucketStatsReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnGentableBucketStatsReplyVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 19
+ bb.writeByte((byte) 0x13);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 65535
+ bb.writeShort((short) 0xffff);
+ OFStatsReplyFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x5L
+ bb.writeInt(0x5);
+ ChannelUtils.writeList(bb, message.entries);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnGentableBucketStatsReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("entries=").append(entries);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnGentableBucketStatsReplyVer13 other = (OFBsnGentableBucketStatsReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if (entries == null) {
+ if (other.entries != null)
+ return false;
+ } else if (!entries.equals(other.entries))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * result + ((entries == null) ? 0 : entries.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableBucketStatsRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableBucketStatsRequestVer13.java
new file mode 100644
index 0000000..285afd3
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableBucketStatsRequestVer13.java
@@ -0,0 +1,447 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnGentableBucketStatsRequestVer13 implements OFBsnGentableBucketStatsRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnGentableBucketStatsRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 26;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsRequestFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsRequestFlags>of();
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsRequestFlags> flags;
+ private final GenTableId tableId;
+//
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnGentableBucketStatsRequestVer13(long xid, Set<OFStatsRequestFlags> flags, GenTableId tableId) {
+ this.xid = xid;
+ this.flags = flags;
+ this.tableId = tableId;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x5L;
+ }
+
+ @Override
+ public GenTableId getTableId() {
+ return tableId;
+ }
+
+
+
+ public OFBsnGentableBucketStatsRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnGentableBucketStatsRequest.Builder {
+ final OFBsnGentableBucketStatsRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+ private boolean tableIdSet;
+ private GenTableId tableId;
+
+ BuilderWithParent(OFBsnGentableBucketStatsRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnGentableBucketStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnGentableBucketStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x5L;
+ }
+
+ @Override
+ public GenTableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFBsnGentableBucketStatsRequest.Builder setTableId(GenTableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnGentableBucketStatsRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ GenTableId tableId = this.tableIdSet ? this.tableId : parentMessage.tableId;
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+
+ //
+ return new OFBsnGentableBucketStatsRequestVer13(
+ xid,
+ flags,
+ tableId
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnGentableBucketStatsRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+ private boolean tableIdSet;
+ private GenTableId tableId;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnGentableBucketStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnGentableBucketStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x5L;
+ }
+
+ @Override
+ public GenTableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFBsnGentableBucketStatsRequest.Builder setTableId(GenTableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnGentableBucketStatsRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ if(!this.tableIdSet)
+ throw new IllegalStateException("Property tableId doesn't have default value -- must be set");
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+
+
+ return new OFBsnGentableBucketStatsRequestVer13(
+ xid,
+ flags,
+ tableId
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnGentableBucketStatsRequest> {
+ @Override
+ public OFBsnGentableBucketStatsRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 18
+ byte type = bb.readByte();
+ if(type != (byte) 0x12)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REQUEST(18), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 26)
+ throw new OFParseError("Wrong length: Expected=26(26), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 65535
+ short statsType = bb.readShort();
+ if(statsType != (short) 0xffff)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.EXPERIMENTER(65535), got="+statsType);
+ Set<OFStatsRequestFlags> flags = OFStatsRequestFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x5L
+ int subtype = bb.readInt();
+ if(subtype != 0x5)
+ throw new OFParseError("Wrong subtype: Expected=0x5L(0x5L), got="+subtype);
+ GenTableId tableId = GenTableId.read2Bytes(bb);
+
+ OFBsnGentableBucketStatsRequestVer13 bsnGentableBucketStatsRequestVer13 = new OFBsnGentableBucketStatsRequestVer13(
+ xid,
+ flags,
+ tableId
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnGentableBucketStatsRequestVer13);
+ return bsnGentableBucketStatsRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnGentableBucketStatsRequestVer13Funnel FUNNEL = new OFBsnGentableBucketStatsRequestVer13Funnel();
+ static class OFBsnGentableBucketStatsRequestVer13Funnel implements Funnel<OFBsnGentableBucketStatsRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnGentableBucketStatsRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 18
+ sink.putByte((byte) 0x12);
+ // fixed value property length = 26
+ sink.putShort((short) 0x1a);
+ sink.putLong(message.xid);
+ // fixed value property statsType = 65535
+ sink.putShort((short) 0xffff);
+ OFStatsRequestFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x5L
+ sink.putInt(0x5);
+ message.tableId.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnGentableBucketStatsRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnGentableBucketStatsRequestVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 18
+ bb.writeByte((byte) 0x12);
+ // fixed value property length = 26
+ bb.writeShort((short) 0x1a);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 65535
+ bb.writeShort((short) 0xffff);
+ OFStatsRequestFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x5L
+ bb.writeInt(0x5);
+ message.tableId.write2Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnGentableBucketStatsRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("tableId=").append(tableId);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnGentableBucketStatsRequestVer13 other = (OFBsnGentableBucketStatsRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if (tableId == null) {
+ if (other.tableId != null)
+ return false;
+ } else if (!tableId.equals(other.tableId))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * result + ((tableId == null) ? 0 : tableId.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableClearReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableClearReplyVer13.java
new file mode 100644
index 0000000..75465ec
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableClearReplyVer13.java
@@ -0,0 +1,463 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnGentableClearReplyVer13 implements OFBsnGentableClearReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnGentableClearReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 28;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static long DEFAULT_DELETED_COUNT = 0x0L;
+ private final static long DEFAULT_ERROR_COUNT = 0x0L;
+
+ // OF message fields
+ private final long xid;
+ private final GenTableId tableId;
+ private final long deletedCount;
+ private final long errorCount;
+//
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnGentableClearReplyVer13(long xid, GenTableId tableId, long deletedCount, long errorCount) {
+ this.xid = xid;
+ this.tableId = tableId;
+ this.deletedCount = deletedCount;
+ this.errorCount = errorCount;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x31L;
+ }
+
+ @Override
+ public GenTableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public long getDeletedCount() {
+ return deletedCount;
+ }
+
+ @Override
+ public long getErrorCount() {
+ return errorCount;
+ }
+
+
+
+ public OFBsnGentableClearReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnGentableClearReply.Builder {
+ final OFBsnGentableClearReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean tableIdSet;
+ private GenTableId tableId;
+ private boolean deletedCountSet;
+ private long deletedCount;
+ private boolean errorCountSet;
+ private long errorCount;
+
+ BuilderWithParent(OFBsnGentableClearReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnGentableClearReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x31L;
+ }
+
+ @Override
+ public GenTableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFBsnGentableClearReply.Builder setTableId(GenTableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+ @Override
+ public long getDeletedCount() {
+ return deletedCount;
+ }
+
+ @Override
+ public OFBsnGentableClearReply.Builder setDeletedCount(long deletedCount) {
+ this.deletedCount = deletedCount;
+ this.deletedCountSet = true;
+ return this;
+ }
+ @Override
+ public long getErrorCount() {
+ return errorCount;
+ }
+
+ @Override
+ public OFBsnGentableClearReply.Builder setErrorCount(long errorCount) {
+ this.errorCount = errorCount;
+ this.errorCountSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnGentableClearReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ GenTableId tableId = this.tableIdSet ? this.tableId : parentMessage.tableId;
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+ long deletedCount = this.deletedCountSet ? this.deletedCount : parentMessage.deletedCount;
+ long errorCount = this.errorCountSet ? this.errorCount : parentMessage.errorCount;
+
+ //
+ return new OFBsnGentableClearReplyVer13(
+ xid,
+ tableId,
+ deletedCount,
+ errorCount
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnGentableClearReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean tableIdSet;
+ private GenTableId tableId;
+ private boolean deletedCountSet;
+ private long deletedCount;
+ private boolean errorCountSet;
+ private long errorCount;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnGentableClearReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x31L;
+ }
+
+ @Override
+ public GenTableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFBsnGentableClearReply.Builder setTableId(GenTableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+ @Override
+ public long getDeletedCount() {
+ return deletedCount;
+ }
+
+ @Override
+ public OFBsnGentableClearReply.Builder setDeletedCount(long deletedCount) {
+ this.deletedCount = deletedCount;
+ this.deletedCountSet = true;
+ return this;
+ }
+ @Override
+ public long getErrorCount() {
+ return errorCount;
+ }
+
+ @Override
+ public OFBsnGentableClearReply.Builder setErrorCount(long errorCount) {
+ this.errorCount = errorCount;
+ this.errorCountSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnGentableClearReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ if(!this.tableIdSet)
+ throw new IllegalStateException("Property tableId doesn't have default value -- must be set");
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+ long deletedCount = this.deletedCountSet ? this.deletedCount : DEFAULT_DELETED_COUNT;
+ long errorCount = this.errorCountSet ? this.errorCount : DEFAULT_ERROR_COUNT;
+
+
+ return new OFBsnGentableClearReplyVer13(
+ xid,
+ tableId,
+ deletedCount,
+ errorCount
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnGentableClearReply> {
+ @Override
+ public OFBsnGentableClearReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 4
+ byte type = bb.readByte();
+ if(type != (byte) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 28)
+ throw new OFParseError("Wrong length: Expected=28(28), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x31L
+ int subtype = bb.readInt();
+ if(subtype != 0x31)
+ throw new OFParseError("Wrong subtype: Expected=0x31L(0x31L), got="+subtype);
+ GenTableId tableId = GenTableId.read2Bytes(bb);
+ // pad: 2 bytes
+ bb.skipBytes(2);
+ long deletedCount = U32.f(bb.readInt());
+ long errorCount = U32.f(bb.readInt());
+
+ OFBsnGentableClearReplyVer13 bsnGentableClearReplyVer13 = new OFBsnGentableClearReplyVer13(
+ xid,
+ tableId,
+ deletedCount,
+ errorCount
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnGentableClearReplyVer13);
+ return bsnGentableClearReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnGentableClearReplyVer13Funnel FUNNEL = new OFBsnGentableClearReplyVer13Funnel();
+ static class OFBsnGentableClearReplyVer13Funnel implements Funnel<OFBsnGentableClearReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnGentableClearReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property length = 28
+ sink.putShort((short) 0x1c);
+ sink.putLong(message.xid);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x31L
+ sink.putInt(0x31);
+ message.tableId.putTo(sink);
+ // skip pad (2 bytes)
+ sink.putLong(message.deletedCount);
+ sink.putLong(message.errorCount);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnGentableClearReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnGentableClearReplyVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property length = 28
+ bb.writeShort((short) 0x1c);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x31L
+ bb.writeInt(0x31);
+ message.tableId.write2Bytes(bb);
+ // pad: 2 bytes
+ bb.writeZero(2);
+ bb.writeInt(U32.t(message.deletedCount));
+ bb.writeInt(U32.t(message.errorCount));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnGentableClearReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("tableId=").append(tableId);
+ b.append(", ");
+ b.append("deletedCount=").append(deletedCount);
+ b.append(", ");
+ b.append("errorCount=").append(errorCount);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnGentableClearReplyVer13 other = (OFBsnGentableClearReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (tableId == null) {
+ if (other.tableId != null)
+ return false;
+ } else if (!tableId.equals(other.tableId))
+ return false;
+ if( deletedCount != other.deletedCount)
+ return false;
+ if( errorCount != other.errorCount)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((tableId == null) ? 0 : tableId.hashCode());
+ result = prime * (int) (deletedCount ^ (deletedCount >>> 32));
+ result = prime * (int) (errorCount ^ (errorCount >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableClearRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableClearRequestVer13.java
new file mode 100644
index 0000000..9c96e4b
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableClearRequestVer13.java
@@ -0,0 +1,477 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnGentableClearRequestVer13 implements OFBsnGentableClearRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnGentableClearRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 52;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static U128 DEFAULT_CHECKSUM = U128.ZERO;
+ private final static U128 DEFAULT_CHECKSUM_MASK = U128.ZERO;
+
+ // OF message fields
+ private final long xid;
+ private final GenTableId tableId;
+ private final U128 checksum;
+ private final U128 checksumMask;
+//
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnGentableClearRequestVer13(long xid, GenTableId tableId, U128 checksum, U128 checksumMask) {
+ this.xid = xid;
+ this.tableId = tableId;
+ this.checksum = checksum;
+ this.checksumMask = checksumMask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x30L;
+ }
+
+ @Override
+ public GenTableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public U128 getChecksum() {
+ return checksum;
+ }
+
+ @Override
+ public U128 getChecksumMask() {
+ return checksumMask;
+ }
+
+
+
+ public OFBsnGentableClearRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnGentableClearRequest.Builder {
+ final OFBsnGentableClearRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean tableIdSet;
+ private GenTableId tableId;
+ private boolean checksumSet;
+ private U128 checksum;
+ private boolean checksumMaskSet;
+ private U128 checksumMask;
+
+ BuilderWithParent(OFBsnGentableClearRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnGentableClearRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x30L;
+ }
+
+ @Override
+ public GenTableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFBsnGentableClearRequest.Builder setTableId(GenTableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+ @Override
+ public U128 getChecksum() {
+ return checksum;
+ }
+
+ @Override
+ public OFBsnGentableClearRequest.Builder setChecksum(U128 checksum) {
+ this.checksum = checksum;
+ this.checksumSet = true;
+ return this;
+ }
+ @Override
+ public U128 getChecksumMask() {
+ return checksumMask;
+ }
+
+ @Override
+ public OFBsnGentableClearRequest.Builder setChecksumMask(U128 checksumMask) {
+ this.checksumMask = checksumMask;
+ this.checksumMaskSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnGentableClearRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ GenTableId tableId = this.tableIdSet ? this.tableId : parentMessage.tableId;
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+ U128 checksum = this.checksumSet ? this.checksum : parentMessage.checksum;
+ if(checksum == null)
+ throw new NullPointerException("Property checksum must not be null");
+ U128 checksumMask = this.checksumMaskSet ? this.checksumMask : parentMessage.checksumMask;
+ if(checksumMask == null)
+ throw new NullPointerException("Property checksumMask must not be null");
+
+ //
+ return new OFBsnGentableClearRequestVer13(
+ xid,
+ tableId,
+ checksum,
+ checksumMask
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnGentableClearRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean tableIdSet;
+ private GenTableId tableId;
+ private boolean checksumSet;
+ private U128 checksum;
+ private boolean checksumMaskSet;
+ private U128 checksumMask;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnGentableClearRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x30L;
+ }
+
+ @Override
+ public GenTableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFBsnGentableClearRequest.Builder setTableId(GenTableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+ @Override
+ public U128 getChecksum() {
+ return checksum;
+ }
+
+ @Override
+ public OFBsnGentableClearRequest.Builder setChecksum(U128 checksum) {
+ this.checksum = checksum;
+ this.checksumSet = true;
+ return this;
+ }
+ @Override
+ public U128 getChecksumMask() {
+ return checksumMask;
+ }
+
+ @Override
+ public OFBsnGentableClearRequest.Builder setChecksumMask(U128 checksumMask) {
+ this.checksumMask = checksumMask;
+ this.checksumMaskSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnGentableClearRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ if(!this.tableIdSet)
+ throw new IllegalStateException("Property tableId doesn't have default value -- must be set");
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+ U128 checksum = this.checksumSet ? this.checksum : DEFAULT_CHECKSUM;
+ if(checksum == null)
+ throw new NullPointerException("Property checksum must not be null");
+ U128 checksumMask = this.checksumMaskSet ? this.checksumMask : DEFAULT_CHECKSUM_MASK;
+ if(checksumMask == null)
+ throw new NullPointerException("Property checksumMask must not be null");
+
+
+ return new OFBsnGentableClearRequestVer13(
+ xid,
+ tableId,
+ checksum,
+ checksumMask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnGentableClearRequest> {
+ @Override
+ public OFBsnGentableClearRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 4
+ byte type = bb.readByte();
+ if(type != (byte) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 52)
+ throw new OFParseError("Wrong length: Expected=52(52), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x30L
+ int subtype = bb.readInt();
+ if(subtype != 0x30)
+ throw new OFParseError("Wrong subtype: Expected=0x30L(0x30L), got="+subtype);
+ GenTableId tableId = GenTableId.read2Bytes(bb);
+ // pad: 2 bytes
+ bb.skipBytes(2);
+ U128 checksum = U128.read16Bytes(bb);
+ U128 checksumMask = U128.read16Bytes(bb);
+
+ OFBsnGentableClearRequestVer13 bsnGentableClearRequestVer13 = new OFBsnGentableClearRequestVer13(
+ xid,
+ tableId,
+ checksum,
+ checksumMask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnGentableClearRequestVer13);
+ return bsnGentableClearRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnGentableClearRequestVer13Funnel FUNNEL = new OFBsnGentableClearRequestVer13Funnel();
+ static class OFBsnGentableClearRequestVer13Funnel implements Funnel<OFBsnGentableClearRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnGentableClearRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property length = 52
+ sink.putShort((short) 0x34);
+ sink.putLong(message.xid);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x30L
+ sink.putInt(0x30);
+ message.tableId.putTo(sink);
+ // skip pad (2 bytes)
+ message.checksum.putTo(sink);
+ message.checksumMask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnGentableClearRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnGentableClearRequestVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property length = 52
+ bb.writeShort((short) 0x34);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x30L
+ bb.writeInt(0x30);
+ message.tableId.write2Bytes(bb);
+ // pad: 2 bytes
+ bb.writeZero(2);
+ message.checksum.write16Bytes(bb);
+ message.checksumMask.write16Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnGentableClearRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("tableId=").append(tableId);
+ b.append(", ");
+ b.append("checksum=").append(checksum);
+ b.append(", ");
+ b.append("checksumMask=").append(checksumMask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnGentableClearRequestVer13 other = (OFBsnGentableClearRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (tableId == null) {
+ if (other.tableId != null)
+ return false;
+ } else if (!tableId.equals(other.tableId))
+ return false;
+ if (checksum == null) {
+ if (other.checksum != null)
+ return false;
+ } else if (!checksum.equals(other.checksum))
+ return false;
+ if (checksumMask == null) {
+ if (other.checksumMask != null)
+ return false;
+ } else if (!checksumMask.equals(other.checksumMask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((tableId == null) ? 0 : tableId.hashCode());
+ result = prime * result + ((checksum == null) ? 0 : checksum.hashCode());
+ result = prime * result + ((checksumMask == null) ? 0 : checksumMask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableDescStatsEntryVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableDescStatsEntryVer13.java
new file mode 100644
index 0000000..058b2b0
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableDescStatsEntryVer13.java
@@ -0,0 +1,393 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnGentableDescStatsEntryVer13 implements OFBsnGentableDescStatsEntry {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnGentableDescStatsEntryVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 48;
+
+ private final static String DEFAULT_NAME = "";
+ private final static long DEFAULT_BUCKETS_SIZE = 0x0L;
+ private final static long DEFAULT_MAX_ENTRIES = 0x0L;
+
+ // OF message fields
+ private final GenTableId tableId;
+ private final String name;
+ private final long bucketsSize;
+ private final long maxEntries;
+//
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnGentableDescStatsEntryVer13(GenTableId tableId, String name, long bucketsSize, long maxEntries) {
+ this.tableId = tableId;
+ this.name = name;
+ this.bucketsSize = bucketsSize;
+ this.maxEntries = maxEntries;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public GenTableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ @Override
+ public long getBucketsSize() {
+ return bucketsSize;
+ }
+
+ @Override
+ public long getMaxEntries() {
+ return maxEntries;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFBsnGentableDescStatsEntry.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnGentableDescStatsEntry.Builder {
+ final OFBsnGentableDescStatsEntryVer13 parentMessage;
+
+ // OF message fields
+ private boolean tableIdSet;
+ private GenTableId tableId;
+ private boolean nameSet;
+ private String name;
+ private boolean bucketsSizeSet;
+ private long bucketsSize;
+ private boolean maxEntriesSet;
+ private long maxEntries;
+
+ BuilderWithParent(OFBsnGentableDescStatsEntryVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public GenTableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFBsnGentableDescStatsEntry.Builder setTableId(GenTableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ @Override
+ public OFBsnGentableDescStatsEntry.Builder setName(String name) {
+ this.name = name;
+ this.nameSet = true;
+ return this;
+ }
+ @Override
+ public long getBucketsSize() {
+ return bucketsSize;
+ }
+
+ @Override
+ public OFBsnGentableDescStatsEntry.Builder setBucketsSize(long bucketsSize) {
+ this.bucketsSize = bucketsSize;
+ this.bucketsSizeSet = true;
+ return this;
+ }
+ @Override
+ public long getMaxEntries() {
+ return maxEntries;
+ }
+
+ @Override
+ public OFBsnGentableDescStatsEntry.Builder setMaxEntries(long maxEntries) {
+ this.maxEntries = maxEntries;
+ this.maxEntriesSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFBsnGentableDescStatsEntry build() {
+ GenTableId tableId = this.tableIdSet ? this.tableId : parentMessage.tableId;
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+ String name = this.nameSet ? this.name : parentMessage.name;
+ if(name == null)
+ throw new NullPointerException("Property name must not be null");
+ long bucketsSize = this.bucketsSizeSet ? this.bucketsSize : parentMessage.bucketsSize;
+ long maxEntries = this.maxEntriesSet ? this.maxEntries : parentMessage.maxEntries;
+
+ //
+ return new OFBsnGentableDescStatsEntryVer13(
+ tableId,
+ name,
+ bucketsSize,
+ maxEntries
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnGentableDescStatsEntry.Builder {
+ // OF message fields
+ private boolean tableIdSet;
+ private GenTableId tableId;
+ private boolean nameSet;
+ private String name;
+ private boolean bucketsSizeSet;
+ private long bucketsSize;
+ private boolean maxEntriesSet;
+ private long maxEntries;
+
+ @Override
+ public GenTableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFBsnGentableDescStatsEntry.Builder setTableId(GenTableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ @Override
+ public OFBsnGentableDescStatsEntry.Builder setName(String name) {
+ this.name = name;
+ this.nameSet = true;
+ return this;
+ }
+ @Override
+ public long getBucketsSize() {
+ return bucketsSize;
+ }
+
+ @Override
+ public OFBsnGentableDescStatsEntry.Builder setBucketsSize(long bucketsSize) {
+ this.bucketsSize = bucketsSize;
+ this.bucketsSizeSet = true;
+ return this;
+ }
+ @Override
+ public long getMaxEntries() {
+ return maxEntries;
+ }
+
+ @Override
+ public OFBsnGentableDescStatsEntry.Builder setMaxEntries(long maxEntries) {
+ this.maxEntries = maxEntries;
+ this.maxEntriesSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFBsnGentableDescStatsEntry build() {
+ if(!this.tableIdSet)
+ throw new IllegalStateException("Property tableId doesn't have default value -- must be set");
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+ String name = this.nameSet ? this.name : DEFAULT_NAME;
+ if(name == null)
+ throw new NullPointerException("Property name must not be null");
+ long bucketsSize = this.bucketsSizeSet ? this.bucketsSize : DEFAULT_BUCKETS_SIZE;
+ long maxEntries = this.maxEntriesSet ? this.maxEntries : DEFAULT_MAX_ENTRIES;
+
+
+ return new OFBsnGentableDescStatsEntryVer13(
+ tableId,
+ name,
+ bucketsSize,
+ maxEntries
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnGentableDescStatsEntry> {
+ @Override
+ public OFBsnGentableDescStatsEntry readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ int length = U16.f(bb.readShort());
+ if(length != 48)
+ throw new OFParseError("Wrong length: Expected=48(48), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ GenTableId tableId = GenTableId.read2Bytes(bb);
+ String name = ChannelUtils.readFixedLengthString(bb, 32);
+ long bucketsSize = U32.f(bb.readInt());
+ long maxEntries = U32.f(bb.readInt());
+ // pad: 4 bytes
+ bb.skipBytes(4);
+
+ OFBsnGentableDescStatsEntryVer13 bsnGentableDescStatsEntryVer13 = new OFBsnGentableDescStatsEntryVer13(
+ tableId,
+ name,
+ bucketsSize,
+ maxEntries
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnGentableDescStatsEntryVer13);
+ return bsnGentableDescStatsEntryVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnGentableDescStatsEntryVer13Funnel FUNNEL = new OFBsnGentableDescStatsEntryVer13Funnel();
+ static class OFBsnGentableDescStatsEntryVer13Funnel implements Funnel<OFBsnGentableDescStatsEntryVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnGentableDescStatsEntryVer13 message, PrimitiveSink sink) {
+ // fixed value property length = 48
+ sink.putShort((short) 0x30);
+ message.tableId.putTo(sink);
+ sink.putUnencodedChars(message.name);
+ sink.putLong(message.bucketsSize);
+ sink.putLong(message.maxEntries);
+ // skip pad (4 bytes)
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnGentableDescStatsEntryVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnGentableDescStatsEntryVer13 message) {
+ // fixed value property length = 48
+ bb.writeShort((short) 0x30);
+ message.tableId.write2Bytes(bb);
+ ChannelUtils.writeFixedLengthString(bb, message.name, 32);
+ bb.writeInt(U32.t(message.bucketsSize));
+ bb.writeInt(U32.t(message.maxEntries));
+ // pad: 4 bytes
+ bb.writeZero(4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnGentableDescStatsEntryVer13(");
+ b.append("tableId=").append(tableId);
+ b.append(", ");
+ b.append("name=").append(name);
+ b.append(", ");
+ b.append("bucketsSize=").append(bucketsSize);
+ b.append(", ");
+ b.append("maxEntries=").append(maxEntries);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnGentableDescStatsEntryVer13 other = (OFBsnGentableDescStatsEntryVer13) obj;
+
+ if (tableId == null) {
+ if (other.tableId != null)
+ return false;
+ } else if (!tableId.equals(other.tableId))
+ return false;
+ if (name == null) {
+ if (other.name != null)
+ return false;
+ } else if (!name.equals(other.name))
+ return false;
+ if( bucketsSize != other.bucketsSize)
+ return false;
+ if( maxEntries != other.maxEntries)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((tableId == null) ? 0 : tableId.hashCode());
+ result = prime * result + ((name == null) ? 0 : name.hashCode());
+ result = prime * (int) (bucketsSize ^ (bucketsSize >>> 32));
+ result = prime * (int) (maxEntries ^ (maxEntries >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableDescStatsReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableDescStatsReplyVer13.java
new file mode 100644
index 0000000..fba991d
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableDescStatsReplyVer13.java
@@ -0,0 +1,458 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnGentableDescStatsReplyVer13 implements OFBsnGentableDescStatsReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnGentableDescStatsReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 24;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsReplyFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsReplyFlags>of();
+ private final static List<OFBsnGentableDescStatsEntry> DEFAULT_ENTRIES = ImmutableList.<OFBsnGentableDescStatsEntry>of();
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsReplyFlags> flags;
+ private final List<OFBsnGentableDescStatsEntry> entries;
+//
+ // Immutable default instance
+ final static OFBsnGentableDescStatsReplyVer13 DEFAULT = new OFBsnGentableDescStatsReplyVer13(
+ DEFAULT_XID, DEFAULT_FLAGS, DEFAULT_ENTRIES
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnGentableDescStatsReplyVer13(long xid, Set<OFStatsReplyFlags> flags, List<OFBsnGentableDescStatsEntry> entries) {
+ this.xid = xid;
+ this.flags = flags;
+ this.entries = entries;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x4L;
+ }
+
+ @Override
+ public List<OFBsnGentableDescStatsEntry> getEntries() {
+ return entries;
+ }
+
+
+
+ public OFBsnGentableDescStatsReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnGentableDescStatsReply.Builder {
+ final OFBsnGentableDescStatsReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean entriesSet;
+ private List<OFBsnGentableDescStatsEntry> entries;
+
+ BuilderWithParent(OFBsnGentableDescStatsReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnGentableDescStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnGentableDescStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x4L;
+ }
+
+ @Override
+ public List<OFBsnGentableDescStatsEntry> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFBsnGentableDescStatsReply.Builder setEntries(List<OFBsnGentableDescStatsEntry> entries) {
+ this.entries = entries;
+ this.entriesSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnGentableDescStatsReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ List<OFBsnGentableDescStatsEntry> entries = this.entriesSet ? this.entries : parentMessage.entries;
+ if(entries == null)
+ throw new NullPointerException("Property entries must not be null");
+
+ //
+ return new OFBsnGentableDescStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnGentableDescStatsReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean entriesSet;
+ private List<OFBsnGentableDescStatsEntry> entries;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnGentableDescStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnGentableDescStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x4L;
+ }
+
+ @Override
+ public List<OFBsnGentableDescStatsEntry> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFBsnGentableDescStatsReply.Builder setEntries(List<OFBsnGentableDescStatsEntry> entries) {
+ this.entries = entries;
+ this.entriesSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnGentableDescStatsReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ List<OFBsnGentableDescStatsEntry> entries = this.entriesSet ? this.entries : DEFAULT_ENTRIES;
+ if(entries == null)
+ throw new NullPointerException("Property entries must not be null");
+
+
+ return new OFBsnGentableDescStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnGentableDescStatsReply> {
+ @Override
+ public OFBsnGentableDescStatsReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 19
+ byte type = bb.readByte();
+ if(type != (byte) 0x13)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REPLY(19), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 65535
+ short statsType = bb.readShort();
+ if(statsType != (short) 0xffff)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.EXPERIMENTER(65535), got="+statsType);
+ Set<OFStatsReplyFlags> flags = OFStatsReplyFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x4L
+ int subtype = bb.readInt();
+ if(subtype != 0x4)
+ throw new OFParseError("Wrong subtype: Expected=0x4L(0x4L), got="+subtype);
+ List<OFBsnGentableDescStatsEntry> entries = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFBsnGentableDescStatsEntryVer13.READER);
+
+ OFBsnGentableDescStatsReplyVer13 bsnGentableDescStatsReplyVer13 = new OFBsnGentableDescStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnGentableDescStatsReplyVer13);
+ return bsnGentableDescStatsReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnGentableDescStatsReplyVer13Funnel FUNNEL = new OFBsnGentableDescStatsReplyVer13Funnel();
+ static class OFBsnGentableDescStatsReplyVer13Funnel implements Funnel<OFBsnGentableDescStatsReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnGentableDescStatsReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 19
+ sink.putByte((byte) 0x13);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property statsType = 65535
+ sink.putShort((short) 0xffff);
+ OFStatsReplyFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x4L
+ sink.putInt(0x4);
+ FunnelUtils.putList(message.entries, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnGentableDescStatsReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnGentableDescStatsReplyVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 19
+ bb.writeByte((byte) 0x13);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 65535
+ bb.writeShort((short) 0xffff);
+ OFStatsReplyFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x4L
+ bb.writeInt(0x4);
+ ChannelUtils.writeList(bb, message.entries);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnGentableDescStatsReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("entries=").append(entries);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnGentableDescStatsReplyVer13 other = (OFBsnGentableDescStatsReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if (entries == null) {
+ if (other.entries != null)
+ return false;
+ } else if (!entries.equals(other.entries))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * result + ((entries == null) ? 0 : entries.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableDescStatsRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableDescStatsRequestVer13.java
new file mode 100644
index 0000000..385e1ea
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableDescStatsRequestVer13.java
@@ -0,0 +1,397 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnGentableDescStatsRequestVer13 implements OFBsnGentableDescStatsRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnGentableDescStatsRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 24;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsRequestFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsRequestFlags>of();
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsRequestFlags> flags;
+//
+ // Immutable default instance
+ final static OFBsnGentableDescStatsRequestVer13 DEFAULT = new OFBsnGentableDescStatsRequestVer13(
+ DEFAULT_XID, DEFAULT_FLAGS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnGentableDescStatsRequestVer13(long xid, Set<OFStatsRequestFlags> flags) {
+ this.xid = xid;
+ this.flags = flags;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x4L;
+ }
+
+
+
+ public OFBsnGentableDescStatsRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnGentableDescStatsRequest.Builder {
+ final OFBsnGentableDescStatsRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+
+ BuilderWithParent(OFBsnGentableDescStatsRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnGentableDescStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnGentableDescStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x4L;
+ }
+
+
+
+ @Override
+ public OFBsnGentableDescStatsRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+
+ //
+ return new OFBsnGentableDescStatsRequestVer13(
+ xid,
+ flags
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnGentableDescStatsRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnGentableDescStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnGentableDescStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x4L;
+ }
+
+//
+ @Override
+ public OFBsnGentableDescStatsRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+
+
+ return new OFBsnGentableDescStatsRequestVer13(
+ xid,
+ flags
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnGentableDescStatsRequest> {
+ @Override
+ public OFBsnGentableDescStatsRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 18
+ byte type = bb.readByte();
+ if(type != (byte) 0x12)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REQUEST(18), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 24)
+ throw new OFParseError("Wrong length: Expected=24(24), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 65535
+ short statsType = bb.readShort();
+ if(statsType != (short) 0xffff)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.EXPERIMENTER(65535), got="+statsType);
+ Set<OFStatsRequestFlags> flags = OFStatsRequestFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x4L
+ int subtype = bb.readInt();
+ if(subtype != 0x4)
+ throw new OFParseError("Wrong subtype: Expected=0x4L(0x4L), got="+subtype);
+
+ OFBsnGentableDescStatsRequestVer13 bsnGentableDescStatsRequestVer13 = new OFBsnGentableDescStatsRequestVer13(
+ xid,
+ flags
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnGentableDescStatsRequestVer13);
+ return bsnGentableDescStatsRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnGentableDescStatsRequestVer13Funnel FUNNEL = new OFBsnGentableDescStatsRequestVer13Funnel();
+ static class OFBsnGentableDescStatsRequestVer13Funnel implements Funnel<OFBsnGentableDescStatsRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnGentableDescStatsRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 18
+ sink.putByte((byte) 0x12);
+ // fixed value property length = 24
+ sink.putShort((short) 0x18);
+ sink.putLong(message.xid);
+ // fixed value property statsType = 65535
+ sink.putShort((short) 0xffff);
+ OFStatsRequestFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x4L
+ sink.putInt(0x4);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnGentableDescStatsRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnGentableDescStatsRequestVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 18
+ bb.writeByte((byte) 0x12);
+ // fixed value property length = 24
+ bb.writeShort((short) 0x18);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 65535
+ bb.writeShort((short) 0xffff);
+ OFStatsRequestFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x4L
+ bb.writeInt(0x4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnGentableDescStatsRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnGentableDescStatsRequestVer13 other = (OFBsnGentableDescStatsRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableEntryAddVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableEntryAddVer13.java
new file mode 100644
index 0000000..756ebee
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableEntryAddVer13.java
@@ -0,0 +1,543 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnGentableEntryAddVer13 implements OFBsnGentableEntryAdd {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnGentableEntryAddVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 36;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static U128 DEFAULT_CHECKSUM = U128.ZERO;
+ private final static List<OFBsnTlv> DEFAULT_KEY = ImmutableList.<OFBsnTlv>of();
+ private final static List<OFBsnTlv> DEFAULT_VALUE = ImmutableList.<OFBsnTlv>of();
+
+ // OF message fields
+ private final long xid;
+ private final GenTableId tableId;
+ private final U128 checksum;
+ private final List<OFBsnTlv> key;
+ private final List<OFBsnTlv> value;
+//
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnGentableEntryAddVer13(long xid, GenTableId tableId, U128 checksum, List<OFBsnTlv> key, List<OFBsnTlv> value) {
+ this.xid = xid;
+ this.tableId = tableId;
+ this.checksum = checksum;
+ this.key = key;
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x2eL;
+ }
+
+ @Override
+ public GenTableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public U128 getChecksum() {
+ return checksum;
+ }
+
+ @Override
+ public List<OFBsnTlv> getKey() {
+ return key;
+ }
+
+ @Override
+ public List<OFBsnTlv> getValue() {
+ return value;
+ }
+
+
+
+ public OFBsnGentableEntryAdd.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnGentableEntryAdd.Builder {
+ final OFBsnGentableEntryAddVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean tableIdSet;
+ private GenTableId tableId;
+ private boolean checksumSet;
+ private U128 checksum;
+ private boolean keySet;
+ private List<OFBsnTlv> key;
+ private boolean valueSet;
+ private List<OFBsnTlv> value;
+
+ BuilderWithParent(OFBsnGentableEntryAddVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnGentableEntryAdd.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x2eL;
+ }
+
+ @Override
+ public GenTableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFBsnGentableEntryAdd.Builder setTableId(GenTableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+ @Override
+ public U128 getChecksum() {
+ return checksum;
+ }
+
+ @Override
+ public OFBsnGentableEntryAdd.Builder setChecksum(U128 checksum) {
+ this.checksum = checksum;
+ this.checksumSet = true;
+ return this;
+ }
+ @Override
+ public List<OFBsnTlv> getKey() {
+ return key;
+ }
+
+ @Override
+ public OFBsnGentableEntryAdd.Builder setKey(List<OFBsnTlv> key) {
+ this.key = key;
+ this.keySet = true;
+ return this;
+ }
+ @Override
+ public List<OFBsnTlv> getValue() {
+ return value;
+ }
+
+ @Override
+ public OFBsnGentableEntryAdd.Builder setValue(List<OFBsnTlv> value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnGentableEntryAdd build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ GenTableId tableId = this.tableIdSet ? this.tableId : parentMessage.tableId;
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+ U128 checksum = this.checksumSet ? this.checksum : parentMessage.checksum;
+ if(checksum == null)
+ throw new NullPointerException("Property checksum must not be null");
+ List<OFBsnTlv> key = this.keySet ? this.key : parentMessage.key;
+ if(key == null)
+ throw new NullPointerException("Property key must not be null");
+ List<OFBsnTlv> value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFBsnGentableEntryAddVer13(
+ xid,
+ tableId,
+ checksum,
+ key,
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnGentableEntryAdd.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean tableIdSet;
+ private GenTableId tableId;
+ private boolean checksumSet;
+ private U128 checksum;
+ private boolean keySet;
+ private List<OFBsnTlv> key;
+ private boolean valueSet;
+ private List<OFBsnTlv> value;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnGentableEntryAdd.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x2eL;
+ }
+
+ @Override
+ public GenTableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFBsnGentableEntryAdd.Builder setTableId(GenTableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+ @Override
+ public U128 getChecksum() {
+ return checksum;
+ }
+
+ @Override
+ public OFBsnGentableEntryAdd.Builder setChecksum(U128 checksum) {
+ this.checksum = checksum;
+ this.checksumSet = true;
+ return this;
+ }
+ @Override
+ public List<OFBsnTlv> getKey() {
+ return key;
+ }
+
+ @Override
+ public OFBsnGentableEntryAdd.Builder setKey(List<OFBsnTlv> key) {
+ this.key = key;
+ this.keySet = true;
+ return this;
+ }
+ @Override
+ public List<OFBsnTlv> getValue() {
+ return value;
+ }
+
+ @Override
+ public OFBsnGentableEntryAdd.Builder setValue(List<OFBsnTlv> value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnGentableEntryAdd build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ if(!this.tableIdSet)
+ throw new IllegalStateException("Property tableId doesn't have default value -- must be set");
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+ U128 checksum = this.checksumSet ? this.checksum : DEFAULT_CHECKSUM;
+ if(checksum == null)
+ throw new NullPointerException("Property checksum must not be null");
+ List<OFBsnTlv> key = this.keySet ? this.key : DEFAULT_KEY;
+ if(key == null)
+ throw new NullPointerException("Property key must not be null");
+ List<OFBsnTlv> value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFBsnGentableEntryAddVer13(
+ xid,
+ tableId,
+ checksum,
+ key,
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnGentableEntryAdd> {
+ @Override
+ public OFBsnGentableEntryAdd readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 4
+ byte type = bb.readByte();
+ if(type != (byte) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x2eL
+ int subtype = bb.readInt();
+ if(subtype != 0x2e)
+ throw new OFParseError("Wrong subtype: Expected=0x2eL(0x2eL), got="+subtype);
+ GenTableId tableId = GenTableId.read2Bytes(bb);
+ int keyLength = U16.f(bb.readShort());
+ U128 checksum = U128.read16Bytes(bb);
+ List<OFBsnTlv> key = ChannelUtils.readList(bb, keyLength, OFBsnTlvVer13.READER);
+ List<OFBsnTlv> value = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFBsnTlvVer13.READER);
+
+ OFBsnGentableEntryAddVer13 bsnGentableEntryAddVer13 = new OFBsnGentableEntryAddVer13(
+ xid,
+ tableId,
+ checksum,
+ key,
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnGentableEntryAddVer13);
+ return bsnGentableEntryAddVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnGentableEntryAddVer13Funnel FUNNEL = new OFBsnGentableEntryAddVer13Funnel();
+ static class OFBsnGentableEntryAddVer13Funnel implements Funnel<OFBsnGentableEntryAddVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnGentableEntryAddVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 4
+ sink.putByte((byte) 0x4);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x2eL
+ sink.putInt(0x2e);
+ message.tableId.putTo(sink);
+ // FIXME: skip funnel of keyLength
+ message.checksum.putTo(sink);
+ FunnelUtils.putList(message.key, sink);
+ FunnelUtils.putList(message.value, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnGentableEntryAddVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnGentableEntryAddVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 4
+ bb.writeByte((byte) 0x4);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x2eL
+ bb.writeInt(0x2e);
+ message.tableId.write2Bytes(bb);
+ // keyLength is length indicator for key, will be
+ // udpated when key has been written
+ int keyLengthIndex = bb.writerIndex();
+ bb.writeShort(0);
+ message.checksum.write16Bytes(bb);
+ int keyStartIndex = bb.writerIndex();
+ ChannelUtils.writeList(bb, message.key);
+ // update field length member keyLength
+ int keyLength = bb.writerIndex() - keyStartIndex;
+ bb.setShort(keyLengthIndex, keyLength);
+ ChannelUtils.writeList(bb, message.value);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnGentableEntryAddVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("tableId=").append(tableId);
+ b.append(", ");
+ b.append("checksum=").append(checksum);
+ b.append(", ");
+ b.append("key=").append(key);
+ b.append(", ");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnGentableEntryAddVer13 other = (OFBsnGentableEntryAddVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (tableId == null) {
+ if (other.tableId != null)
+ return false;
+ } else if (!tableId.equals(other.tableId))
+ return false;
+ if (checksum == null) {
+ if (other.checksum != null)
+ return false;
+ } else if (!checksum.equals(other.checksum))
+ return false;
+ if (key == null) {
+ if (other.key != null)
+ return false;
+ } else if (!key.equals(other.key))
+ return false;
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((tableId == null) ? 0 : tableId.hashCode());
+ result = prime * result + ((checksum == null) ? 0 : checksum.hashCode());
+ result = prime * result + ((key == null) ? 0 : key.hashCode());
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableEntryDeleteVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableEntryDeleteVer13.java
new file mode 100644
index 0000000..3b9c823
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableEntryDeleteVer13.java
@@ -0,0 +1,425 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnGentableEntryDeleteVer13 implements OFBsnGentableEntryDelete {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnGentableEntryDeleteVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 18;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static List<OFBsnTlv> DEFAULT_KEY = ImmutableList.<OFBsnTlv>of();
+
+ // OF message fields
+ private final long xid;
+ private final GenTableId tableId;
+ private final List<OFBsnTlv> key;
+//
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnGentableEntryDeleteVer13(long xid, GenTableId tableId, List<OFBsnTlv> key) {
+ this.xid = xid;
+ this.tableId = tableId;
+ this.key = key;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x2fL;
+ }
+
+ @Override
+ public GenTableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public List<OFBsnTlv> getKey() {
+ return key;
+ }
+
+
+
+ public OFBsnGentableEntryDelete.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnGentableEntryDelete.Builder {
+ final OFBsnGentableEntryDeleteVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean tableIdSet;
+ private GenTableId tableId;
+ private boolean keySet;
+ private List<OFBsnTlv> key;
+
+ BuilderWithParent(OFBsnGentableEntryDeleteVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnGentableEntryDelete.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x2fL;
+ }
+
+ @Override
+ public GenTableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFBsnGentableEntryDelete.Builder setTableId(GenTableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+ @Override
+ public List<OFBsnTlv> getKey() {
+ return key;
+ }
+
+ @Override
+ public OFBsnGentableEntryDelete.Builder setKey(List<OFBsnTlv> key) {
+ this.key = key;
+ this.keySet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnGentableEntryDelete build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ GenTableId tableId = this.tableIdSet ? this.tableId : parentMessage.tableId;
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+ List<OFBsnTlv> key = this.keySet ? this.key : parentMessage.key;
+ if(key == null)
+ throw new NullPointerException("Property key must not be null");
+
+ //
+ return new OFBsnGentableEntryDeleteVer13(
+ xid,
+ tableId,
+ key
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnGentableEntryDelete.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean tableIdSet;
+ private GenTableId tableId;
+ private boolean keySet;
+ private List<OFBsnTlv> key;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnGentableEntryDelete.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x2fL;
+ }
+
+ @Override
+ public GenTableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFBsnGentableEntryDelete.Builder setTableId(GenTableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+ @Override
+ public List<OFBsnTlv> getKey() {
+ return key;
+ }
+
+ @Override
+ public OFBsnGentableEntryDelete.Builder setKey(List<OFBsnTlv> key) {
+ this.key = key;
+ this.keySet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnGentableEntryDelete build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ if(!this.tableIdSet)
+ throw new IllegalStateException("Property tableId doesn't have default value -- must be set");
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+ List<OFBsnTlv> key = this.keySet ? this.key : DEFAULT_KEY;
+ if(key == null)
+ throw new NullPointerException("Property key must not be null");
+
+
+ return new OFBsnGentableEntryDeleteVer13(
+ xid,
+ tableId,
+ key
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnGentableEntryDelete> {
+ @Override
+ public OFBsnGentableEntryDelete readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 4
+ byte type = bb.readByte();
+ if(type != (byte) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x2fL
+ int subtype = bb.readInt();
+ if(subtype != 0x2f)
+ throw new OFParseError("Wrong subtype: Expected=0x2fL(0x2fL), got="+subtype);
+ GenTableId tableId = GenTableId.read2Bytes(bb);
+ List<OFBsnTlv> key = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFBsnTlvVer13.READER);
+
+ OFBsnGentableEntryDeleteVer13 bsnGentableEntryDeleteVer13 = new OFBsnGentableEntryDeleteVer13(
+ xid,
+ tableId,
+ key
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnGentableEntryDeleteVer13);
+ return bsnGentableEntryDeleteVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnGentableEntryDeleteVer13Funnel FUNNEL = new OFBsnGentableEntryDeleteVer13Funnel();
+ static class OFBsnGentableEntryDeleteVer13Funnel implements Funnel<OFBsnGentableEntryDeleteVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnGentableEntryDeleteVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 4
+ sink.putByte((byte) 0x4);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x2fL
+ sink.putInt(0x2f);
+ message.tableId.putTo(sink);
+ FunnelUtils.putList(message.key, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnGentableEntryDeleteVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnGentableEntryDeleteVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 4
+ bb.writeByte((byte) 0x4);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x2fL
+ bb.writeInt(0x2f);
+ message.tableId.write2Bytes(bb);
+ ChannelUtils.writeList(bb, message.key);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnGentableEntryDeleteVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("tableId=").append(tableId);
+ b.append(", ");
+ b.append("key=").append(key);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnGentableEntryDeleteVer13 other = (OFBsnGentableEntryDeleteVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (tableId == null) {
+ if (other.tableId != null)
+ return false;
+ } else if (!tableId.equals(other.tableId))
+ return false;
+ if (key == null) {
+ if (other.key != null)
+ return false;
+ } else if (!key.equals(other.key))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((tableId == null) ? 0 : tableId.hashCode());
+ result = prime * result + ((key == null) ? 0 : key.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableEntryDescStatsEntryVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableEntryDescStatsEntryVer13.java
new file mode 100644
index 0000000..5b9c438
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableEntryDescStatsEntryVer13.java
@@ -0,0 +1,369 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnGentableEntryDescStatsEntryVer13 implements OFBsnGentableEntryDescStatsEntry {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnGentableEntryDescStatsEntryVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 20;
+
+ private final static U128 DEFAULT_CHECKSUM = U128.ZERO;
+ private final static List<OFBsnTlv> DEFAULT_KEY = ImmutableList.<OFBsnTlv>of();
+ private final static List<OFBsnTlv> DEFAULT_VALUE = ImmutableList.<OFBsnTlv>of();
+
+ // OF message fields
+ private final U128 checksum;
+ private final List<OFBsnTlv> key;
+ private final List<OFBsnTlv> value;
+//
+ // Immutable default instance
+ final static OFBsnGentableEntryDescStatsEntryVer13 DEFAULT = new OFBsnGentableEntryDescStatsEntryVer13(
+ DEFAULT_CHECKSUM, DEFAULT_KEY, DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnGentableEntryDescStatsEntryVer13(U128 checksum, List<OFBsnTlv> key, List<OFBsnTlv> value) {
+ this.checksum = checksum;
+ this.key = key;
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public U128 getChecksum() {
+ return checksum;
+ }
+
+ @Override
+ public List<OFBsnTlv> getKey() {
+ return key;
+ }
+
+ @Override
+ public List<OFBsnTlv> getValue() {
+ return value;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFBsnGentableEntryDescStatsEntry.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnGentableEntryDescStatsEntry.Builder {
+ final OFBsnGentableEntryDescStatsEntryVer13 parentMessage;
+
+ // OF message fields
+ private boolean checksumSet;
+ private U128 checksum;
+ private boolean keySet;
+ private List<OFBsnTlv> key;
+ private boolean valueSet;
+ private List<OFBsnTlv> value;
+
+ BuilderWithParent(OFBsnGentableEntryDescStatsEntryVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public U128 getChecksum() {
+ return checksum;
+ }
+
+ @Override
+ public OFBsnGentableEntryDescStatsEntry.Builder setChecksum(U128 checksum) {
+ this.checksum = checksum;
+ this.checksumSet = true;
+ return this;
+ }
+ @Override
+ public List<OFBsnTlv> getKey() {
+ return key;
+ }
+
+ @Override
+ public OFBsnGentableEntryDescStatsEntry.Builder setKey(List<OFBsnTlv> key) {
+ this.key = key;
+ this.keySet = true;
+ return this;
+ }
+ @Override
+ public List<OFBsnTlv> getValue() {
+ return value;
+ }
+
+ @Override
+ public OFBsnGentableEntryDescStatsEntry.Builder setValue(List<OFBsnTlv> value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFBsnGentableEntryDescStatsEntry build() {
+ U128 checksum = this.checksumSet ? this.checksum : parentMessage.checksum;
+ if(checksum == null)
+ throw new NullPointerException("Property checksum must not be null");
+ List<OFBsnTlv> key = this.keySet ? this.key : parentMessage.key;
+ if(key == null)
+ throw new NullPointerException("Property key must not be null");
+ List<OFBsnTlv> value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFBsnGentableEntryDescStatsEntryVer13(
+ checksum,
+ key,
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnGentableEntryDescStatsEntry.Builder {
+ // OF message fields
+ private boolean checksumSet;
+ private U128 checksum;
+ private boolean keySet;
+ private List<OFBsnTlv> key;
+ private boolean valueSet;
+ private List<OFBsnTlv> value;
+
+ @Override
+ public U128 getChecksum() {
+ return checksum;
+ }
+
+ @Override
+ public OFBsnGentableEntryDescStatsEntry.Builder setChecksum(U128 checksum) {
+ this.checksum = checksum;
+ this.checksumSet = true;
+ return this;
+ }
+ @Override
+ public List<OFBsnTlv> getKey() {
+ return key;
+ }
+
+ @Override
+ public OFBsnGentableEntryDescStatsEntry.Builder setKey(List<OFBsnTlv> key) {
+ this.key = key;
+ this.keySet = true;
+ return this;
+ }
+ @Override
+ public List<OFBsnTlv> getValue() {
+ return value;
+ }
+
+ @Override
+ public OFBsnGentableEntryDescStatsEntry.Builder setValue(List<OFBsnTlv> value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFBsnGentableEntryDescStatsEntry build() {
+ U128 checksum = this.checksumSet ? this.checksum : DEFAULT_CHECKSUM;
+ if(checksum == null)
+ throw new NullPointerException("Property checksum must not be null");
+ List<OFBsnTlv> key = this.keySet ? this.key : DEFAULT_KEY;
+ if(key == null)
+ throw new NullPointerException("Property key must not be null");
+ List<OFBsnTlv> value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFBsnGentableEntryDescStatsEntryVer13(
+ checksum,
+ key,
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnGentableEntryDescStatsEntry> {
+ @Override
+ public OFBsnGentableEntryDescStatsEntry readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ int keyLength = U16.f(bb.readShort());
+ U128 checksum = U128.read16Bytes(bb);
+ List<OFBsnTlv> key = ChannelUtils.readList(bb, keyLength, OFBsnTlvVer13.READER);
+ List<OFBsnTlv> value = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFBsnTlvVer13.READER);
+
+ OFBsnGentableEntryDescStatsEntryVer13 bsnGentableEntryDescStatsEntryVer13 = new OFBsnGentableEntryDescStatsEntryVer13(
+ checksum,
+ key,
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnGentableEntryDescStatsEntryVer13);
+ return bsnGentableEntryDescStatsEntryVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnGentableEntryDescStatsEntryVer13Funnel FUNNEL = new OFBsnGentableEntryDescStatsEntryVer13Funnel();
+ static class OFBsnGentableEntryDescStatsEntryVer13Funnel implements Funnel<OFBsnGentableEntryDescStatsEntryVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnGentableEntryDescStatsEntryVer13 message, PrimitiveSink sink) {
+ // FIXME: skip funnel of length
+ // FIXME: skip funnel of keyLength
+ message.checksum.putTo(sink);
+ FunnelUtils.putList(message.key, sink);
+ FunnelUtils.putList(message.value, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnGentableEntryDescStatsEntryVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnGentableEntryDescStatsEntryVer13 message) {
+ int startIndex = bb.writerIndex();
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ // keyLength is length indicator for key, will be
+ // udpated when key has been written
+ int keyLengthIndex = bb.writerIndex();
+ bb.writeShort(0);
+ message.checksum.write16Bytes(bb);
+ int keyStartIndex = bb.writerIndex();
+ ChannelUtils.writeList(bb, message.key);
+ // update field length member keyLength
+ int keyLength = bb.writerIndex() - keyStartIndex;
+ bb.setShort(keyLengthIndex, keyLength);
+ ChannelUtils.writeList(bb, message.value);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnGentableEntryDescStatsEntryVer13(");
+ b.append("checksum=").append(checksum);
+ b.append(", ");
+ b.append("key=").append(key);
+ b.append(", ");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnGentableEntryDescStatsEntryVer13 other = (OFBsnGentableEntryDescStatsEntryVer13) obj;
+
+ if (checksum == null) {
+ if (other.checksum != null)
+ return false;
+ } else if (!checksum.equals(other.checksum))
+ return false;
+ if (key == null) {
+ if (other.key != null)
+ return false;
+ } else if (!key.equals(other.key))
+ return false;
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((checksum == null) ? 0 : checksum.hashCode());
+ result = prime * result + ((key == null) ? 0 : key.hashCode());
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableEntryDescStatsReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableEntryDescStatsReplyVer13.java
new file mode 100644
index 0000000..1fd1796
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableEntryDescStatsReplyVer13.java
@@ -0,0 +1,458 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnGentableEntryDescStatsReplyVer13 implements OFBsnGentableEntryDescStatsReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnGentableEntryDescStatsReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 24;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsReplyFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsReplyFlags>of();
+ private final static List<OFBsnGentableEntryDescStatsEntry> DEFAULT_ENTRIES = ImmutableList.<OFBsnGentableEntryDescStatsEntry>of();
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsReplyFlags> flags;
+ private final List<OFBsnGentableEntryDescStatsEntry> entries;
+//
+ // Immutable default instance
+ final static OFBsnGentableEntryDescStatsReplyVer13 DEFAULT = new OFBsnGentableEntryDescStatsReplyVer13(
+ DEFAULT_XID, DEFAULT_FLAGS, DEFAULT_ENTRIES
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnGentableEntryDescStatsReplyVer13(long xid, Set<OFStatsReplyFlags> flags, List<OFBsnGentableEntryDescStatsEntry> entries) {
+ this.xid = xid;
+ this.flags = flags;
+ this.entries = entries;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x2L;
+ }
+
+ @Override
+ public List<OFBsnGentableEntryDescStatsEntry> getEntries() {
+ return entries;
+ }
+
+
+
+ public OFBsnGentableEntryDescStatsReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnGentableEntryDescStatsReply.Builder {
+ final OFBsnGentableEntryDescStatsReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean entriesSet;
+ private List<OFBsnGentableEntryDescStatsEntry> entries;
+
+ BuilderWithParent(OFBsnGentableEntryDescStatsReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnGentableEntryDescStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnGentableEntryDescStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x2L;
+ }
+
+ @Override
+ public List<OFBsnGentableEntryDescStatsEntry> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFBsnGentableEntryDescStatsReply.Builder setEntries(List<OFBsnGentableEntryDescStatsEntry> entries) {
+ this.entries = entries;
+ this.entriesSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnGentableEntryDescStatsReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ List<OFBsnGentableEntryDescStatsEntry> entries = this.entriesSet ? this.entries : parentMessage.entries;
+ if(entries == null)
+ throw new NullPointerException("Property entries must not be null");
+
+ //
+ return new OFBsnGentableEntryDescStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnGentableEntryDescStatsReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean entriesSet;
+ private List<OFBsnGentableEntryDescStatsEntry> entries;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnGentableEntryDescStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnGentableEntryDescStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x2L;
+ }
+
+ @Override
+ public List<OFBsnGentableEntryDescStatsEntry> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFBsnGentableEntryDescStatsReply.Builder setEntries(List<OFBsnGentableEntryDescStatsEntry> entries) {
+ this.entries = entries;
+ this.entriesSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnGentableEntryDescStatsReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ List<OFBsnGentableEntryDescStatsEntry> entries = this.entriesSet ? this.entries : DEFAULT_ENTRIES;
+ if(entries == null)
+ throw new NullPointerException("Property entries must not be null");
+
+
+ return new OFBsnGentableEntryDescStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnGentableEntryDescStatsReply> {
+ @Override
+ public OFBsnGentableEntryDescStatsReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 19
+ byte type = bb.readByte();
+ if(type != (byte) 0x13)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REPLY(19), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 65535
+ short statsType = bb.readShort();
+ if(statsType != (short) 0xffff)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.EXPERIMENTER(65535), got="+statsType);
+ Set<OFStatsReplyFlags> flags = OFStatsReplyFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x2L
+ int subtype = bb.readInt();
+ if(subtype != 0x2)
+ throw new OFParseError("Wrong subtype: Expected=0x2L(0x2L), got="+subtype);
+ List<OFBsnGentableEntryDescStatsEntry> entries = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFBsnGentableEntryDescStatsEntryVer13.READER);
+
+ OFBsnGentableEntryDescStatsReplyVer13 bsnGentableEntryDescStatsReplyVer13 = new OFBsnGentableEntryDescStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnGentableEntryDescStatsReplyVer13);
+ return bsnGentableEntryDescStatsReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnGentableEntryDescStatsReplyVer13Funnel FUNNEL = new OFBsnGentableEntryDescStatsReplyVer13Funnel();
+ static class OFBsnGentableEntryDescStatsReplyVer13Funnel implements Funnel<OFBsnGentableEntryDescStatsReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnGentableEntryDescStatsReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 19
+ sink.putByte((byte) 0x13);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property statsType = 65535
+ sink.putShort((short) 0xffff);
+ OFStatsReplyFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x2L
+ sink.putInt(0x2);
+ FunnelUtils.putList(message.entries, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnGentableEntryDescStatsReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnGentableEntryDescStatsReplyVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 19
+ bb.writeByte((byte) 0x13);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 65535
+ bb.writeShort((short) 0xffff);
+ OFStatsReplyFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x2L
+ bb.writeInt(0x2);
+ ChannelUtils.writeList(bb, message.entries);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnGentableEntryDescStatsReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("entries=").append(entries);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnGentableEntryDescStatsReplyVer13 other = (OFBsnGentableEntryDescStatsReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if (entries == null) {
+ if (other.entries != null)
+ return false;
+ } else if (!entries.equals(other.entries))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * result + ((entries == null) ? 0 : entries.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableEntryDescStatsRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableEntryDescStatsRequestVer13.java
new file mode 100644
index 0000000..36d9bd7
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableEntryDescStatsRequestVer13.java
@@ -0,0 +1,560 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnGentableEntryDescStatsRequestVer13 implements OFBsnGentableEntryDescStatsRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnGentableEntryDescStatsRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 60;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsRequestFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsRequestFlags>of();
+ private final static U128 DEFAULT_CHECKSUM = U128.ZERO;
+ private final static U128 DEFAULT_CHECKSUM_MASK = U128.ZERO;
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsRequestFlags> flags;
+ private final GenTableId tableId;
+ private final U128 checksum;
+ private final U128 checksumMask;
+//
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnGentableEntryDescStatsRequestVer13(long xid, Set<OFStatsRequestFlags> flags, GenTableId tableId, U128 checksum, U128 checksumMask) {
+ this.xid = xid;
+ this.flags = flags;
+ this.tableId = tableId;
+ this.checksum = checksum;
+ this.checksumMask = checksumMask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x2L;
+ }
+
+ @Override
+ public GenTableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public U128 getChecksum() {
+ return checksum;
+ }
+
+ @Override
+ public U128 getChecksumMask() {
+ return checksumMask;
+ }
+
+
+
+ public OFBsnGentableEntryDescStatsRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnGentableEntryDescStatsRequest.Builder {
+ final OFBsnGentableEntryDescStatsRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+ private boolean tableIdSet;
+ private GenTableId tableId;
+ private boolean checksumSet;
+ private U128 checksum;
+ private boolean checksumMaskSet;
+ private U128 checksumMask;
+
+ BuilderWithParent(OFBsnGentableEntryDescStatsRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnGentableEntryDescStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnGentableEntryDescStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x2L;
+ }
+
+ @Override
+ public GenTableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFBsnGentableEntryDescStatsRequest.Builder setTableId(GenTableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+ @Override
+ public U128 getChecksum() {
+ return checksum;
+ }
+
+ @Override
+ public OFBsnGentableEntryDescStatsRequest.Builder setChecksum(U128 checksum) {
+ this.checksum = checksum;
+ this.checksumSet = true;
+ return this;
+ }
+ @Override
+ public U128 getChecksumMask() {
+ return checksumMask;
+ }
+
+ @Override
+ public OFBsnGentableEntryDescStatsRequest.Builder setChecksumMask(U128 checksumMask) {
+ this.checksumMask = checksumMask;
+ this.checksumMaskSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnGentableEntryDescStatsRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ GenTableId tableId = this.tableIdSet ? this.tableId : parentMessage.tableId;
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+ U128 checksum = this.checksumSet ? this.checksum : parentMessage.checksum;
+ if(checksum == null)
+ throw new NullPointerException("Property checksum must not be null");
+ U128 checksumMask = this.checksumMaskSet ? this.checksumMask : parentMessage.checksumMask;
+ if(checksumMask == null)
+ throw new NullPointerException("Property checksumMask must not be null");
+
+ //
+ return new OFBsnGentableEntryDescStatsRequestVer13(
+ xid,
+ flags,
+ tableId,
+ checksum,
+ checksumMask
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnGentableEntryDescStatsRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+ private boolean tableIdSet;
+ private GenTableId tableId;
+ private boolean checksumSet;
+ private U128 checksum;
+ private boolean checksumMaskSet;
+ private U128 checksumMask;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnGentableEntryDescStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnGentableEntryDescStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x2L;
+ }
+
+ @Override
+ public GenTableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFBsnGentableEntryDescStatsRequest.Builder setTableId(GenTableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+ @Override
+ public U128 getChecksum() {
+ return checksum;
+ }
+
+ @Override
+ public OFBsnGentableEntryDescStatsRequest.Builder setChecksum(U128 checksum) {
+ this.checksum = checksum;
+ this.checksumSet = true;
+ return this;
+ }
+ @Override
+ public U128 getChecksumMask() {
+ return checksumMask;
+ }
+
+ @Override
+ public OFBsnGentableEntryDescStatsRequest.Builder setChecksumMask(U128 checksumMask) {
+ this.checksumMask = checksumMask;
+ this.checksumMaskSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnGentableEntryDescStatsRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ if(!this.tableIdSet)
+ throw new IllegalStateException("Property tableId doesn't have default value -- must be set");
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+ U128 checksum = this.checksumSet ? this.checksum : DEFAULT_CHECKSUM;
+ if(checksum == null)
+ throw new NullPointerException("Property checksum must not be null");
+ U128 checksumMask = this.checksumMaskSet ? this.checksumMask : DEFAULT_CHECKSUM_MASK;
+ if(checksumMask == null)
+ throw new NullPointerException("Property checksumMask must not be null");
+
+
+ return new OFBsnGentableEntryDescStatsRequestVer13(
+ xid,
+ flags,
+ tableId,
+ checksum,
+ checksumMask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnGentableEntryDescStatsRequest> {
+ @Override
+ public OFBsnGentableEntryDescStatsRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 18
+ byte type = bb.readByte();
+ if(type != (byte) 0x12)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REQUEST(18), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 60)
+ throw new OFParseError("Wrong length: Expected=60(60), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 65535
+ short statsType = bb.readShort();
+ if(statsType != (short) 0xffff)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.EXPERIMENTER(65535), got="+statsType);
+ Set<OFStatsRequestFlags> flags = OFStatsRequestFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x2L
+ int subtype = bb.readInt();
+ if(subtype != 0x2)
+ throw new OFParseError("Wrong subtype: Expected=0x2L(0x2L), got="+subtype);
+ GenTableId tableId = GenTableId.read2Bytes(bb);
+ // pad: 2 bytes
+ bb.skipBytes(2);
+ U128 checksum = U128.read16Bytes(bb);
+ U128 checksumMask = U128.read16Bytes(bb);
+
+ OFBsnGentableEntryDescStatsRequestVer13 bsnGentableEntryDescStatsRequestVer13 = new OFBsnGentableEntryDescStatsRequestVer13(
+ xid,
+ flags,
+ tableId,
+ checksum,
+ checksumMask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnGentableEntryDescStatsRequestVer13);
+ return bsnGentableEntryDescStatsRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnGentableEntryDescStatsRequestVer13Funnel FUNNEL = new OFBsnGentableEntryDescStatsRequestVer13Funnel();
+ static class OFBsnGentableEntryDescStatsRequestVer13Funnel implements Funnel<OFBsnGentableEntryDescStatsRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnGentableEntryDescStatsRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 18
+ sink.putByte((byte) 0x12);
+ // fixed value property length = 60
+ sink.putShort((short) 0x3c);
+ sink.putLong(message.xid);
+ // fixed value property statsType = 65535
+ sink.putShort((short) 0xffff);
+ OFStatsRequestFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x2L
+ sink.putInt(0x2);
+ message.tableId.putTo(sink);
+ // skip pad (2 bytes)
+ message.checksum.putTo(sink);
+ message.checksumMask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnGentableEntryDescStatsRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnGentableEntryDescStatsRequestVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 18
+ bb.writeByte((byte) 0x12);
+ // fixed value property length = 60
+ bb.writeShort((short) 0x3c);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 65535
+ bb.writeShort((short) 0xffff);
+ OFStatsRequestFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x2L
+ bb.writeInt(0x2);
+ message.tableId.write2Bytes(bb);
+ // pad: 2 bytes
+ bb.writeZero(2);
+ message.checksum.write16Bytes(bb);
+ message.checksumMask.write16Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnGentableEntryDescStatsRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("tableId=").append(tableId);
+ b.append(", ");
+ b.append("checksum=").append(checksum);
+ b.append(", ");
+ b.append("checksumMask=").append(checksumMask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnGentableEntryDescStatsRequestVer13 other = (OFBsnGentableEntryDescStatsRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if (tableId == null) {
+ if (other.tableId != null)
+ return false;
+ } else if (!tableId.equals(other.tableId))
+ return false;
+ if (checksum == null) {
+ if (other.checksum != null)
+ return false;
+ } else if (!checksum.equals(other.checksum))
+ return false;
+ if (checksumMask == null) {
+ if (other.checksumMask != null)
+ return false;
+ } else if (!checksumMask.equals(other.checksumMask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * result + ((tableId == null) ? 0 : tableId.hashCode());
+ result = prime * result + ((checksum == null) ? 0 : checksum.hashCode());
+ result = prime * result + ((checksumMask == null) ? 0 : checksumMask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableEntryStatsEntryVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableEntryStatsEntryVer13.java
new file mode 100644
index 0000000..8d4183b
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableEntryStatsEntryVer13.java
@@ -0,0 +1,315 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnGentableEntryStatsEntryVer13 implements OFBsnGentableEntryStatsEntry {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnGentableEntryStatsEntryVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 4;
+
+ private final static List<OFBsnTlv> DEFAULT_KEY = ImmutableList.<OFBsnTlv>of();
+ private final static List<OFBsnTlv> DEFAULT_STATS = ImmutableList.<OFBsnTlv>of();
+
+ // OF message fields
+ private final List<OFBsnTlv> key;
+ private final List<OFBsnTlv> stats;
+//
+ // Immutable default instance
+ final static OFBsnGentableEntryStatsEntryVer13 DEFAULT = new OFBsnGentableEntryStatsEntryVer13(
+ DEFAULT_KEY, DEFAULT_STATS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnGentableEntryStatsEntryVer13(List<OFBsnTlv> key, List<OFBsnTlv> stats) {
+ this.key = key;
+ this.stats = stats;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public List<OFBsnTlv> getKey() {
+ return key;
+ }
+
+ @Override
+ public List<OFBsnTlv> getStats() {
+ return stats;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFBsnGentableEntryStatsEntry.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnGentableEntryStatsEntry.Builder {
+ final OFBsnGentableEntryStatsEntryVer13 parentMessage;
+
+ // OF message fields
+ private boolean keySet;
+ private List<OFBsnTlv> key;
+ private boolean statsSet;
+ private List<OFBsnTlv> stats;
+
+ BuilderWithParent(OFBsnGentableEntryStatsEntryVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public List<OFBsnTlv> getKey() {
+ return key;
+ }
+
+ @Override
+ public OFBsnGentableEntryStatsEntry.Builder setKey(List<OFBsnTlv> key) {
+ this.key = key;
+ this.keySet = true;
+ return this;
+ }
+ @Override
+ public List<OFBsnTlv> getStats() {
+ return stats;
+ }
+
+ @Override
+ public OFBsnGentableEntryStatsEntry.Builder setStats(List<OFBsnTlv> stats) {
+ this.stats = stats;
+ this.statsSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFBsnGentableEntryStatsEntry build() {
+ List<OFBsnTlv> key = this.keySet ? this.key : parentMessage.key;
+ if(key == null)
+ throw new NullPointerException("Property key must not be null");
+ List<OFBsnTlv> stats = this.statsSet ? this.stats : parentMessage.stats;
+ if(stats == null)
+ throw new NullPointerException("Property stats must not be null");
+
+ //
+ return new OFBsnGentableEntryStatsEntryVer13(
+ key,
+ stats
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnGentableEntryStatsEntry.Builder {
+ // OF message fields
+ private boolean keySet;
+ private List<OFBsnTlv> key;
+ private boolean statsSet;
+ private List<OFBsnTlv> stats;
+
+ @Override
+ public List<OFBsnTlv> getKey() {
+ return key;
+ }
+
+ @Override
+ public OFBsnGentableEntryStatsEntry.Builder setKey(List<OFBsnTlv> key) {
+ this.key = key;
+ this.keySet = true;
+ return this;
+ }
+ @Override
+ public List<OFBsnTlv> getStats() {
+ return stats;
+ }
+
+ @Override
+ public OFBsnGentableEntryStatsEntry.Builder setStats(List<OFBsnTlv> stats) {
+ this.stats = stats;
+ this.statsSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFBsnGentableEntryStatsEntry build() {
+ List<OFBsnTlv> key = this.keySet ? this.key : DEFAULT_KEY;
+ if(key == null)
+ throw new NullPointerException("Property key must not be null");
+ List<OFBsnTlv> stats = this.statsSet ? this.stats : DEFAULT_STATS;
+ if(stats == null)
+ throw new NullPointerException("Property stats must not be null");
+
+
+ return new OFBsnGentableEntryStatsEntryVer13(
+ key,
+ stats
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnGentableEntryStatsEntry> {
+ @Override
+ public OFBsnGentableEntryStatsEntry readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ int keyLength = U16.f(bb.readShort());
+ List<OFBsnTlv> key = ChannelUtils.readList(bb, keyLength, OFBsnTlvVer13.READER);
+ List<OFBsnTlv> stats = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFBsnTlvVer13.READER);
+
+ OFBsnGentableEntryStatsEntryVer13 bsnGentableEntryStatsEntryVer13 = new OFBsnGentableEntryStatsEntryVer13(
+ key,
+ stats
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnGentableEntryStatsEntryVer13);
+ return bsnGentableEntryStatsEntryVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnGentableEntryStatsEntryVer13Funnel FUNNEL = new OFBsnGentableEntryStatsEntryVer13Funnel();
+ static class OFBsnGentableEntryStatsEntryVer13Funnel implements Funnel<OFBsnGentableEntryStatsEntryVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnGentableEntryStatsEntryVer13 message, PrimitiveSink sink) {
+ // FIXME: skip funnel of length
+ // FIXME: skip funnel of keyLength
+ FunnelUtils.putList(message.key, sink);
+ FunnelUtils.putList(message.stats, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnGentableEntryStatsEntryVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnGentableEntryStatsEntryVer13 message) {
+ int startIndex = bb.writerIndex();
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ // keyLength is length indicator for key, will be
+ // udpated when key has been written
+ int keyLengthIndex = bb.writerIndex();
+ bb.writeShort(0);
+ int keyStartIndex = bb.writerIndex();
+ ChannelUtils.writeList(bb, message.key);
+ // update field length member keyLength
+ int keyLength = bb.writerIndex() - keyStartIndex;
+ bb.setShort(keyLengthIndex, keyLength);
+ ChannelUtils.writeList(bb, message.stats);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnGentableEntryStatsEntryVer13(");
+ b.append("key=").append(key);
+ b.append(", ");
+ b.append("stats=").append(stats);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnGentableEntryStatsEntryVer13 other = (OFBsnGentableEntryStatsEntryVer13) obj;
+
+ if (key == null) {
+ if (other.key != null)
+ return false;
+ } else if (!key.equals(other.key))
+ return false;
+ if (stats == null) {
+ if (other.stats != null)
+ return false;
+ } else if (!stats.equals(other.stats))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((key == null) ? 0 : key.hashCode());
+ result = prime * result + ((stats == null) ? 0 : stats.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableEntryStatsReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableEntryStatsReplyVer13.java
new file mode 100644
index 0000000..eea3a42
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableEntryStatsReplyVer13.java
@@ -0,0 +1,458 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnGentableEntryStatsReplyVer13 implements OFBsnGentableEntryStatsReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnGentableEntryStatsReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 24;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsReplyFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsReplyFlags>of();
+ private final static List<OFBsnGentableEntryStatsEntry> DEFAULT_ENTRIES = ImmutableList.<OFBsnGentableEntryStatsEntry>of();
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsReplyFlags> flags;
+ private final List<OFBsnGentableEntryStatsEntry> entries;
+//
+ // Immutable default instance
+ final static OFBsnGentableEntryStatsReplyVer13 DEFAULT = new OFBsnGentableEntryStatsReplyVer13(
+ DEFAULT_XID, DEFAULT_FLAGS, DEFAULT_ENTRIES
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnGentableEntryStatsReplyVer13(long xid, Set<OFStatsReplyFlags> flags, List<OFBsnGentableEntryStatsEntry> entries) {
+ this.xid = xid;
+ this.flags = flags;
+ this.entries = entries;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x3L;
+ }
+
+ @Override
+ public List<OFBsnGentableEntryStatsEntry> getEntries() {
+ return entries;
+ }
+
+
+
+ public OFBsnGentableEntryStatsReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnGentableEntryStatsReply.Builder {
+ final OFBsnGentableEntryStatsReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean entriesSet;
+ private List<OFBsnGentableEntryStatsEntry> entries;
+
+ BuilderWithParent(OFBsnGentableEntryStatsReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnGentableEntryStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnGentableEntryStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x3L;
+ }
+
+ @Override
+ public List<OFBsnGentableEntryStatsEntry> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFBsnGentableEntryStatsReply.Builder setEntries(List<OFBsnGentableEntryStatsEntry> entries) {
+ this.entries = entries;
+ this.entriesSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnGentableEntryStatsReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ List<OFBsnGentableEntryStatsEntry> entries = this.entriesSet ? this.entries : parentMessage.entries;
+ if(entries == null)
+ throw new NullPointerException("Property entries must not be null");
+
+ //
+ return new OFBsnGentableEntryStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnGentableEntryStatsReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean entriesSet;
+ private List<OFBsnGentableEntryStatsEntry> entries;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnGentableEntryStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnGentableEntryStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x3L;
+ }
+
+ @Override
+ public List<OFBsnGentableEntryStatsEntry> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFBsnGentableEntryStatsReply.Builder setEntries(List<OFBsnGentableEntryStatsEntry> entries) {
+ this.entries = entries;
+ this.entriesSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnGentableEntryStatsReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ List<OFBsnGentableEntryStatsEntry> entries = this.entriesSet ? this.entries : DEFAULT_ENTRIES;
+ if(entries == null)
+ throw new NullPointerException("Property entries must not be null");
+
+
+ return new OFBsnGentableEntryStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnGentableEntryStatsReply> {
+ @Override
+ public OFBsnGentableEntryStatsReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 19
+ byte type = bb.readByte();
+ if(type != (byte) 0x13)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REPLY(19), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 65535
+ short statsType = bb.readShort();
+ if(statsType != (short) 0xffff)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.EXPERIMENTER(65535), got="+statsType);
+ Set<OFStatsReplyFlags> flags = OFStatsReplyFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x3L
+ int subtype = bb.readInt();
+ if(subtype != 0x3)
+ throw new OFParseError("Wrong subtype: Expected=0x3L(0x3L), got="+subtype);
+ List<OFBsnGentableEntryStatsEntry> entries = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFBsnGentableEntryStatsEntryVer13.READER);
+
+ OFBsnGentableEntryStatsReplyVer13 bsnGentableEntryStatsReplyVer13 = new OFBsnGentableEntryStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnGentableEntryStatsReplyVer13);
+ return bsnGentableEntryStatsReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnGentableEntryStatsReplyVer13Funnel FUNNEL = new OFBsnGentableEntryStatsReplyVer13Funnel();
+ static class OFBsnGentableEntryStatsReplyVer13Funnel implements Funnel<OFBsnGentableEntryStatsReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnGentableEntryStatsReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 19
+ sink.putByte((byte) 0x13);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property statsType = 65535
+ sink.putShort((short) 0xffff);
+ OFStatsReplyFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x3L
+ sink.putInt(0x3);
+ FunnelUtils.putList(message.entries, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnGentableEntryStatsReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnGentableEntryStatsReplyVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 19
+ bb.writeByte((byte) 0x13);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 65535
+ bb.writeShort((short) 0xffff);
+ OFStatsReplyFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x3L
+ bb.writeInt(0x3);
+ ChannelUtils.writeList(bb, message.entries);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnGentableEntryStatsReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("entries=").append(entries);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnGentableEntryStatsReplyVer13 other = (OFBsnGentableEntryStatsReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if (entries == null) {
+ if (other.entries != null)
+ return false;
+ } else if (!entries.equals(other.entries))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * result + ((entries == null) ? 0 : entries.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableEntryStatsRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableEntryStatsRequestVer13.java
new file mode 100644
index 0000000..75961b0
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableEntryStatsRequestVer13.java
@@ -0,0 +1,560 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnGentableEntryStatsRequestVer13 implements OFBsnGentableEntryStatsRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnGentableEntryStatsRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 60;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsRequestFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsRequestFlags>of();
+ private final static U128 DEFAULT_CHECKSUM = U128.ZERO;
+ private final static U128 DEFAULT_CHECKSUM_MASK = U128.ZERO;
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsRequestFlags> flags;
+ private final GenTableId tableId;
+ private final U128 checksum;
+ private final U128 checksumMask;
+//
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnGentableEntryStatsRequestVer13(long xid, Set<OFStatsRequestFlags> flags, GenTableId tableId, U128 checksum, U128 checksumMask) {
+ this.xid = xid;
+ this.flags = flags;
+ this.tableId = tableId;
+ this.checksum = checksum;
+ this.checksumMask = checksumMask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x3L;
+ }
+
+ @Override
+ public GenTableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public U128 getChecksum() {
+ return checksum;
+ }
+
+ @Override
+ public U128 getChecksumMask() {
+ return checksumMask;
+ }
+
+
+
+ public OFBsnGentableEntryStatsRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnGentableEntryStatsRequest.Builder {
+ final OFBsnGentableEntryStatsRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+ private boolean tableIdSet;
+ private GenTableId tableId;
+ private boolean checksumSet;
+ private U128 checksum;
+ private boolean checksumMaskSet;
+ private U128 checksumMask;
+
+ BuilderWithParent(OFBsnGentableEntryStatsRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnGentableEntryStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnGentableEntryStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x3L;
+ }
+
+ @Override
+ public GenTableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFBsnGentableEntryStatsRequest.Builder setTableId(GenTableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+ @Override
+ public U128 getChecksum() {
+ return checksum;
+ }
+
+ @Override
+ public OFBsnGentableEntryStatsRequest.Builder setChecksum(U128 checksum) {
+ this.checksum = checksum;
+ this.checksumSet = true;
+ return this;
+ }
+ @Override
+ public U128 getChecksumMask() {
+ return checksumMask;
+ }
+
+ @Override
+ public OFBsnGentableEntryStatsRequest.Builder setChecksumMask(U128 checksumMask) {
+ this.checksumMask = checksumMask;
+ this.checksumMaskSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnGentableEntryStatsRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ GenTableId tableId = this.tableIdSet ? this.tableId : parentMessage.tableId;
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+ U128 checksum = this.checksumSet ? this.checksum : parentMessage.checksum;
+ if(checksum == null)
+ throw new NullPointerException("Property checksum must not be null");
+ U128 checksumMask = this.checksumMaskSet ? this.checksumMask : parentMessage.checksumMask;
+ if(checksumMask == null)
+ throw new NullPointerException("Property checksumMask must not be null");
+
+ //
+ return new OFBsnGentableEntryStatsRequestVer13(
+ xid,
+ flags,
+ tableId,
+ checksum,
+ checksumMask
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnGentableEntryStatsRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+ private boolean tableIdSet;
+ private GenTableId tableId;
+ private boolean checksumSet;
+ private U128 checksum;
+ private boolean checksumMaskSet;
+ private U128 checksumMask;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnGentableEntryStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnGentableEntryStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x3L;
+ }
+
+ @Override
+ public GenTableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFBsnGentableEntryStatsRequest.Builder setTableId(GenTableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+ @Override
+ public U128 getChecksum() {
+ return checksum;
+ }
+
+ @Override
+ public OFBsnGentableEntryStatsRequest.Builder setChecksum(U128 checksum) {
+ this.checksum = checksum;
+ this.checksumSet = true;
+ return this;
+ }
+ @Override
+ public U128 getChecksumMask() {
+ return checksumMask;
+ }
+
+ @Override
+ public OFBsnGentableEntryStatsRequest.Builder setChecksumMask(U128 checksumMask) {
+ this.checksumMask = checksumMask;
+ this.checksumMaskSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnGentableEntryStatsRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ if(!this.tableIdSet)
+ throw new IllegalStateException("Property tableId doesn't have default value -- must be set");
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+ U128 checksum = this.checksumSet ? this.checksum : DEFAULT_CHECKSUM;
+ if(checksum == null)
+ throw new NullPointerException("Property checksum must not be null");
+ U128 checksumMask = this.checksumMaskSet ? this.checksumMask : DEFAULT_CHECKSUM_MASK;
+ if(checksumMask == null)
+ throw new NullPointerException("Property checksumMask must not be null");
+
+
+ return new OFBsnGentableEntryStatsRequestVer13(
+ xid,
+ flags,
+ tableId,
+ checksum,
+ checksumMask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnGentableEntryStatsRequest> {
+ @Override
+ public OFBsnGentableEntryStatsRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 18
+ byte type = bb.readByte();
+ if(type != (byte) 0x12)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REQUEST(18), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 60)
+ throw new OFParseError("Wrong length: Expected=60(60), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 65535
+ short statsType = bb.readShort();
+ if(statsType != (short) 0xffff)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.EXPERIMENTER(65535), got="+statsType);
+ Set<OFStatsRequestFlags> flags = OFStatsRequestFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x3L
+ int subtype = bb.readInt();
+ if(subtype != 0x3)
+ throw new OFParseError("Wrong subtype: Expected=0x3L(0x3L), got="+subtype);
+ GenTableId tableId = GenTableId.read2Bytes(bb);
+ // pad: 2 bytes
+ bb.skipBytes(2);
+ U128 checksum = U128.read16Bytes(bb);
+ U128 checksumMask = U128.read16Bytes(bb);
+
+ OFBsnGentableEntryStatsRequestVer13 bsnGentableEntryStatsRequestVer13 = new OFBsnGentableEntryStatsRequestVer13(
+ xid,
+ flags,
+ tableId,
+ checksum,
+ checksumMask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnGentableEntryStatsRequestVer13);
+ return bsnGentableEntryStatsRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnGentableEntryStatsRequestVer13Funnel FUNNEL = new OFBsnGentableEntryStatsRequestVer13Funnel();
+ static class OFBsnGentableEntryStatsRequestVer13Funnel implements Funnel<OFBsnGentableEntryStatsRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnGentableEntryStatsRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 18
+ sink.putByte((byte) 0x12);
+ // fixed value property length = 60
+ sink.putShort((short) 0x3c);
+ sink.putLong(message.xid);
+ // fixed value property statsType = 65535
+ sink.putShort((short) 0xffff);
+ OFStatsRequestFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x3L
+ sink.putInt(0x3);
+ message.tableId.putTo(sink);
+ // skip pad (2 bytes)
+ message.checksum.putTo(sink);
+ message.checksumMask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnGentableEntryStatsRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnGentableEntryStatsRequestVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 18
+ bb.writeByte((byte) 0x12);
+ // fixed value property length = 60
+ bb.writeShort((short) 0x3c);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 65535
+ bb.writeShort((short) 0xffff);
+ OFStatsRequestFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x3L
+ bb.writeInt(0x3);
+ message.tableId.write2Bytes(bb);
+ // pad: 2 bytes
+ bb.writeZero(2);
+ message.checksum.write16Bytes(bb);
+ message.checksumMask.write16Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnGentableEntryStatsRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("tableId=").append(tableId);
+ b.append(", ");
+ b.append("checksum=").append(checksum);
+ b.append(", ");
+ b.append("checksumMask=").append(checksumMask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnGentableEntryStatsRequestVer13 other = (OFBsnGentableEntryStatsRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if (tableId == null) {
+ if (other.tableId != null)
+ return false;
+ } else if (!tableId.equals(other.tableId))
+ return false;
+ if (checksum == null) {
+ if (other.checksum != null)
+ return false;
+ } else if (!checksum.equals(other.checksum))
+ return false;
+ if (checksumMask == null) {
+ if (other.checksumMask != null)
+ return false;
+ } else if (!checksumMask.equals(other.checksumMask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * result + ((tableId == null) ? 0 : tableId.hashCode());
+ result = prime * result + ((checksum == null) ? 0 : checksum.hashCode());
+ result = prime * result + ((checksumMask == null) ? 0 : checksumMask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableSetBucketsSizeVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableSetBucketsSizeVer13.java
new file mode 100644
index 0000000..323e546
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableSetBucketsSizeVer13.java
@@ -0,0 +1,416 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import java.util.Set;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnGentableSetBucketsSizeVer13 implements OFBsnGentableSetBucketsSize {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnGentableSetBucketsSizeVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 24;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static long DEFAULT_BUCKETS_SIZE = 0x0L;
+
+ // OF message fields
+ private final long xid;
+ private final GenTableId tableId;
+ private final long bucketsSize;
+//
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnGentableSetBucketsSizeVer13(long xid, GenTableId tableId, long bucketsSize) {
+ this.xid = xid;
+ this.tableId = tableId;
+ this.bucketsSize = bucketsSize;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x32L;
+ }
+
+ @Override
+ public GenTableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public long getBucketsSize() {
+ return bucketsSize;
+ }
+
+
+
+ public OFBsnGentableSetBucketsSize.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnGentableSetBucketsSize.Builder {
+ final OFBsnGentableSetBucketsSizeVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean tableIdSet;
+ private GenTableId tableId;
+ private boolean bucketsSizeSet;
+ private long bucketsSize;
+
+ BuilderWithParent(OFBsnGentableSetBucketsSizeVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnGentableSetBucketsSize.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x32L;
+ }
+
+ @Override
+ public GenTableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFBsnGentableSetBucketsSize.Builder setTableId(GenTableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+ @Override
+ public long getBucketsSize() {
+ return bucketsSize;
+ }
+
+ @Override
+ public OFBsnGentableSetBucketsSize.Builder setBucketsSize(long bucketsSize) {
+ this.bucketsSize = bucketsSize;
+ this.bucketsSizeSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnGentableSetBucketsSize build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ GenTableId tableId = this.tableIdSet ? this.tableId : parentMessage.tableId;
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+ long bucketsSize = this.bucketsSizeSet ? this.bucketsSize : parentMessage.bucketsSize;
+
+ //
+ return new OFBsnGentableSetBucketsSizeVer13(
+ xid,
+ tableId,
+ bucketsSize
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnGentableSetBucketsSize.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean tableIdSet;
+ private GenTableId tableId;
+ private boolean bucketsSizeSet;
+ private long bucketsSize;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnGentableSetBucketsSize.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x32L;
+ }
+
+ @Override
+ public GenTableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFBsnGentableSetBucketsSize.Builder setTableId(GenTableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+ @Override
+ public long getBucketsSize() {
+ return bucketsSize;
+ }
+
+ @Override
+ public OFBsnGentableSetBucketsSize.Builder setBucketsSize(long bucketsSize) {
+ this.bucketsSize = bucketsSize;
+ this.bucketsSizeSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnGentableSetBucketsSize build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ if(!this.tableIdSet)
+ throw new IllegalStateException("Property tableId doesn't have default value -- must be set");
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+ long bucketsSize = this.bucketsSizeSet ? this.bucketsSize : DEFAULT_BUCKETS_SIZE;
+
+
+ return new OFBsnGentableSetBucketsSizeVer13(
+ xid,
+ tableId,
+ bucketsSize
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnGentableSetBucketsSize> {
+ @Override
+ public OFBsnGentableSetBucketsSize readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 4
+ byte type = bb.readByte();
+ if(type != (byte) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 24)
+ throw new OFParseError("Wrong length: Expected=24(24), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x32L
+ int subtype = bb.readInt();
+ if(subtype != 0x32)
+ throw new OFParseError("Wrong subtype: Expected=0x32L(0x32L), got="+subtype);
+ GenTableId tableId = GenTableId.read2Bytes(bb);
+ // pad: 2 bytes
+ bb.skipBytes(2);
+ long bucketsSize = U32.f(bb.readInt());
+
+ OFBsnGentableSetBucketsSizeVer13 bsnGentableSetBucketsSizeVer13 = new OFBsnGentableSetBucketsSizeVer13(
+ xid,
+ tableId,
+ bucketsSize
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnGentableSetBucketsSizeVer13);
+ return bsnGentableSetBucketsSizeVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnGentableSetBucketsSizeVer13Funnel FUNNEL = new OFBsnGentableSetBucketsSizeVer13Funnel();
+ static class OFBsnGentableSetBucketsSizeVer13Funnel implements Funnel<OFBsnGentableSetBucketsSizeVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnGentableSetBucketsSizeVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property length = 24
+ sink.putShort((short) 0x18);
+ sink.putLong(message.xid);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x32L
+ sink.putInt(0x32);
+ message.tableId.putTo(sink);
+ // skip pad (2 bytes)
+ sink.putLong(message.bucketsSize);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnGentableSetBucketsSizeVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnGentableSetBucketsSizeVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property length = 24
+ bb.writeShort((short) 0x18);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x32L
+ bb.writeInt(0x32);
+ message.tableId.write2Bytes(bb);
+ // pad: 2 bytes
+ bb.writeZero(2);
+ bb.writeInt(U32.t(message.bucketsSize));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnGentableSetBucketsSizeVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("tableId=").append(tableId);
+ b.append(", ");
+ b.append("bucketsSize=").append(bucketsSize);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnGentableSetBucketsSizeVer13 other = (OFBsnGentableSetBucketsSizeVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (tableId == null) {
+ if (other.tableId != null)
+ return false;
+ } else if (!tableId.equals(other.tableId))
+ return false;
+ if( bucketsSize != other.bucketsSize)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((tableId == null) ? 0 : tableId.hashCode());
+ result = prime * (int) (bucketsSize ^ (bucketsSize >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableStatsEntryVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableStatsEntryVer13.java
new file mode 100644
index 0000000..8175fa5
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableStatsEntryVer13.java
@@ -0,0 +1,331 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnGentableStatsEntryVer13 implements OFBsnGentableStatsEntry {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnGentableStatsEntryVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 24;
+
+ private final static long DEFAULT_ENTRY_COUNT = 0x0L;
+ private final static U128 DEFAULT_CHECKSUM = U128.ZERO;
+
+ // OF message fields
+ private final GenTableId tableId;
+ private final long entryCount;
+ private final U128 checksum;
+//
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnGentableStatsEntryVer13(GenTableId tableId, long entryCount, U128 checksum) {
+ this.tableId = tableId;
+ this.entryCount = entryCount;
+ this.checksum = checksum;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public GenTableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public long getEntryCount() {
+ return entryCount;
+ }
+
+ @Override
+ public U128 getChecksum() {
+ return checksum;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFBsnGentableStatsEntry.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnGentableStatsEntry.Builder {
+ final OFBsnGentableStatsEntryVer13 parentMessage;
+
+ // OF message fields
+ private boolean tableIdSet;
+ private GenTableId tableId;
+ private boolean entryCountSet;
+ private long entryCount;
+ private boolean checksumSet;
+ private U128 checksum;
+
+ BuilderWithParent(OFBsnGentableStatsEntryVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public GenTableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFBsnGentableStatsEntry.Builder setTableId(GenTableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+ @Override
+ public long getEntryCount() {
+ return entryCount;
+ }
+
+ @Override
+ public OFBsnGentableStatsEntry.Builder setEntryCount(long entryCount) {
+ this.entryCount = entryCount;
+ this.entryCountSet = true;
+ return this;
+ }
+ @Override
+ public U128 getChecksum() {
+ return checksum;
+ }
+
+ @Override
+ public OFBsnGentableStatsEntry.Builder setChecksum(U128 checksum) {
+ this.checksum = checksum;
+ this.checksumSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFBsnGentableStatsEntry build() {
+ GenTableId tableId = this.tableIdSet ? this.tableId : parentMessage.tableId;
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+ long entryCount = this.entryCountSet ? this.entryCount : parentMessage.entryCount;
+ U128 checksum = this.checksumSet ? this.checksum : parentMessage.checksum;
+ if(checksum == null)
+ throw new NullPointerException("Property checksum must not be null");
+
+ //
+ return new OFBsnGentableStatsEntryVer13(
+ tableId,
+ entryCount,
+ checksum
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnGentableStatsEntry.Builder {
+ // OF message fields
+ private boolean tableIdSet;
+ private GenTableId tableId;
+ private boolean entryCountSet;
+ private long entryCount;
+ private boolean checksumSet;
+ private U128 checksum;
+
+ @Override
+ public GenTableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFBsnGentableStatsEntry.Builder setTableId(GenTableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+ @Override
+ public long getEntryCount() {
+ return entryCount;
+ }
+
+ @Override
+ public OFBsnGentableStatsEntry.Builder setEntryCount(long entryCount) {
+ this.entryCount = entryCount;
+ this.entryCountSet = true;
+ return this;
+ }
+ @Override
+ public U128 getChecksum() {
+ return checksum;
+ }
+
+ @Override
+ public OFBsnGentableStatsEntry.Builder setChecksum(U128 checksum) {
+ this.checksum = checksum;
+ this.checksumSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFBsnGentableStatsEntry build() {
+ if(!this.tableIdSet)
+ throw new IllegalStateException("Property tableId doesn't have default value -- must be set");
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+ long entryCount = this.entryCountSet ? this.entryCount : DEFAULT_ENTRY_COUNT;
+ U128 checksum = this.checksumSet ? this.checksum : DEFAULT_CHECKSUM;
+ if(checksum == null)
+ throw new NullPointerException("Property checksum must not be null");
+
+
+ return new OFBsnGentableStatsEntryVer13(
+ tableId,
+ entryCount,
+ checksum
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnGentableStatsEntry> {
+ @Override
+ public OFBsnGentableStatsEntry readFrom(ChannelBuffer bb) throws OFParseError {
+ GenTableId tableId = GenTableId.read2Bytes(bb);
+ // pad: 2 bytes
+ bb.skipBytes(2);
+ long entryCount = U32.f(bb.readInt());
+ U128 checksum = U128.read16Bytes(bb);
+
+ OFBsnGentableStatsEntryVer13 bsnGentableStatsEntryVer13 = new OFBsnGentableStatsEntryVer13(
+ tableId,
+ entryCount,
+ checksum
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnGentableStatsEntryVer13);
+ return bsnGentableStatsEntryVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnGentableStatsEntryVer13Funnel FUNNEL = new OFBsnGentableStatsEntryVer13Funnel();
+ static class OFBsnGentableStatsEntryVer13Funnel implements Funnel<OFBsnGentableStatsEntryVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnGentableStatsEntryVer13 message, PrimitiveSink sink) {
+ message.tableId.putTo(sink);
+ // skip pad (2 bytes)
+ sink.putLong(message.entryCount);
+ message.checksum.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnGentableStatsEntryVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnGentableStatsEntryVer13 message) {
+ message.tableId.write2Bytes(bb);
+ // pad: 2 bytes
+ bb.writeZero(2);
+ bb.writeInt(U32.t(message.entryCount));
+ message.checksum.write16Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnGentableStatsEntryVer13(");
+ b.append("tableId=").append(tableId);
+ b.append(", ");
+ b.append("entryCount=").append(entryCount);
+ b.append(", ");
+ b.append("checksum=").append(checksum);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnGentableStatsEntryVer13 other = (OFBsnGentableStatsEntryVer13) obj;
+
+ if (tableId == null) {
+ if (other.tableId != null)
+ return false;
+ } else if (!tableId.equals(other.tableId))
+ return false;
+ if( entryCount != other.entryCount)
+ return false;
+ if (checksum == null) {
+ if (other.checksum != null)
+ return false;
+ } else if (!checksum.equals(other.checksum))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((tableId == null) ? 0 : tableId.hashCode());
+ result = prime * (int) (entryCount ^ (entryCount >>> 32));
+ result = prime * result + ((checksum == null) ? 0 : checksum.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableStatsReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableStatsReplyVer13.java
new file mode 100644
index 0000000..1b47fbf
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableStatsReplyVer13.java
@@ -0,0 +1,458 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnGentableStatsReplyVer13 implements OFBsnGentableStatsReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnGentableStatsReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 24;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsReplyFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsReplyFlags>of();
+ private final static List<OFBsnGentableStatsEntry> DEFAULT_ENTRIES = ImmutableList.<OFBsnGentableStatsEntry>of();
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsReplyFlags> flags;
+ private final List<OFBsnGentableStatsEntry> entries;
+//
+ // Immutable default instance
+ final static OFBsnGentableStatsReplyVer13 DEFAULT = new OFBsnGentableStatsReplyVer13(
+ DEFAULT_XID, DEFAULT_FLAGS, DEFAULT_ENTRIES
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnGentableStatsReplyVer13(long xid, Set<OFStatsReplyFlags> flags, List<OFBsnGentableStatsEntry> entries) {
+ this.xid = xid;
+ this.flags = flags;
+ this.entries = entries;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x7L;
+ }
+
+ @Override
+ public List<OFBsnGentableStatsEntry> getEntries() {
+ return entries;
+ }
+
+
+
+ public OFBsnGentableStatsReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnGentableStatsReply.Builder {
+ final OFBsnGentableStatsReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean entriesSet;
+ private List<OFBsnGentableStatsEntry> entries;
+
+ BuilderWithParent(OFBsnGentableStatsReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnGentableStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnGentableStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x7L;
+ }
+
+ @Override
+ public List<OFBsnGentableStatsEntry> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFBsnGentableStatsReply.Builder setEntries(List<OFBsnGentableStatsEntry> entries) {
+ this.entries = entries;
+ this.entriesSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnGentableStatsReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ List<OFBsnGentableStatsEntry> entries = this.entriesSet ? this.entries : parentMessage.entries;
+ if(entries == null)
+ throw new NullPointerException("Property entries must not be null");
+
+ //
+ return new OFBsnGentableStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnGentableStatsReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean entriesSet;
+ private List<OFBsnGentableStatsEntry> entries;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnGentableStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnGentableStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x7L;
+ }
+
+ @Override
+ public List<OFBsnGentableStatsEntry> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFBsnGentableStatsReply.Builder setEntries(List<OFBsnGentableStatsEntry> entries) {
+ this.entries = entries;
+ this.entriesSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnGentableStatsReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ List<OFBsnGentableStatsEntry> entries = this.entriesSet ? this.entries : DEFAULT_ENTRIES;
+ if(entries == null)
+ throw new NullPointerException("Property entries must not be null");
+
+
+ return new OFBsnGentableStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnGentableStatsReply> {
+ @Override
+ public OFBsnGentableStatsReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 19
+ byte type = bb.readByte();
+ if(type != (byte) 0x13)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REPLY(19), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 65535
+ short statsType = bb.readShort();
+ if(statsType != (short) 0xffff)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.EXPERIMENTER(65535), got="+statsType);
+ Set<OFStatsReplyFlags> flags = OFStatsReplyFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x7L
+ int subtype = bb.readInt();
+ if(subtype != 0x7)
+ throw new OFParseError("Wrong subtype: Expected=0x7L(0x7L), got="+subtype);
+ List<OFBsnGentableStatsEntry> entries = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFBsnGentableStatsEntryVer13.READER);
+
+ OFBsnGentableStatsReplyVer13 bsnGentableStatsReplyVer13 = new OFBsnGentableStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnGentableStatsReplyVer13);
+ return bsnGentableStatsReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnGentableStatsReplyVer13Funnel FUNNEL = new OFBsnGentableStatsReplyVer13Funnel();
+ static class OFBsnGentableStatsReplyVer13Funnel implements Funnel<OFBsnGentableStatsReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnGentableStatsReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 19
+ sink.putByte((byte) 0x13);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property statsType = 65535
+ sink.putShort((short) 0xffff);
+ OFStatsReplyFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x7L
+ sink.putInt(0x7);
+ FunnelUtils.putList(message.entries, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnGentableStatsReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnGentableStatsReplyVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 19
+ bb.writeByte((byte) 0x13);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 65535
+ bb.writeShort((short) 0xffff);
+ OFStatsReplyFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x7L
+ bb.writeInt(0x7);
+ ChannelUtils.writeList(bb, message.entries);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnGentableStatsReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("entries=").append(entries);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnGentableStatsReplyVer13 other = (OFBsnGentableStatsReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if (entries == null) {
+ if (other.entries != null)
+ return false;
+ } else if (!entries.equals(other.entries))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * result + ((entries == null) ? 0 : entries.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableStatsRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableStatsRequestVer13.java
new file mode 100644
index 0000000..fe5fbd8
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableStatsRequestVer13.java
@@ -0,0 +1,397 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnGentableStatsRequestVer13 implements OFBsnGentableStatsRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnGentableStatsRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 24;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsRequestFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsRequestFlags>of();
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsRequestFlags> flags;
+//
+ // Immutable default instance
+ final static OFBsnGentableStatsRequestVer13 DEFAULT = new OFBsnGentableStatsRequestVer13(
+ DEFAULT_XID, DEFAULT_FLAGS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnGentableStatsRequestVer13(long xid, Set<OFStatsRequestFlags> flags) {
+ this.xid = xid;
+ this.flags = flags;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x7L;
+ }
+
+
+
+ public OFBsnGentableStatsRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnGentableStatsRequest.Builder {
+ final OFBsnGentableStatsRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+
+ BuilderWithParent(OFBsnGentableStatsRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnGentableStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnGentableStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x7L;
+ }
+
+
+
+ @Override
+ public OFBsnGentableStatsRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+
+ //
+ return new OFBsnGentableStatsRequestVer13(
+ xid,
+ flags
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnGentableStatsRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnGentableStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnGentableStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x7L;
+ }
+
+//
+ @Override
+ public OFBsnGentableStatsRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+
+
+ return new OFBsnGentableStatsRequestVer13(
+ xid,
+ flags
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnGentableStatsRequest> {
+ @Override
+ public OFBsnGentableStatsRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 18
+ byte type = bb.readByte();
+ if(type != (byte) 0x12)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REQUEST(18), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 24)
+ throw new OFParseError("Wrong length: Expected=24(24), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 65535
+ short statsType = bb.readShort();
+ if(statsType != (short) 0xffff)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.EXPERIMENTER(65535), got="+statsType);
+ Set<OFStatsRequestFlags> flags = OFStatsRequestFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x7L
+ int subtype = bb.readInt();
+ if(subtype != 0x7)
+ throw new OFParseError("Wrong subtype: Expected=0x7L(0x7L), got="+subtype);
+
+ OFBsnGentableStatsRequestVer13 bsnGentableStatsRequestVer13 = new OFBsnGentableStatsRequestVer13(
+ xid,
+ flags
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnGentableStatsRequestVer13);
+ return bsnGentableStatsRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnGentableStatsRequestVer13Funnel FUNNEL = new OFBsnGentableStatsRequestVer13Funnel();
+ static class OFBsnGentableStatsRequestVer13Funnel implements Funnel<OFBsnGentableStatsRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnGentableStatsRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 18
+ sink.putByte((byte) 0x12);
+ // fixed value property length = 24
+ sink.putShort((short) 0x18);
+ sink.putLong(message.xid);
+ // fixed value property statsType = 65535
+ sink.putShort((short) 0xffff);
+ OFStatsRequestFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x7L
+ sink.putInt(0x7);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnGentableStatsRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnGentableStatsRequestVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 18
+ bb.writeByte((byte) 0x12);
+ // fixed value property length = 24
+ bb.writeShort((short) 0x18);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 65535
+ bb.writeShort((short) 0xffff);
+ OFStatsRequestFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x7L
+ bb.writeInt(0x7);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnGentableStatsRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnGentableStatsRequestVer13 other = (OFBsnGentableStatsRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGetInterfacesReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGetInterfacesReplyVer13.java
new file mode 100644
index 0000000..a95ab3a
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGetInterfacesReplyVer13.java
@@ -0,0 +1,375 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnGetInterfacesReplyVer13 implements OFBsnGetInterfacesReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnGetInterfacesReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 16;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static List<OFBsnInterface> DEFAULT_INTERFACES = ImmutableList.<OFBsnInterface>of();
+
+ // OF message fields
+ private final long xid;
+ private final List<OFBsnInterface> interfaces;
+//
+ // Immutable default instance
+ final static OFBsnGetInterfacesReplyVer13 DEFAULT = new OFBsnGetInterfacesReplyVer13(
+ DEFAULT_XID, DEFAULT_INTERFACES
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnGetInterfacesReplyVer13(long xid, List<OFBsnInterface> interfaces) {
+ this.xid = xid;
+ this.interfaces = interfaces;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0xaL;
+ }
+
+ @Override
+ public List<OFBsnInterface> getInterfaces() {
+ return interfaces;
+ }
+
+
+
+ public OFBsnGetInterfacesReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnGetInterfacesReply.Builder {
+ final OFBsnGetInterfacesReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean interfacesSet;
+ private List<OFBsnInterface> interfaces;
+
+ BuilderWithParent(OFBsnGetInterfacesReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnGetInterfacesReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0xaL;
+ }
+
+ @Override
+ public List<OFBsnInterface> getInterfaces() {
+ return interfaces;
+ }
+
+ @Override
+ public OFBsnGetInterfacesReply.Builder setInterfaces(List<OFBsnInterface> interfaces) {
+ this.interfaces = interfaces;
+ this.interfacesSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnGetInterfacesReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ List<OFBsnInterface> interfaces = this.interfacesSet ? this.interfaces : parentMessage.interfaces;
+ if(interfaces == null)
+ throw new NullPointerException("Property interfaces must not be null");
+
+ //
+ return new OFBsnGetInterfacesReplyVer13(
+ xid,
+ interfaces
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnGetInterfacesReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean interfacesSet;
+ private List<OFBsnInterface> interfaces;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnGetInterfacesReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0xaL;
+ }
+
+ @Override
+ public List<OFBsnInterface> getInterfaces() {
+ return interfaces;
+ }
+
+ @Override
+ public OFBsnGetInterfacesReply.Builder setInterfaces(List<OFBsnInterface> interfaces) {
+ this.interfaces = interfaces;
+ this.interfacesSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnGetInterfacesReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ List<OFBsnInterface> interfaces = this.interfacesSet ? this.interfaces : DEFAULT_INTERFACES;
+ if(interfaces == null)
+ throw new NullPointerException("Property interfaces must not be null");
+
+
+ return new OFBsnGetInterfacesReplyVer13(
+ xid,
+ interfaces
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnGetInterfacesReply> {
+ @Override
+ public OFBsnGetInterfacesReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 4
+ byte type = bb.readByte();
+ if(type != (byte) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0xaL
+ int subtype = bb.readInt();
+ if(subtype != 0xa)
+ throw new OFParseError("Wrong subtype: Expected=0xaL(0xaL), got="+subtype);
+ List<OFBsnInterface> interfaces = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFBsnInterfaceVer13.READER);
+
+ OFBsnGetInterfacesReplyVer13 bsnGetInterfacesReplyVer13 = new OFBsnGetInterfacesReplyVer13(
+ xid,
+ interfaces
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnGetInterfacesReplyVer13);
+ return bsnGetInterfacesReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnGetInterfacesReplyVer13Funnel FUNNEL = new OFBsnGetInterfacesReplyVer13Funnel();
+ static class OFBsnGetInterfacesReplyVer13Funnel implements Funnel<OFBsnGetInterfacesReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnGetInterfacesReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 4
+ sink.putByte((byte) 0x4);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0xaL
+ sink.putInt(0xa);
+ FunnelUtils.putList(message.interfaces, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnGetInterfacesReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnGetInterfacesReplyVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 4
+ bb.writeByte((byte) 0x4);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0xaL
+ bb.writeInt(0xa);
+ ChannelUtils.writeList(bb, message.interfaces);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnGetInterfacesReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("interfaces=").append(interfaces);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnGetInterfacesReplyVer13 other = (OFBsnGetInterfacesReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (interfaces == null) {
+ if (other.interfaces != null)
+ return false;
+ } else if (!interfaces.equals(other.interfaces))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((interfaces == null) ? 0 : interfaces.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGetInterfacesRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGetInterfacesRequestVer13.java
new file mode 100644
index 0000000..23ed3fd
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGetInterfacesRequestVer13.java
@@ -0,0 +1,314 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnGetInterfacesRequestVer13 implements OFBsnGetInterfacesRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnGetInterfacesRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 16;
+
+ private final static long DEFAULT_XID = 0x0L;
+
+ // OF message fields
+ private final long xid;
+//
+ // Immutable default instance
+ final static OFBsnGetInterfacesRequestVer13 DEFAULT = new OFBsnGetInterfacesRequestVer13(
+ DEFAULT_XID
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnGetInterfacesRequestVer13(long xid) {
+ this.xid = xid;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x9L;
+ }
+
+
+
+ public OFBsnGetInterfacesRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnGetInterfacesRequest.Builder {
+ final OFBsnGetInterfacesRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+
+ BuilderWithParent(OFBsnGetInterfacesRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnGetInterfacesRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x9L;
+ }
+
+
+
+ @Override
+ public OFBsnGetInterfacesRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+
+ //
+ return new OFBsnGetInterfacesRequestVer13(
+ xid
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnGetInterfacesRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnGetInterfacesRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x9L;
+ }
+
+//
+ @Override
+ public OFBsnGetInterfacesRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+
+
+ return new OFBsnGetInterfacesRequestVer13(
+ xid
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnGetInterfacesRequest> {
+ @Override
+ public OFBsnGetInterfacesRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 4
+ byte type = bb.readByte();
+ if(type != (byte) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 16)
+ throw new OFParseError("Wrong length: Expected=16(16), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x9L
+ int subtype = bb.readInt();
+ if(subtype != 0x9)
+ throw new OFParseError("Wrong subtype: Expected=0x9L(0x9L), got="+subtype);
+
+ OFBsnGetInterfacesRequestVer13 bsnGetInterfacesRequestVer13 = new OFBsnGetInterfacesRequestVer13(
+ xid
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnGetInterfacesRequestVer13);
+ return bsnGetInterfacesRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnGetInterfacesRequestVer13Funnel FUNNEL = new OFBsnGetInterfacesRequestVer13Funnel();
+ static class OFBsnGetInterfacesRequestVer13Funnel implements Funnel<OFBsnGetInterfacesRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnGetInterfacesRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property length = 16
+ sink.putShort((short) 0x10);
+ sink.putLong(message.xid);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x9L
+ sink.putInt(0x9);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnGetInterfacesRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnGetInterfacesRequestVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property length = 16
+ bb.writeShort((short) 0x10);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x9L
+ bb.writeInt(0x9);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnGetInterfacesRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnGetInterfacesRequestVer13 other = (OFBsnGetInterfacesRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGetMirroringReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGetMirroringReplyVer13.java
new file mode 100644
index 0000000..5ee53c7
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGetMirroringReplyVer13.java
@@ -0,0 +1,366 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnGetMirroringReplyVer13 implements OFBsnGetMirroringReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnGetMirroringReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 20;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static short DEFAULT_REPORT_MIRROR_PORTS = (short) 0x0;
+
+ // OF message fields
+ private final long xid;
+ private final short reportMirrorPorts;
+//
+ // Immutable default instance
+ final static OFBsnGetMirroringReplyVer13 DEFAULT = new OFBsnGetMirroringReplyVer13(
+ DEFAULT_XID, DEFAULT_REPORT_MIRROR_PORTS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnGetMirroringReplyVer13(long xid, short reportMirrorPorts) {
+ this.xid = xid;
+ this.reportMirrorPorts = reportMirrorPorts;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x5L;
+ }
+
+ @Override
+ public short getReportMirrorPorts() {
+ return reportMirrorPorts;
+ }
+
+
+
+ public OFBsnGetMirroringReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnGetMirroringReply.Builder {
+ final OFBsnGetMirroringReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean reportMirrorPortsSet;
+ private short reportMirrorPorts;
+
+ BuilderWithParent(OFBsnGetMirroringReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnGetMirroringReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x5L;
+ }
+
+ @Override
+ public short getReportMirrorPorts() {
+ return reportMirrorPorts;
+ }
+
+ @Override
+ public OFBsnGetMirroringReply.Builder setReportMirrorPorts(short reportMirrorPorts) {
+ this.reportMirrorPorts = reportMirrorPorts;
+ this.reportMirrorPortsSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnGetMirroringReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ short reportMirrorPorts = this.reportMirrorPortsSet ? this.reportMirrorPorts : parentMessage.reportMirrorPorts;
+
+ //
+ return new OFBsnGetMirroringReplyVer13(
+ xid,
+ reportMirrorPorts
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnGetMirroringReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean reportMirrorPortsSet;
+ private short reportMirrorPorts;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnGetMirroringReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x5L;
+ }
+
+ @Override
+ public short getReportMirrorPorts() {
+ return reportMirrorPorts;
+ }
+
+ @Override
+ public OFBsnGetMirroringReply.Builder setReportMirrorPorts(short reportMirrorPorts) {
+ this.reportMirrorPorts = reportMirrorPorts;
+ this.reportMirrorPortsSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnGetMirroringReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ short reportMirrorPorts = this.reportMirrorPortsSet ? this.reportMirrorPorts : DEFAULT_REPORT_MIRROR_PORTS;
+
+
+ return new OFBsnGetMirroringReplyVer13(
+ xid,
+ reportMirrorPorts
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnGetMirroringReply> {
+ @Override
+ public OFBsnGetMirroringReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 4
+ byte type = bb.readByte();
+ if(type != (byte) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 20)
+ throw new OFParseError("Wrong length: Expected=20(20), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x5L
+ int subtype = bb.readInt();
+ if(subtype != 0x5)
+ throw new OFParseError("Wrong subtype: Expected=0x5L(0x5L), got="+subtype);
+ short reportMirrorPorts = U8.f(bb.readByte());
+ // pad: 3 bytes
+ bb.skipBytes(3);
+
+ OFBsnGetMirroringReplyVer13 bsnGetMirroringReplyVer13 = new OFBsnGetMirroringReplyVer13(
+ xid,
+ reportMirrorPorts
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnGetMirroringReplyVer13);
+ return bsnGetMirroringReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnGetMirroringReplyVer13Funnel FUNNEL = new OFBsnGetMirroringReplyVer13Funnel();
+ static class OFBsnGetMirroringReplyVer13Funnel implements Funnel<OFBsnGetMirroringReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnGetMirroringReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property length = 20
+ sink.putShort((short) 0x14);
+ sink.putLong(message.xid);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x5L
+ sink.putInt(0x5);
+ sink.putShort(message.reportMirrorPorts);
+ // skip pad (3 bytes)
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnGetMirroringReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnGetMirroringReplyVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property length = 20
+ bb.writeShort((short) 0x14);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x5L
+ bb.writeInt(0x5);
+ bb.writeByte(U8.t(message.reportMirrorPorts));
+ // pad: 3 bytes
+ bb.writeZero(3);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnGetMirroringReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("reportMirrorPorts=").append(reportMirrorPorts);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnGetMirroringReplyVer13 other = (OFBsnGetMirroringReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if( reportMirrorPorts != other.reportMirrorPorts)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + reportMirrorPorts;
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGetMirroringRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGetMirroringRequestVer13.java
new file mode 100644
index 0000000..c7602c6
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGetMirroringRequestVer13.java
@@ -0,0 +1,366 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnGetMirroringRequestVer13 implements OFBsnGetMirroringRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnGetMirroringRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 20;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static short DEFAULT_REPORT_MIRROR_PORTS = (short) 0x0;
+
+ // OF message fields
+ private final long xid;
+ private final short reportMirrorPorts;
+//
+ // Immutable default instance
+ final static OFBsnGetMirroringRequestVer13 DEFAULT = new OFBsnGetMirroringRequestVer13(
+ DEFAULT_XID, DEFAULT_REPORT_MIRROR_PORTS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnGetMirroringRequestVer13(long xid, short reportMirrorPorts) {
+ this.xid = xid;
+ this.reportMirrorPorts = reportMirrorPorts;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x4L;
+ }
+
+ @Override
+ public short getReportMirrorPorts() {
+ return reportMirrorPorts;
+ }
+
+
+
+ public OFBsnGetMirroringRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnGetMirroringRequest.Builder {
+ final OFBsnGetMirroringRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean reportMirrorPortsSet;
+ private short reportMirrorPorts;
+
+ BuilderWithParent(OFBsnGetMirroringRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnGetMirroringRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x4L;
+ }
+
+ @Override
+ public short getReportMirrorPorts() {
+ return reportMirrorPorts;
+ }
+
+ @Override
+ public OFBsnGetMirroringRequest.Builder setReportMirrorPorts(short reportMirrorPorts) {
+ this.reportMirrorPorts = reportMirrorPorts;
+ this.reportMirrorPortsSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnGetMirroringRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ short reportMirrorPorts = this.reportMirrorPortsSet ? this.reportMirrorPorts : parentMessage.reportMirrorPorts;
+
+ //
+ return new OFBsnGetMirroringRequestVer13(
+ xid,
+ reportMirrorPorts
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnGetMirroringRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean reportMirrorPortsSet;
+ private short reportMirrorPorts;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnGetMirroringRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x4L;
+ }
+
+ @Override
+ public short getReportMirrorPorts() {
+ return reportMirrorPorts;
+ }
+
+ @Override
+ public OFBsnGetMirroringRequest.Builder setReportMirrorPorts(short reportMirrorPorts) {
+ this.reportMirrorPorts = reportMirrorPorts;
+ this.reportMirrorPortsSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnGetMirroringRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ short reportMirrorPorts = this.reportMirrorPortsSet ? this.reportMirrorPorts : DEFAULT_REPORT_MIRROR_PORTS;
+
+
+ return new OFBsnGetMirroringRequestVer13(
+ xid,
+ reportMirrorPorts
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnGetMirroringRequest> {
+ @Override
+ public OFBsnGetMirroringRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 4
+ byte type = bb.readByte();
+ if(type != (byte) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 20)
+ throw new OFParseError("Wrong length: Expected=20(20), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x4L
+ int subtype = bb.readInt();
+ if(subtype != 0x4)
+ throw new OFParseError("Wrong subtype: Expected=0x4L(0x4L), got="+subtype);
+ short reportMirrorPorts = U8.f(bb.readByte());
+ // pad: 3 bytes
+ bb.skipBytes(3);
+
+ OFBsnGetMirroringRequestVer13 bsnGetMirroringRequestVer13 = new OFBsnGetMirroringRequestVer13(
+ xid,
+ reportMirrorPorts
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnGetMirroringRequestVer13);
+ return bsnGetMirroringRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnGetMirroringRequestVer13Funnel FUNNEL = new OFBsnGetMirroringRequestVer13Funnel();
+ static class OFBsnGetMirroringRequestVer13Funnel implements Funnel<OFBsnGetMirroringRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnGetMirroringRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property length = 20
+ sink.putShort((short) 0x14);
+ sink.putLong(message.xid);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x4L
+ sink.putInt(0x4);
+ sink.putShort(message.reportMirrorPorts);
+ // skip pad (3 bytes)
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnGetMirroringRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnGetMirroringRequestVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property length = 20
+ bb.writeShort((short) 0x14);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x4L
+ bb.writeInt(0x4);
+ bb.writeByte(U8.t(message.reportMirrorPorts));
+ // pad: 3 bytes
+ bb.writeZero(3);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnGetMirroringRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("reportMirrorPorts=").append(reportMirrorPorts);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnGetMirroringRequestVer13 other = (OFBsnGetMirroringRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if( reportMirrorPorts != other.reportMirrorPorts)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + reportMirrorPorts;
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGetSwitchPipelineReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGetSwitchPipelineReplyVer13.java
new file mode 100644
index 0000000..f5cf745
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGetSwitchPipelineReplyVer13.java
@@ -0,0 +1,368 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnGetSwitchPipelineReplyVer13 implements OFBsnGetSwitchPipelineReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnGetSwitchPipelineReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 272;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static String DEFAULT_PIPELINE = "";
+
+ // OF message fields
+ private final long xid;
+ private final String pipeline;
+//
+ // Immutable default instance
+ final static OFBsnGetSwitchPipelineReplyVer13 DEFAULT = new OFBsnGetSwitchPipelineReplyVer13(
+ DEFAULT_XID, DEFAULT_PIPELINE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnGetSwitchPipelineReplyVer13(long xid, String pipeline) {
+ this.xid = xid;
+ this.pipeline = pipeline;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x34L;
+ }
+
+ @Override
+ public String getPipeline() {
+ return pipeline;
+ }
+
+
+
+ public OFBsnGetSwitchPipelineReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnGetSwitchPipelineReply.Builder {
+ final OFBsnGetSwitchPipelineReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean pipelineSet;
+ private String pipeline;
+
+ BuilderWithParent(OFBsnGetSwitchPipelineReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnGetSwitchPipelineReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x34L;
+ }
+
+ @Override
+ public String getPipeline() {
+ return pipeline;
+ }
+
+ @Override
+ public OFBsnGetSwitchPipelineReply.Builder setPipeline(String pipeline) {
+ this.pipeline = pipeline;
+ this.pipelineSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnGetSwitchPipelineReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ String pipeline = this.pipelineSet ? this.pipeline : parentMessage.pipeline;
+ if(pipeline == null)
+ throw new NullPointerException("Property pipeline must not be null");
+
+ //
+ return new OFBsnGetSwitchPipelineReplyVer13(
+ xid,
+ pipeline
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnGetSwitchPipelineReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean pipelineSet;
+ private String pipeline;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnGetSwitchPipelineReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x34L;
+ }
+
+ @Override
+ public String getPipeline() {
+ return pipeline;
+ }
+
+ @Override
+ public OFBsnGetSwitchPipelineReply.Builder setPipeline(String pipeline) {
+ this.pipeline = pipeline;
+ this.pipelineSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnGetSwitchPipelineReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ String pipeline = this.pipelineSet ? this.pipeline : DEFAULT_PIPELINE;
+ if(pipeline == null)
+ throw new NullPointerException("Property pipeline must not be null");
+
+
+ return new OFBsnGetSwitchPipelineReplyVer13(
+ xid,
+ pipeline
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnGetSwitchPipelineReply> {
+ @Override
+ public OFBsnGetSwitchPipelineReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 4
+ byte type = bb.readByte();
+ if(type != (byte) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 272)
+ throw new OFParseError("Wrong length: Expected=272(272), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x34L
+ int subtype = bb.readInt();
+ if(subtype != 0x34)
+ throw new OFParseError("Wrong subtype: Expected=0x34L(0x34L), got="+subtype);
+ String pipeline = ChannelUtils.readFixedLengthString(bb, 256);
+
+ OFBsnGetSwitchPipelineReplyVer13 bsnGetSwitchPipelineReplyVer13 = new OFBsnGetSwitchPipelineReplyVer13(
+ xid,
+ pipeline
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnGetSwitchPipelineReplyVer13);
+ return bsnGetSwitchPipelineReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnGetSwitchPipelineReplyVer13Funnel FUNNEL = new OFBsnGetSwitchPipelineReplyVer13Funnel();
+ static class OFBsnGetSwitchPipelineReplyVer13Funnel implements Funnel<OFBsnGetSwitchPipelineReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnGetSwitchPipelineReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property length = 272
+ sink.putShort((short) 0x110);
+ sink.putLong(message.xid);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x34L
+ sink.putInt(0x34);
+ sink.putUnencodedChars(message.pipeline);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnGetSwitchPipelineReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnGetSwitchPipelineReplyVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property length = 272
+ bb.writeShort((short) 0x110);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x34L
+ bb.writeInt(0x34);
+ ChannelUtils.writeFixedLengthString(bb, message.pipeline, 256);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnGetSwitchPipelineReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("pipeline=").append(pipeline);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnGetSwitchPipelineReplyVer13 other = (OFBsnGetSwitchPipelineReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (pipeline == null) {
+ if (other.pipeline != null)
+ return false;
+ } else if (!pipeline.equals(other.pipeline))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((pipeline == null) ? 0 : pipeline.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGetSwitchPipelineRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGetSwitchPipelineRequestVer13.java
new file mode 100644
index 0000000..2637262
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGetSwitchPipelineRequestVer13.java
@@ -0,0 +1,314 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnGetSwitchPipelineRequestVer13 implements OFBsnGetSwitchPipelineRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnGetSwitchPipelineRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 16;
+
+ private final static long DEFAULT_XID = 0x0L;
+
+ // OF message fields
+ private final long xid;
+//
+ // Immutable default instance
+ final static OFBsnGetSwitchPipelineRequestVer13 DEFAULT = new OFBsnGetSwitchPipelineRequestVer13(
+ DEFAULT_XID
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnGetSwitchPipelineRequestVer13(long xid) {
+ this.xid = xid;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x33L;
+ }
+
+
+
+ public OFBsnGetSwitchPipelineRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnGetSwitchPipelineRequest.Builder {
+ final OFBsnGetSwitchPipelineRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+
+ BuilderWithParent(OFBsnGetSwitchPipelineRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnGetSwitchPipelineRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x33L;
+ }
+
+
+
+ @Override
+ public OFBsnGetSwitchPipelineRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+
+ //
+ return new OFBsnGetSwitchPipelineRequestVer13(
+ xid
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnGetSwitchPipelineRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnGetSwitchPipelineRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x33L;
+ }
+
+//
+ @Override
+ public OFBsnGetSwitchPipelineRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+
+
+ return new OFBsnGetSwitchPipelineRequestVer13(
+ xid
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnGetSwitchPipelineRequest> {
+ @Override
+ public OFBsnGetSwitchPipelineRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 4
+ byte type = bb.readByte();
+ if(type != (byte) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 16)
+ throw new OFParseError("Wrong length: Expected=16(16), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x33L
+ int subtype = bb.readInt();
+ if(subtype != 0x33)
+ throw new OFParseError("Wrong subtype: Expected=0x33L(0x33L), got="+subtype);
+
+ OFBsnGetSwitchPipelineRequestVer13 bsnGetSwitchPipelineRequestVer13 = new OFBsnGetSwitchPipelineRequestVer13(
+ xid
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnGetSwitchPipelineRequestVer13);
+ return bsnGetSwitchPipelineRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnGetSwitchPipelineRequestVer13Funnel FUNNEL = new OFBsnGetSwitchPipelineRequestVer13Funnel();
+ static class OFBsnGetSwitchPipelineRequestVer13Funnel implements Funnel<OFBsnGetSwitchPipelineRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnGetSwitchPipelineRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property length = 16
+ sink.putShort((short) 0x10);
+ sink.putLong(message.xid);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x33L
+ sink.putInt(0x33);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnGetSwitchPipelineRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnGetSwitchPipelineRequestVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property length = 16
+ bb.writeShort((short) 0x10);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x33L
+ bb.writeInt(0x33);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnGetSwitchPipelineRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnGetSwitchPipelineRequestVer13 other = (OFBsnGetSwitchPipelineRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnHeaderVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnHeaderVer13.java
new file mode 100644
index 0000000..5154815
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnHeaderVer13.java
@@ -0,0 +1,214 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_virtual_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.jboss.netty.buffer.ChannelBuffer;
+import java.util.Set;
+
+abstract class OFBsnHeaderVer13 {
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 16;
+
+
+ public final static OFBsnHeaderVer13.Reader READER = new Reader();
+
+ static class Reader implements OFMessageReader<OFBsnHeader> {
+ @Override
+ public OFBsnHeader readFrom(ChannelBuffer bb) throws OFParseError {
+ if(bb.readableBytes() < MINIMUM_LENGTH)
+ return null;
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 4
+ byte type = bb.readByte();
+ if(type != (byte) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ U32.f(bb.readInt());
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ int subtype = bb.readInt();
+ bb.readerIndex(start);
+ switch(subtype) {
+ case 0x16:
+ // discriminator value 0x16L=0x16L for class OFBsnBwClearDataReplyVer13
+ return OFBsnBwClearDataReplyVer13.READER.readFrom(bb);
+ case 0x15:
+ // discriminator value 0x15L=0x15L for class OFBsnBwClearDataRequestVer13
+ return OFBsnBwClearDataRequestVer13.READER.readFrom(bb);
+ case 0x14:
+ // discriminator value 0x14L=0x14L for class OFBsnBwEnableGetReplyVer13
+ return OFBsnBwEnableGetReplyVer13.READER.readFrom(bb);
+ case 0x13:
+ // discriminator value 0x13L=0x13L for class OFBsnBwEnableGetRequestVer13
+ return OFBsnBwEnableGetRequestVer13.READER.readFrom(bb);
+ case 0x17:
+ // discriminator value 0x17L=0x17L for class OFBsnBwEnableSetReplyVer13
+ return OFBsnBwEnableSetReplyVer13.READER.readFrom(bb);
+ case 0x12:
+ // discriminator value 0x12L=0x12L for class OFBsnBwEnableSetRequestVer13
+ return OFBsnBwEnableSetRequestVer13.READER.readFrom(bb);
+ case 0xa:
+ // discriminator value 0xaL=0xaL for class OFBsnGetInterfacesReplyVer13
+ return OFBsnGetInterfacesReplyVer13.READER.readFrom(bb);
+ case 0x9:
+ // discriminator value 0x9L=0x9L for class OFBsnGetInterfacesRequestVer13
+ return OFBsnGetInterfacesRequestVer13.READER.readFrom(bb);
+ case 0x5:
+ // discriminator value 0x5L=0x5L for class OFBsnGetMirroringReplyVer13
+ return OFBsnGetMirroringReplyVer13.READER.readFrom(bb);
+ case 0x4:
+ // discriminator value 0x4L=0x4L for class OFBsnGetMirroringRequestVer13
+ return OFBsnGetMirroringRequestVer13.READER.readFrom(bb);
+ case 0x22:
+ // discriminator value 0x22L=0x22L for class OFBsnPduRxReplyVer13
+ return OFBsnPduRxReplyVer13.READER.readFrom(bb);
+ case 0x21:
+ // discriminator value 0x21L=0x21L for class OFBsnPduRxRequestVer13
+ return OFBsnPduRxRequestVer13.READER.readFrom(bb);
+ case 0x23:
+ // discriminator value 0x23L=0x23L for class OFBsnPduRxTimeoutVer13
+ return OFBsnPduRxTimeoutVer13.READER.readFrom(bb);
+ case 0x20:
+ // discriminator value 0x20L=0x20L for class OFBsnPduTxReplyVer13
+ return OFBsnPduTxReplyVer13.READER.readFrom(bb);
+ case 0x1f:
+ // discriminator value 0x1fL=0x1fL for class OFBsnPduTxRequestVer13
+ return OFBsnPduTxRequestVer13.READER.readFrom(bb);
+ case 0x3:
+ // discriminator value 0x3L=0x3L for class OFBsnSetMirroringVer13
+ return OFBsnSetMirroringVer13.READER.readFrom(bb);
+ case 0x19:
+ // discriminator value 0x19L=0x19L for class OFBsnSetPktinSuppressionReplyVer13
+ return OFBsnSetPktinSuppressionReplyVer13.READER.readFrom(bb);
+ case 0xb:
+ // discriminator value 0xbL=0xbL for class OFBsnSetPktinSuppressionRequestVer13
+ return OFBsnSetPktinSuppressionRequestVer13.READER.readFrom(bb);
+ case 0x10:
+ // discriminator value 0x10L=0x10L for class OFBsnVirtualPortCreateReplyVer13
+ return OFBsnVirtualPortCreateReplyVer13.READER.readFrom(bb);
+ case 0xf:
+ // discriminator value 0xfL=0xfL for class OFBsnVirtualPortCreateRequestVer13
+ return OFBsnVirtualPortCreateRequestVer13.READER.readFrom(bb);
+ case 0x1a:
+ // discriminator value 0x1aL=0x1aL for class OFBsnVirtualPortRemoveReplyVer13
+ return OFBsnVirtualPortRemoveReplyVer13.READER.readFrom(bb);
+ case 0x11:
+ // discriminator value 0x11L=0x11L for class OFBsnVirtualPortRemoveRequestVer13
+ return OFBsnVirtualPortRemoveRequestVer13.READER.readFrom(bb);
+ case 0x3c:
+ // discriminator value 0x3cL=0x3cL for class OFBsnArpIdleVer13
+ return OFBsnArpIdleVer13.READER.readFrom(bb);
+ case 0x39:
+ // discriminator value 0x39L=0x39L for class OFBsnControllerConnectionsReplyVer13
+ return OFBsnControllerConnectionsReplyVer13.READER.readFrom(bb);
+ case 0x38:
+ // discriminator value 0x38L=0x38L for class OFBsnControllerConnectionsRequestVer13
+ return OFBsnControllerConnectionsRequestVer13.READER.readFrom(bb);
+ case 0x28:
+ // discriminator value 0x28L=0x28L for class OFBsnFlowIdleVer13
+ return OFBsnFlowIdleVer13.READER.readFrom(bb);
+ case 0x27:
+ // discriminator value 0x27L=0x27L for class OFBsnFlowIdleEnableGetReplyVer13
+ return OFBsnFlowIdleEnableGetReplyVer13.READER.readFrom(bb);
+ case 0x26:
+ // discriminator value 0x26L=0x26L for class OFBsnFlowIdleEnableGetRequestVer13
+ return OFBsnFlowIdleEnableGetRequestVer13.READER.readFrom(bb);
+ case 0x25:
+ // discriminator value 0x25L=0x25L for class OFBsnFlowIdleEnableSetReplyVer13
+ return OFBsnFlowIdleEnableSetReplyVer13.READER.readFrom(bb);
+ case 0x24:
+ // discriminator value 0x24L=0x24L for class OFBsnFlowIdleEnableSetRequestVer13
+ return OFBsnFlowIdleEnableSetRequestVer13.READER.readFrom(bb);
+ case 0x31:
+ // discriminator value 0x31L=0x31L for class OFBsnGentableClearReplyVer13
+ return OFBsnGentableClearReplyVer13.READER.readFrom(bb);
+ case 0x30:
+ // discriminator value 0x30L=0x30L for class OFBsnGentableClearRequestVer13
+ return OFBsnGentableClearRequestVer13.READER.readFrom(bb);
+ case 0x2e:
+ // discriminator value 0x2eL=0x2eL for class OFBsnGentableEntryAddVer13
+ return OFBsnGentableEntryAddVer13.READER.readFrom(bb);
+ case 0x2f:
+ // discriminator value 0x2fL=0x2fL for class OFBsnGentableEntryDeleteVer13
+ return OFBsnGentableEntryDeleteVer13.READER.readFrom(bb);
+ case 0x32:
+ // discriminator value 0x32L=0x32L for class OFBsnGentableSetBucketsSizeVer13
+ return OFBsnGentableSetBucketsSizeVer13.READER.readFrom(bb);
+ case 0x34:
+ // discriminator value 0x34L=0x34L for class OFBsnGetSwitchPipelineReplyVer13
+ return OFBsnGetSwitchPipelineReplyVer13.READER.readFrom(bb);
+ case 0x33:
+ // discriminator value 0x33L=0x33L for class OFBsnGetSwitchPipelineRequestVer13
+ return OFBsnGetSwitchPipelineRequestVer13.READER.readFrom(bb);
+ case 0x2b:
+ // discriminator value 0x2bL=0x2bL for class OFBsnLacpConvergenceNotifVer13
+ return OFBsnLacpConvergenceNotifVer13.READER.readFrom(bb);
+ case 0x3f:
+ // discriminator value 0x3fL=0x3fL for class OFBsnLogVer13
+ return OFBsnLogVer13.READER.readFrom(bb);
+ case 0x37:
+ // discriminator value 0x37L=0x37L for class OFBsnRoleStatusVer13
+ return OFBsnRoleStatusVer13.READER.readFrom(bb);
+ case 0x3b:
+ // discriminator value 0x3bL=0x3bL for class OFBsnSetAuxCxnsReplyVer13
+ return OFBsnSetAuxCxnsReplyVer13.READER.readFrom(bb);
+ case 0x3a:
+ // discriminator value 0x3aL=0x3aL for class OFBsnSetAuxCxnsRequestVer13
+ return OFBsnSetAuxCxnsRequestVer13.READER.readFrom(bb);
+ case 0x2a:
+ // discriminator value 0x2aL=0x2aL for class OFBsnSetLacpReplyVer13
+ return OFBsnSetLacpReplyVer13.READER.readFrom(bb);
+ case 0x29:
+ // discriminator value 0x29L=0x29L for class OFBsnSetLacpRequestVer13
+ return OFBsnSetLacpRequestVer13.READER.readFrom(bb);
+ case 0x36:
+ // discriminator value 0x36L=0x36L for class OFBsnSetSwitchPipelineReplyVer13
+ return OFBsnSetSwitchPipelineReplyVer13.READER.readFrom(bb);
+ case 0x35:
+ // discriminator value 0x35L=0x35L for class OFBsnSetSwitchPipelineRequestVer13
+ return OFBsnSetSwitchPipelineRequestVer13.READER.readFrom(bb);
+ case 0x3d:
+ // discriminator value 0x3dL=0x3dL for class OFBsnTableSetBucketsSizeVer13
+ return OFBsnTableSetBucketsSizeVer13.READER.readFrom(bb);
+ case 0x2d:
+ // discriminator value 0x2dL=0x2dL for class OFBsnTimeReplyVer13
+ return OFBsnTimeReplyVer13.READER.readFrom(bb);
+ case 0x2c:
+ // discriminator value 0x2cL=0x2cL for class OFBsnTimeRequestVer13
+ return OFBsnTimeRequestVer13.READER.readFrom(bb);
+ default:
+ throw new OFParseError("Unknown value for discriminator subtype of class OFBsnHeaderVer13: " + subtype);
+ }
+ }
+ }
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnImageDescStatsReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnImageDescStatsReplyVer13.java
new file mode 100644
index 0000000..d1e1551
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnImageDescStatsReplyVer13.java
@@ -0,0 +1,505 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnImageDescStatsReplyVer13 implements OFBsnImageDescStatsReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnImageDescStatsReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 536;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsReplyFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsReplyFlags>of();
+ private final static String DEFAULT_IMAGE_CHECKSUM = "";
+ private final static String DEFAULT_STARTUP_CONFIG_CHECKSUM = "";
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsReplyFlags> flags;
+ private final String imageChecksum;
+ private final String startupConfigChecksum;
+//
+ // Immutable default instance
+ final static OFBsnImageDescStatsReplyVer13 DEFAULT = new OFBsnImageDescStatsReplyVer13(
+ DEFAULT_XID, DEFAULT_FLAGS, DEFAULT_IMAGE_CHECKSUM, DEFAULT_STARTUP_CONFIG_CHECKSUM
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnImageDescStatsReplyVer13(long xid, Set<OFStatsReplyFlags> flags, String imageChecksum, String startupConfigChecksum) {
+ this.xid = xid;
+ this.flags = flags;
+ this.imageChecksum = imageChecksum;
+ this.startupConfigChecksum = startupConfigChecksum;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0xeL;
+ }
+
+ @Override
+ public String getImageChecksum() {
+ return imageChecksum;
+ }
+
+ @Override
+ public String getStartupConfigChecksum() {
+ return startupConfigChecksum;
+ }
+
+
+
+ public OFBsnImageDescStatsReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnImageDescStatsReply.Builder {
+ final OFBsnImageDescStatsReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean imageChecksumSet;
+ private String imageChecksum;
+ private boolean startupConfigChecksumSet;
+ private String startupConfigChecksum;
+
+ BuilderWithParent(OFBsnImageDescStatsReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnImageDescStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnImageDescStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0xeL;
+ }
+
+ @Override
+ public String getImageChecksum() {
+ return imageChecksum;
+ }
+
+ @Override
+ public OFBsnImageDescStatsReply.Builder setImageChecksum(String imageChecksum) {
+ this.imageChecksum = imageChecksum;
+ this.imageChecksumSet = true;
+ return this;
+ }
+ @Override
+ public String getStartupConfigChecksum() {
+ return startupConfigChecksum;
+ }
+
+ @Override
+ public OFBsnImageDescStatsReply.Builder setStartupConfigChecksum(String startupConfigChecksum) {
+ this.startupConfigChecksum = startupConfigChecksum;
+ this.startupConfigChecksumSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnImageDescStatsReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ String imageChecksum = this.imageChecksumSet ? this.imageChecksum : parentMessage.imageChecksum;
+ if(imageChecksum == null)
+ throw new NullPointerException("Property imageChecksum must not be null");
+ String startupConfigChecksum = this.startupConfigChecksumSet ? this.startupConfigChecksum : parentMessage.startupConfigChecksum;
+ if(startupConfigChecksum == null)
+ throw new NullPointerException("Property startupConfigChecksum must not be null");
+
+ //
+ return new OFBsnImageDescStatsReplyVer13(
+ xid,
+ flags,
+ imageChecksum,
+ startupConfigChecksum
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnImageDescStatsReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean imageChecksumSet;
+ private String imageChecksum;
+ private boolean startupConfigChecksumSet;
+ private String startupConfigChecksum;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnImageDescStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnImageDescStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0xeL;
+ }
+
+ @Override
+ public String getImageChecksum() {
+ return imageChecksum;
+ }
+
+ @Override
+ public OFBsnImageDescStatsReply.Builder setImageChecksum(String imageChecksum) {
+ this.imageChecksum = imageChecksum;
+ this.imageChecksumSet = true;
+ return this;
+ }
+ @Override
+ public String getStartupConfigChecksum() {
+ return startupConfigChecksum;
+ }
+
+ @Override
+ public OFBsnImageDescStatsReply.Builder setStartupConfigChecksum(String startupConfigChecksum) {
+ this.startupConfigChecksum = startupConfigChecksum;
+ this.startupConfigChecksumSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnImageDescStatsReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ String imageChecksum = this.imageChecksumSet ? this.imageChecksum : DEFAULT_IMAGE_CHECKSUM;
+ if(imageChecksum == null)
+ throw new NullPointerException("Property imageChecksum must not be null");
+ String startupConfigChecksum = this.startupConfigChecksumSet ? this.startupConfigChecksum : DEFAULT_STARTUP_CONFIG_CHECKSUM;
+ if(startupConfigChecksum == null)
+ throw new NullPointerException("Property startupConfigChecksum must not be null");
+
+
+ return new OFBsnImageDescStatsReplyVer13(
+ xid,
+ flags,
+ imageChecksum,
+ startupConfigChecksum
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnImageDescStatsReply> {
+ @Override
+ public OFBsnImageDescStatsReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 19
+ byte type = bb.readByte();
+ if(type != (byte) 0x13)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REPLY(19), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 536)
+ throw new OFParseError("Wrong length: Expected=536(536), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 65535
+ short statsType = bb.readShort();
+ if(statsType != (short) 0xffff)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.EXPERIMENTER(65535), got="+statsType);
+ Set<OFStatsReplyFlags> flags = OFStatsReplyFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0xeL
+ int subtype = bb.readInt();
+ if(subtype != 0xe)
+ throw new OFParseError("Wrong subtype: Expected=0xeL(0xeL), got="+subtype);
+ String imageChecksum = ChannelUtils.readFixedLengthString(bb, 256);
+ String startupConfigChecksum = ChannelUtils.readFixedLengthString(bb, 256);
+
+ OFBsnImageDescStatsReplyVer13 bsnImageDescStatsReplyVer13 = new OFBsnImageDescStatsReplyVer13(
+ xid,
+ flags,
+ imageChecksum,
+ startupConfigChecksum
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnImageDescStatsReplyVer13);
+ return bsnImageDescStatsReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnImageDescStatsReplyVer13Funnel FUNNEL = new OFBsnImageDescStatsReplyVer13Funnel();
+ static class OFBsnImageDescStatsReplyVer13Funnel implements Funnel<OFBsnImageDescStatsReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnImageDescStatsReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 19
+ sink.putByte((byte) 0x13);
+ // fixed value property length = 536
+ sink.putShort((short) 0x218);
+ sink.putLong(message.xid);
+ // fixed value property statsType = 65535
+ sink.putShort((short) 0xffff);
+ OFStatsReplyFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0xeL
+ sink.putInt(0xe);
+ sink.putUnencodedChars(message.imageChecksum);
+ sink.putUnencodedChars(message.startupConfigChecksum);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnImageDescStatsReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnImageDescStatsReplyVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 19
+ bb.writeByte((byte) 0x13);
+ // fixed value property length = 536
+ bb.writeShort((short) 0x218);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 65535
+ bb.writeShort((short) 0xffff);
+ OFStatsReplyFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0xeL
+ bb.writeInt(0xe);
+ ChannelUtils.writeFixedLengthString(bb, message.imageChecksum, 256);
+ ChannelUtils.writeFixedLengthString(bb, message.startupConfigChecksum, 256);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnImageDescStatsReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("imageChecksum=").append(imageChecksum);
+ b.append(", ");
+ b.append("startupConfigChecksum=").append(startupConfigChecksum);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnImageDescStatsReplyVer13 other = (OFBsnImageDescStatsReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if (imageChecksum == null) {
+ if (other.imageChecksum != null)
+ return false;
+ } else if (!imageChecksum.equals(other.imageChecksum))
+ return false;
+ if (startupConfigChecksum == null) {
+ if (other.startupConfigChecksum != null)
+ return false;
+ } else if (!startupConfigChecksum.equals(other.startupConfigChecksum))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * result + ((imageChecksum == null) ? 0 : imageChecksum.hashCode());
+ result = prime * result + ((startupConfigChecksum == null) ? 0 : startupConfigChecksum.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnImageDescStatsRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnImageDescStatsRequestVer13.java
new file mode 100644
index 0000000..ee1dc59
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnImageDescStatsRequestVer13.java
@@ -0,0 +1,397 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnImageDescStatsRequestVer13 implements OFBsnImageDescStatsRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnImageDescStatsRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 24;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsRequestFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsRequestFlags>of();
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsRequestFlags> flags;
+//
+ // Immutable default instance
+ final static OFBsnImageDescStatsRequestVer13 DEFAULT = new OFBsnImageDescStatsRequestVer13(
+ DEFAULT_XID, DEFAULT_FLAGS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnImageDescStatsRequestVer13(long xid, Set<OFStatsRequestFlags> flags) {
+ this.xid = xid;
+ this.flags = flags;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0xeL;
+ }
+
+
+
+ public OFBsnImageDescStatsRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnImageDescStatsRequest.Builder {
+ final OFBsnImageDescStatsRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+
+ BuilderWithParent(OFBsnImageDescStatsRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnImageDescStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnImageDescStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0xeL;
+ }
+
+
+
+ @Override
+ public OFBsnImageDescStatsRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+
+ //
+ return new OFBsnImageDescStatsRequestVer13(
+ xid,
+ flags
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnImageDescStatsRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnImageDescStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnImageDescStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0xeL;
+ }
+
+//
+ @Override
+ public OFBsnImageDescStatsRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+
+
+ return new OFBsnImageDescStatsRequestVer13(
+ xid,
+ flags
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnImageDescStatsRequest> {
+ @Override
+ public OFBsnImageDescStatsRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 18
+ byte type = bb.readByte();
+ if(type != (byte) 0x12)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REQUEST(18), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 24)
+ throw new OFParseError("Wrong length: Expected=24(24), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 65535
+ short statsType = bb.readShort();
+ if(statsType != (short) 0xffff)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.EXPERIMENTER(65535), got="+statsType);
+ Set<OFStatsRequestFlags> flags = OFStatsRequestFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0xeL
+ int subtype = bb.readInt();
+ if(subtype != 0xe)
+ throw new OFParseError("Wrong subtype: Expected=0xeL(0xeL), got="+subtype);
+
+ OFBsnImageDescStatsRequestVer13 bsnImageDescStatsRequestVer13 = new OFBsnImageDescStatsRequestVer13(
+ xid,
+ flags
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnImageDescStatsRequestVer13);
+ return bsnImageDescStatsRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnImageDescStatsRequestVer13Funnel FUNNEL = new OFBsnImageDescStatsRequestVer13Funnel();
+ static class OFBsnImageDescStatsRequestVer13Funnel implements Funnel<OFBsnImageDescStatsRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnImageDescStatsRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 18
+ sink.putByte((byte) 0x12);
+ // fixed value property length = 24
+ sink.putShort((short) 0x18);
+ sink.putLong(message.xid);
+ // fixed value property statsType = 65535
+ sink.putShort((short) 0xffff);
+ OFStatsRequestFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0xeL
+ sink.putInt(0xe);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnImageDescStatsRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnImageDescStatsRequestVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 18
+ bb.writeByte((byte) 0x12);
+ // fixed value property length = 24
+ bb.writeShort((short) 0x18);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 65535
+ bb.writeShort((short) 0xffff);
+ OFStatsRequestFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0xeL
+ bb.writeInt(0xe);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnImageDescStatsRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnImageDescStatsRequestVer13 other = (OFBsnImageDescStatsRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnInterfaceVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnInterfaceVer13.java
new file mode 100644
index 0000000..006e83f
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnInterfaceVer13.java
@@ -0,0 +1,396 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnInterfaceVer13 implements OFBsnInterface {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnInterfaceVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 32;
+
+ private final static MacAddress DEFAULT_HW_ADDR = MacAddress.NONE;
+ private final static String DEFAULT_NAME = "";
+ private final static IPv4Address DEFAULT_IPV4_ADDR = IPv4Address.NONE;
+ private final static IPv4Address DEFAULT_IPV4_NETMASK = IPv4Address.NONE;
+
+ // OF message fields
+ private final MacAddress hwAddr;
+ private final String name;
+ private final IPv4Address ipv4Addr;
+ private final IPv4Address ipv4Netmask;
+//
+ // Immutable default instance
+ final static OFBsnInterfaceVer13 DEFAULT = new OFBsnInterfaceVer13(
+ DEFAULT_HW_ADDR, DEFAULT_NAME, DEFAULT_IPV4_ADDR, DEFAULT_IPV4_NETMASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnInterfaceVer13(MacAddress hwAddr, String name, IPv4Address ipv4Addr, IPv4Address ipv4Netmask) {
+ this.hwAddr = hwAddr;
+ this.name = name;
+ this.ipv4Addr = ipv4Addr;
+ this.ipv4Netmask = ipv4Netmask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public MacAddress getHwAddr() {
+ return hwAddr;
+ }
+
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ @Override
+ public IPv4Address getIpv4Addr() {
+ return ipv4Addr;
+ }
+
+ @Override
+ public IPv4Address getIpv4Netmask() {
+ return ipv4Netmask;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFBsnInterface.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnInterface.Builder {
+ final OFBsnInterfaceVer13 parentMessage;
+
+ // OF message fields
+ private boolean hwAddrSet;
+ private MacAddress hwAddr;
+ private boolean nameSet;
+ private String name;
+ private boolean ipv4AddrSet;
+ private IPv4Address ipv4Addr;
+ private boolean ipv4NetmaskSet;
+ private IPv4Address ipv4Netmask;
+
+ BuilderWithParent(OFBsnInterfaceVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public MacAddress getHwAddr() {
+ return hwAddr;
+ }
+
+ @Override
+ public OFBsnInterface.Builder setHwAddr(MacAddress hwAddr) {
+ this.hwAddr = hwAddr;
+ this.hwAddrSet = true;
+ return this;
+ }
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ @Override
+ public OFBsnInterface.Builder setName(String name) {
+ this.name = name;
+ this.nameSet = true;
+ return this;
+ }
+ @Override
+ public IPv4Address getIpv4Addr() {
+ return ipv4Addr;
+ }
+
+ @Override
+ public OFBsnInterface.Builder setIpv4Addr(IPv4Address ipv4Addr) {
+ this.ipv4Addr = ipv4Addr;
+ this.ipv4AddrSet = true;
+ return this;
+ }
+ @Override
+ public IPv4Address getIpv4Netmask() {
+ return ipv4Netmask;
+ }
+
+ @Override
+ public OFBsnInterface.Builder setIpv4Netmask(IPv4Address ipv4Netmask) {
+ this.ipv4Netmask = ipv4Netmask;
+ this.ipv4NetmaskSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFBsnInterface build() {
+ MacAddress hwAddr = this.hwAddrSet ? this.hwAddr : parentMessage.hwAddr;
+ if(hwAddr == null)
+ throw new NullPointerException("Property hwAddr must not be null");
+ String name = this.nameSet ? this.name : parentMessage.name;
+ if(name == null)
+ throw new NullPointerException("Property name must not be null");
+ IPv4Address ipv4Addr = this.ipv4AddrSet ? this.ipv4Addr : parentMessage.ipv4Addr;
+ if(ipv4Addr == null)
+ throw new NullPointerException("Property ipv4Addr must not be null");
+ IPv4Address ipv4Netmask = this.ipv4NetmaskSet ? this.ipv4Netmask : parentMessage.ipv4Netmask;
+ if(ipv4Netmask == null)
+ throw new NullPointerException("Property ipv4Netmask must not be null");
+
+ //
+ return new OFBsnInterfaceVer13(
+ hwAddr,
+ name,
+ ipv4Addr,
+ ipv4Netmask
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnInterface.Builder {
+ // OF message fields
+ private boolean hwAddrSet;
+ private MacAddress hwAddr;
+ private boolean nameSet;
+ private String name;
+ private boolean ipv4AddrSet;
+ private IPv4Address ipv4Addr;
+ private boolean ipv4NetmaskSet;
+ private IPv4Address ipv4Netmask;
+
+ @Override
+ public MacAddress getHwAddr() {
+ return hwAddr;
+ }
+
+ @Override
+ public OFBsnInterface.Builder setHwAddr(MacAddress hwAddr) {
+ this.hwAddr = hwAddr;
+ this.hwAddrSet = true;
+ return this;
+ }
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ @Override
+ public OFBsnInterface.Builder setName(String name) {
+ this.name = name;
+ this.nameSet = true;
+ return this;
+ }
+ @Override
+ public IPv4Address getIpv4Addr() {
+ return ipv4Addr;
+ }
+
+ @Override
+ public OFBsnInterface.Builder setIpv4Addr(IPv4Address ipv4Addr) {
+ this.ipv4Addr = ipv4Addr;
+ this.ipv4AddrSet = true;
+ return this;
+ }
+ @Override
+ public IPv4Address getIpv4Netmask() {
+ return ipv4Netmask;
+ }
+
+ @Override
+ public OFBsnInterface.Builder setIpv4Netmask(IPv4Address ipv4Netmask) {
+ this.ipv4Netmask = ipv4Netmask;
+ this.ipv4NetmaskSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFBsnInterface build() {
+ MacAddress hwAddr = this.hwAddrSet ? this.hwAddr : DEFAULT_HW_ADDR;
+ if(hwAddr == null)
+ throw new NullPointerException("Property hwAddr must not be null");
+ String name = this.nameSet ? this.name : DEFAULT_NAME;
+ if(name == null)
+ throw new NullPointerException("Property name must not be null");
+ IPv4Address ipv4Addr = this.ipv4AddrSet ? this.ipv4Addr : DEFAULT_IPV4_ADDR;
+ if(ipv4Addr == null)
+ throw new NullPointerException("Property ipv4Addr must not be null");
+ IPv4Address ipv4Netmask = this.ipv4NetmaskSet ? this.ipv4Netmask : DEFAULT_IPV4_NETMASK;
+ if(ipv4Netmask == null)
+ throw new NullPointerException("Property ipv4Netmask must not be null");
+
+
+ return new OFBsnInterfaceVer13(
+ hwAddr,
+ name,
+ ipv4Addr,
+ ipv4Netmask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnInterface> {
+ @Override
+ public OFBsnInterface readFrom(ChannelBuffer bb) throws OFParseError {
+ MacAddress hwAddr = MacAddress.read6Bytes(bb);
+ // pad: 2 bytes
+ bb.skipBytes(2);
+ String name = ChannelUtils.readFixedLengthString(bb, 16);
+ IPv4Address ipv4Addr = IPv4Address.read4Bytes(bb);
+ IPv4Address ipv4Netmask = IPv4Address.read4Bytes(bb);
+
+ OFBsnInterfaceVer13 bsnInterfaceVer13 = new OFBsnInterfaceVer13(
+ hwAddr,
+ name,
+ ipv4Addr,
+ ipv4Netmask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnInterfaceVer13);
+ return bsnInterfaceVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnInterfaceVer13Funnel FUNNEL = new OFBsnInterfaceVer13Funnel();
+ static class OFBsnInterfaceVer13Funnel implements Funnel<OFBsnInterfaceVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnInterfaceVer13 message, PrimitiveSink sink) {
+ message.hwAddr.putTo(sink);
+ // skip pad (2 bytes)
+ sink.putUnencodedChars(message.name);
+ message.ipv4Addr.putTo(sink);
+ message.ipv4Netmask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnInterfaceVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnInterfaceVer13 message) {
+ message.hwAddr.write6Bytes(bb);
+ // pad: 2 bytes
+ bb.writeZero(2);
+ ChannelUtils.writeFixedLengthString(bb, message.name, 16);
+ message.ipv4Addr.write4Bytes(bb);
+ message.ipv4Netmask.write4Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnInterfaceVer13(");
+ b.append("hwAddr=").append(hwAddr);
+ b.append(", ");
+ b.append("name=").append(name);
+ b.append(", ");
+ b.append("ipv4Addr=").append(ipv4Addr);
+ b.append(", ");
+ b.append("ipv4Netmask=").append(ipv4Netmask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnInterfaceVer13 other = (OFBsnInterfaceVer13) obj;
+
+ if (hwAddr == null) {
+ if (other.hwAddr != null)
+ return false;
+ } else if (!hwAddr.equals(other.hwAddr))
+ return false;
+ if (name == null) {
+ if (other.name != null)
+ return false;
+ } else if (!name.equals(other.name))
+ return false;
+ if (ipv4Addr == null) {
+ if (other.ipv4Addr != null)
+ return false;
+ } else if (!ipv4Addr.equals(other.ipv4Addr))
+ return false;
+ if (ipv4Netmask == null) {
+ if (other.ipv4Netmask != null)
+ return false;
+ } else if (!ipv4Netmask.equals(other.ipv4Netmask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((hwAddr == null) ? 0 : hwAddr.hashCode());
+ result = prime * result + ((name == null) ? 0 : name.hashCode());
+ result = prime * result + ((ipv4Addr == null) ? 0 : ipv4Addr.hashCode());
+ result = prime * result + ((ipv4Netmask == null) ? 0 : ipv4Netmask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnLacpConvergenceNotifVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnLacpConvergenceNotifVer13.java
new file mode 100644
index 0000000..cef593e
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnLacpConvergenceNotifVer13.java
@@ -0,0 +1,904 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnLacpConvergenceNotifVer13 implements OFBsnLacpConvergenceNotif {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnLacpConvergenceNotifVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 52;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static short DEFAULT_CONVERGENCE_STATUS = (short) 0x0;
+ private final static OFPort DEFAULT_PORT_NO = OFPort.ANY;
+ private final static int DEFAULT_ACTOR_SYS_PRIORITY = 0x0;
+ private final static MacAddress DEFAULT_ACTOR_SYS_MAC = MacAddress.NONE;
+ private final static int DEFAULT_ACTOR_PORT_PRIORITY = 0x0;
+ private final static int DEFAULT_ACTOR_PORT_NUM = 0x0;
+ private final static int DEFAULT_ACTOR_KEY = 0x0;
+ private final static int DEFAULT_PARTNER_SYS_PRIORITY = 0x0;
+ private final static MacAddress DEFAULT_PARTNER_SYS_MAC = MacAddress.NONE;
+ private final static int DEFAULT_PARTNER_PORT_PRIORITY = 0x0;
+ private final static int DEFAULT_PARTNER_PORT_NUM = 0x0;
+ private final static int DEFAULT_PARTNER_KEY = 0x0;
+
+ // OF message fields
+ private final long xid;
+ private final short convergenceStatus;
+ private final OFPort portNo;
+ private final int actorSysPriority;
+ private final MacAddress actorSysMac;
+ private final int actorPortPriority;
+ private final int actorPortNum;
+ private final int actorKey;
+ private final int partnerSysPriority;
+ private final MacAddress partnerSysMac;
+ private final int partnerPortPriority;
+ private final int partnerPortNum;
+ private final int partnerKey;
+//
+ // Immutable default instance
+ final static OFBsnLacpConvergenceNotifVer13 DEFAULT = new OFBsnLacpConvergenceNotifVer13(
+ DEFAULT_XID, DEFAULT_CONVERGENCE_STATUS, DEFAULT_PORT_NO, DEFAULT_ACTOR_SYS_PRIORITY, DEFAULT_ACTOR_SYS_MAC, DEFAULT_ACTOR_PORT_PRIORITY, DEFAULT_ACTOR_PORT_NUM, DEFAULT_ACTOR_KEY, DEFAULT_PARTNER_SYS_PRIORITY, DEFAULT_PARTNER_SYS_MAC, DEFAULT_PARTNER_PORT_PRIORITY, DEFAULT_PARTNER_PORT_NUM, DEFAULT_PARTNER_KEY
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnLacpConvergenceNotifVer13(long xid, short convergenceStatus, OFPort portNo, int actorSysPriority, MacAddress actorSysMac, int actorPortPriority, int actorPortNum, int actorKey, int partnerSysPriority, MacAddress partnerSysMac, int partnerPortPriority, int partnerPortNum, int partnerKey) {
+ this.xid = xid;
+ this.convergenceStatus = convergenceStatus;
+ this.portNo = portNo;
+ this.actorSysPriority = actorSysPriority;
+ this.actorSysMac = actorSysMac;
+ this.actorPortPriority = actorPortPriority;
+ this.actorPortNum = actorPortNum;
+ this.actorKey = actorKey;
+ this.partnerSysPriority = partnerSysPriority;
+ this.partnerSysMac = partnerSysMac;
+ this.partnerPortPriority = partnerPortPriority;
+ this.partnerPortNum = partnerPortNum;
+ this.partnerKey = partnerKey;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x2bL;
+ }
+
+ @Override
+ public short getConvergenceStatus() {
+ return convergenceStatus;
+ }
+
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public int getActorSysPriority() {
+ return actorSysPriority;
+ }
+
+ @Override
+ public MacAddress getActorSysMac() {
+ return actorSysMac;
+ }
+
+ @Override
+ public int getActorPortPriority() {
+ return actorPortPriority;
+ }
+
+ @Override
+ public int getActorPortNum() {
+ return actorPortNum;
+ }
+
+ @Override
+ public int getActorKey() {
+ return actorKey;
+ }
+
+ @Override
+ public int getPartnerSysPriority() {
+ return partnerSysPriority;
+ }
+
+ @Override
+ public MacAddress getPartnerSysMac() {
+ return partnerSysMac;
+ }
+
+ @Override
+ public int getPartnerPortPriority() {
+ return partnerPortPriority;
+ }
+
+ @Override
+ public int getPartnerPortNum() {
+ return partnerPortNum;
+ }
+
+ @Override
+ public int getPartnerKey() {
+ return partnerKey;
+ }
+
+
+
+ public OFBsnLacpConvergenceNotif.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnLacpConvergenceNotif.Builder {
+ final OFBsnLacpConvergenceNotifVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean convergenceStatusSet;
+ private short convergenceStatus;
+ private boolean portNoSet;
+ private OFPort portNo;
+ private boolean actorSysPrioritySet;
+ private int actorSysPriority;
+ private boolean actorSysMacSet;
+ private MacAddress actorSysMac;
+ private boolean actorPortPrioritySet;
+ private int actorPortPriority;
+ private boolean actorPortNumSet;
+ private int actorPortNum;
+ private boolean actorKeySet;
+ private int actorKey;
+ private boolean partnerSysPrioritySet;
+ private int partnerSysPriority;
+ private boolean partnerSysMacSet;
+ private MacAddress partnerSysMac;
+ private boolean partnerPortPrioritySet;
+ private int partnerPortPriority;
+ private boolean partnerPortNumSet;
+ private int partnerPortNum;
+ private boolean partnerKeySet;
+ private int partnerKey;
+
+ BuilderWithParent(OFBsnLacpConvergenceNotifVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnLacpConvergenceNotif.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x2bL;
+ }
+
+ @Override
+ public short getConvergenceStatus() {
+ return convergenceStatus;
+ }
+
+ @Override
+ public OFBsnLacpConvergenceNotif.Builder setConvergenceStatus(short convergenceStatus) {
+ this.convergenceStatus = convergenceStatus;
+ this.convergenceStatusSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public OFBsnLacpConvergenceNotif.Builder setPortNo(OFPort portNo) {
+ this.portNo = portNo;
+ this.portNoSet = true;
+ return this;
+ }
+ @Override
+ public int getActorSysPriority() {
+ return actorSysPriority;
+ }
+
+ @Override
+ public OFBsnLacpConvergenceNotif.Builder setActorSysPriority(int actorSysPriority) {
+ this.actorSysPriority = actorSysPriority;
+ this.actorSysPrioritySet = true;
+ return this;
+ }
+ @Override
+ public MacAddress getActorSysMac() {
+ return actorSysMac;
+ }
+
+ @Override
+ public OFBsnLacpConvergenceNotif.Builder setActorSysMac(MacAddress actorSysMac) {
+ this.actorSysMac = actorSysMac;
+ this.actorSysMacSet = true;
+ return this;
+ }
+ @Override
+ public int getActorPortPriority() {
+ return actorPortPriority;
+ }
+
+ @Override
+ public OFBsnLacpConvergenceNotif.Builder setActorPortPriority(int actorPortPriority) {
+ this.actorPortPriority = actorPortPriority;
+ this.actorPortPrioritySet = true;
+ return this;
+ }
+ @Override
+ public int getActorPortNum() {
+ return actorPortNum;
+ }
+
+ @Override
+ public OFBsnLacpConvergenceNotif.Builder setActorPortNum(int actorPortNum) {
+ this.actorPortNum = actorPortNum;
+ this.actorPortNumSet = true;
+ return this;
+ }
+ @Override
+ public int getActorKey() {
+ return actorKey;
+ }
+
+ @Override
+ public OFBsnLacpConvergenceNotif.Builder setActorKey(int actorKey) {
+ this.actorKey = actorKey;
+ this.actorKeySet = true;
+ return this;
+ }
+ @Override
+ public int getPartnerSysPriority() {
+ return partnerSysPriority;
+ }
+
+ @Override
+ public OFBsnLacpConvergenceNotif.Builder setPartnerSysPriority(int partnerSysPriority) {
+ this.partnerSysPriority = partnerSysPriority;
+ this.partnerSysPrioritySet = true;
+ return this;
+ }
+ @Override
+ public MacAddress getPartnerSysMac() {
+ return partnerSysMac;
+ }
+
+ @Override
+ public OFBsnLacpConvergenceNotif.Builder setPartnerSysMac(MacAddress partnerSysMac) {
+ this.partnerSysMac = partnerSysMac;
+ this.partnerSysMacSet = true;
+ return this;
+ }
+ @Override
+ public int getPartnerPortPriority() {
+ return partnerPortPriority;
+ }
+
+ @Override
+ public OFBsnLacpConvergenceNotif.Builder setPartnerPortPriority(int partnerPortPriority) {
+ this.partnerPortPriority = partnerPortPriority;
+ this.partnerPortPrioritySet = true;
+ return this;
+ }
+ @Override
+ public int getPartnerPortNum() {
+ return partnerPortNum;
+ }
+
+ @Override
+ public OFBsnLacpConvergenceNotif.Builder setPartnerPortNum(int partnerPortNum) {
+ this.partnerPortNum = partnerPortNum;
+ this.partnerPortNumSet = true;
+ return this;
+ }
+ @Override
+ public int getPartnerKey() {
+ return partnerKey;
+ }
+
+ @Override
+ public OFBsnLacpConvergenceNotif.Builder setPartnerKey(int partnerKey) {
+ this.partnerKey = partnerKey;
+ this.partnerKeySet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnLacpConvergenceNotif build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ short convergenceStatus = this.convergenceStatusSet ? this.convergenceStatus : parentMessage.convergenceStatus;
+ OFPort portNo = this.portNoSet ? this.portNo : parentMessage.portNo;
+ if(portNo == null)
+ throw new NullPointerException("Property portNo must not be null");
+ int actorSysPriority = this.actorSysPrioritySet ? this.actorSysPriority : parentMessage.actorSysPriority;
+ MacAddress actorSysMac = this.actorSysMacSet ? this.actorSysMac : parentMessage.actorSysMac;
+ if(actorSysMac == null)
+ throw new NullPointerException("Property actorSysMac must not be null");
+ int actorPortPriority = this.actorPortPrioritySet ? this.actorPortPriority : parentMessage.actorPortPriority;
+ int actorPortNum = this.actorPortNumSet ? this.actorPortNum : parentMessage.actorPortNum;
+ int actorKey = this.actorKeySet ? this.actorKey : parentMessage.actorKey;
+ int partnerSysPriority = this.partnerSysPrioritySet ? this.partnerSysPriority : parentMessage.partnerSysPriority;
+ MacAddress partnerSysMac = this.partnerSysMacSet ? this.partnerSysMac : parentMessage.partnerSysMac;
+ if(partnerSysMac == null)
+ throw new NullPointerException("Property partnerSysMac must not be null");
+ int partnerPortPriority = this.partnerPortPrioritySet ? this.partnerPortPriority : parentMessage.partnerPortPriority;
+ int partnerPortNum = this.partnerPortNumSet ? this.partnerPortNum : parentMessage.partnerPortNum;
+ int partnerKey = this.partnerKeySet ? this.partnerKey : parentMessage.partnerKey;
+
+ //
+ return new OFBsnLacpConvergenceNotifVer13(
+ xid,
+ convergenceStatus,
+ portNo,
+ actorSysPriority,
+ actorSysMac,
+ actorPortPriority,
+ actorPortNum,
+ actorKey,
+ partnerSysPriority,
+ partnerSysMac,
+ partnerPortPriority,
+ partnerPortNum,
+ partnerKey
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnLacpConvergenceNotif.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean convergenceStatusSet;
+ private short convergenceStatus;
+ private boolean portNoSet;
+ private OFPort portNo;
+ private boolean actorSysPrioritySet;
+ private int actorSysPriority;
+ private boolean actorSysMacSet;
+ private MacAddress actorSysMac;
+ private boolean actorPortPrioritySet;
+ private int actorPortPriority;
+ private boolean actorPortNumSet;
+ private int actorPortNum;
+ private boolean actorKeySet;
+ private int actorKey;
+ private boolean partnerSysPrioritySet;
+ private int partnerSysPriority;
+ private boolean partnerSysMacSet;
+ private MacAddress partnerSysMac;
+ private boolean partnerPortPrioritySet;
+ private int partnerPortPriority;
+ private boolean partnerPortNumSet;
+ private int partnerPortNum;
+ private boolean partnerKeySet;
+ private int partnerKey;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnLacpConvergenceNotif.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x2bL;
+ }
+
+ @Override
+ public short getConvergenceStatus() {
+ return convergenceStatus;
+ }
+
+ @Override
+ public OFBsnLacpConvergenceNotif.Builder setConvergenceStatus(short convergenceStatus) {
+ this.convergenceStatus = convergenceStatus;
+ this.convergenceStatusSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public OFBsnLacpConvergenceNotif.Builder setPortNo(OFPort portNo) {
+ this.portNo = portNo;
+ this.portNoSet = true;
+ return this;
+ }
+ @Override
+ public int getActorSysPriority() {
+ return actorSysPriority;
+ }
+
+ @Override
+ public OFBsnLacpConvergenceNotif.Builder setActorSysPriority(int actorSysPriority) {
+ this.actorSysPriority = actorSysPriority;
+ this.actorSysPrioritySet = true;
+ return this;
+ }
+ @Override
+ public MacAddress getActorSysMac() {
+ return actorSysMac;
+ }
+
+ @Override
+ public OFBsnLacpConvergenceNotif.Builder setActorSysMac(MacAddress actorSysMac) {
+ this.actorSysMac = actorSysMac;
+ this.actorSysMacSet = true;
+ return this;
+ }
+ @Override
+ public int getActorPortPriority() {
+ return actorPortPriority;
+ }
+
+ @Override
+ public OFBsnLacpConvergenceNotif.Builder setActorPortPriority(int actorPortPriority) {
+ this.actorPortPriority = actorPortPriority;
+ this.actorPortPrioritySet = true;
+ return this;
+ }
+ @Override
+ public int getActorPortNum() {
+ return actorPortNum;
+ }
+
+ @Override
+ public OFBsnLacpConvergenceNotif.Builder setActorPortNum(int actorPortNum) {
+ this.actorPortNum = actorPortNum;
+ this.actorPortNumSet = true;
+ return this;
+ }
+ @Override
+ public int getActorKey() {
+ return actorKey;
+ }
+
+ @Override
+ public OFBsnLacpConvergenceNotif.Builder setActorKey(int actorKey) {
+ this.actorKey = actorKey;
+ this.actorKeySet = true;
+ return this;
+ }
+ @Override
+ public int getPartnerSysPriority() {
+ return partnerSysPriority;
+ }
+
+ @Override
+ public OFBsnLacpConvergenceNotif.Builder setPartnerSysPriority(int partnerSysPriority) {
+ this.partnerSysPriority = partnerSysPriority;
+ this.partnerSysPrioritySet = true;
+ return this;
+ }
+ @Override
+ public MacAddress getPartnerSysMac() {
+ return partnerSysMac;
+ }
+
+ @Override
+ public OFBsnLacpConvergenceNotif.Builder setPartnerSysMac(MacAddress partnerSysMac) {
+ this.partnerSysMac = partnerSysMac;
+ this.partnerSysMacSet = true;
+ return this;
+ }
+ @Override
+ public int getPartnerPortPriority() {
+ return partnerPortPriority;
+ }
+
+ @Override
+ public OFBsnLacpConvergenceNotif.Builder setPartnerPortPriority(int partnerPortPriority) {
+ this.partnerPortPriority = partnerPortPriority;
+ this.partnerPortPrioritySet = true;
+ return this;
+ }
+ @Override
+ public int getPartnerPortNum() {
+ return partnerPortNum;
+ }
+
+ @Override
+ public OFBsnLacpConvergenceNotif.Builder setPartnerPortNum(int partnerPortNum) {
+ this.partnerPortNum = partnerPortNum;
+ this.partnerPortNumSet = true;
+ return this;
+ }
+ @Override
+ public int getPartnerKey() {
+ return partnerKey;
+ }
+
+ @Override
+ public OFBsnLacpConvergenceNotif.Builder setPartnerKey(int partnerKey) {
+ this.partnerKey = partnerKey;
+ this.partnerKeySet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnLacpConvergenceNotif build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ short convergenceStatus = this.convergenceStatusSet ? this.convergenceStatus : DEFAULT_CONVERGENCE_STATUS;
+ OFPort portNo = this.portNoSet ? this.portNo : DEFAULT_PORT_NO;
+ if(portNo == null)
+ throw new NullPointerException("Property portNo must not be null");
+ int actorSysPriority = this.actorSysPrioritySet ? this.actorSysPriority : DEFAULT_ACTOR_SYS_PRIORITY;
+ MacAddress actorSysMac = this.actorSysMacSet ? this.actorSysMac : DEFAULT_ACTOR_SYS_MAC;
+ if(actorSysMac == null)
+ throw new NullPointerException("Property actorSysMac must not be null");
+ int actorPortPriority = this.actorPortPrioritySet ? this.actorPortPriority : DEFAULT_ACTOR_PORT_PRIORITY;
+ int actorPortNum = this.actorPortNumSet ? this.actorPortNum : DEFAULT_ACTOR_PORT_NUM;
+ int actorKey = this.actorKeySet ? this.actorKey : DEFAULT_ACTOR_KEY;
+ int partnerSysPriority = this.partnerSysPrioritySet ? this.partnerSysPriority : DEFAULT_PARTNER_SYS_PRIORITY;
+ MacAddress partnerSysMac = this.partnerSysMacSet ? this.partnerSysMac : DEFAULT_PARTNER_SYS_MAC;
+ if(partnerSysMac == null)
+ throw new NullPointerException("Property partnerSysMac must not be null");
+ int partnerPortPriority = this.partnerPortPrioritySet ? this.partnerPortPriority : DEFAULT_PARTNER_PORT_PRIORITY;
+ int partnerPortNum = this.partnerPortNumSet ? this.partnerPortNum : DEFAULT_PARTNER_PORT_NUM;
+ int partnerKey = this.partnerKeySet ? this.partnerKey : DEFAULT_PARTNER_KEY;
+
+
+ return new OFBsnLacpConvergenceNotifVer13(
+ xid,
+ convergenceStatus,
+ portNo,
+ actorSysPriority,
+ actorSysMac,
+ actorPortPriority,
+ actorPortNum,
+ actorKey,
+ partnerSysPriority,
+ partnerSysMac,
+ partnerPortPriority,
+ partnerPortNum,
+ partnerKey
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnLacpConvergenceNotif> {
+ @Override
+ public OFBsnLacpConvergenceNotif readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 4
+ byte type = bb.readByte();
+ if(type != (byte) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 52)
+ throw new OFParseError("Wrong length: Expected=52(52), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x2bL
+ int subtype = bb.readInt();
+ if(subtype != 0x2b)
+ throw new OFParseError("Wrong subtype: Expected=0x2bL(0x2bL), got="+subtype);
+ short convergenceStatus = U8.f(bb.readByte());
+ // pad: 3 bytes
+ bb.skipBytes(3);
+ OFPort portNo = OFPort.read4Bytes(bb);
+ int actorSysPriority = U16.f(bb.readShort());
+ MacAddress actorSysMac = MacAddress.read6Bytes(bb);
+ int actorPortPriority = U16.f(bb.readShort());
+ int actorPortNum = U16.f(bb.readShort());
+ int actorKey = U16.f(bb.readShort());
+ int partnerSysPriority = U16.f(bb.readShort());
+ MacAddress partnerSysMac = MacAddress.read6Bytes(bb);
+ int partnerPortPriority = U16.f(bb.readShort());
+ int partnerPortNum = U16.f(bb.readShort());
+ int partnerKey = U16.f(bb.readShort());
+
+ OFBsnLacpConvergenceNotifVer13 bsnLacpConvergenceNotifVer13 = new OFBsnLacpConvergenceNotifVer13(
+ xid,
+ convergenceStatus,
+ portNo,
+ actorSysPriority,
+ actorSysMac,
+ actorPortPriority,
+ actorPortNum,
+ actorKey,
+ partnerSysPriority,
+ partnerSysMac,
+ partnerPortPriority,
+ partnerPortNum,
+ partnerKey
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnLacpConvergenceNotifVer13);
+ return bsnLacpConvergenceNotifVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnLacpConvergenceNotifVer13Funnel FUNNEL = new OFBsnLacpConvergenceNotifVer13Funnel();
+ static class OFBsnLacpConvergenceNotifVer13Funnel implements Funnel<OFBsnLacpConvergenceNotifVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnLacpConvergenceNotifVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property length = 52
+ sink.putShort((short) 0x34);
+ sink.putLong(message.xid);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x2bL
+ sink.putInt(0x2b);
+ sink.putShort(message.convergenceStatus);
+ // skip pad (3 bytes)
+ message.portNo.putTo(sink);
+ sink.putInt(message.actorSysPriority);
+ message.actorSysMac.putTo(sink);
+ sink.putInt(message.actorPortPriority);
+ sink.putInt(message.actorPortNum);
+ sink.putInt(message.actorKey);
+ sink.putInt(message.partnerSysPriority);
+ message.partnerSysMac.putTo(sink);
+ sink.putInt(message.partnerPortPriority);
+ sink.putInt(message.partnerPortNum);
+ sink.putInt(message.partnerKey);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnLacpConvergenceNotifVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnLacpConvergenceNotifVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property length = 52
+ bb.writeShort((short) 0x34);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x2bL
+ bb.writeInt(0x2b);
+ bb.writeByte(U8.t(message.convergenceStatus));
+ // pad: 3 bytes
+ bb.writeZero(3);
+ message.portNo.write4Bytes(bb);
+ bb.writeShort(U16.t(message.actorSysPriority));
+ message.actorSysMac.write6Bytes(bb);
+ bb.writeShort(U16.t(message.actorPortPriority));
+ bb.writeShort(U16.t(message.actorPortNum));
+ bb.writeShort(U16.t(message.actorKey));
+ bb.writeShort(U16.t(message.partnerSysPriority));
+ message.partnerSysMac.write6Bytes(bb);
+ bb.writeShort(U16.t(message.partnerPortPriority));
+ bb.writeShort(U16.t(message.partnerPortNum));
+ bb.writeShort(U16.t(message.partnerKey));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnLacpConvergenceNotifVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("convergenceStatus=").append(convergenceStatus);
+ b.append(", ");
+ b.append("portNo=").append(portNo);
+ b.append(", ");
+ b.append("actorSysPriority=").append(actorSysPriority);
+ b.append(", ");
+ b.append("actorSysMac=").append(actorSysMac);
+ b.append(", ");
+ b.append("actorPortPriority=").append(actorPortPriority);
+ b.append(", ");
+ b.append("actorPortNum=").append(actorPortNum);
+ b.append(", ");
+ b.append("actorKey=").append(actorKey);
+ b.append(", ");
+ b.append("partnerSysPriority=").append(partnerSysPriority);
+ b.append(", ");
+ b.append("partnerSysMac=").append(partnerSysMac);
+ b.append(", ");
+ b.append("partnerPortPriority=").append(partnerPortPriority);
+ b.append(", ");
+ b.append("partnerPortNum=").append(partnerPortNum);
+ b.append(", ");
+ b.append("partnerKey=").append(partnerKey);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnLacpConvergenceNotifVer13 other = (OFBsnLacpConvergenceNotifVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if( convergenceStatus != other.convergenceStatus)
+ return false;
+ if (portNo == null) {
+ if (other.portNo != null)
+ return false;
+ } else if (!portNo.equals(other.portNo))
+ return false;
+ if( actorSysPriority != other.actorSysPriority)
+ return false;
+ if (actorSysMac == null) {
+ if (other.actorSysMac != null)
+ return false;
+ } else if (!actorSysMac.equals(other.actorSysMac))
+ return false;
+ if( actorPortPriority != other.actorPortPriority)
+ return false;
+ if( actorPortNum != other.actorPortNum)
+ return false;
+ if( actorKey != other.actorKey)
+ return false;
+ if( partnerSysPriority != other.partnerSysPriority)
+ return false;
+ if (partnerSysMac == null) {
+ if (other.partnerSysMac != null)
+ return false;
+ } else if (!partnerSysMac.equals(other.partnerSysMac))
+ return false;
+ if( partnerPortPriority != other.partnerPortPriority)
+ return false;
+ if( partnerPortNum != other.partnerPortNum)
+ return false;
+ if( partnerKey != other.partnerKey)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + convergenceStatus;
+ result = prime * result + ((portNo == null) ? 0 : portNo.hashCode());
+ result = prime * result + actorSysPriority;
+ result = prime * result + ((actorSysMac == null) ? 0 : actorSysMac.hashCode());
+ result = prime * result + actorPortPriority;
+ result = prime * result + actorPortNum;
+ result = prime * result + actorKey;
+ result = prime * result + partnerSysPriority;
+ result = prime * result + ((partnerSysMac == null) ? 0 : partnerSysMac.hashCode());
+ result = prime * result + partnerPortPriority;
+ result = prime * result + partnerPortNum;
+ result = prime * result + partnerKey;
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnLacpConvergenceStatusTSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnLacpConvergenceStatusTSerializerVer13.java
new file mode 100644
index 0000000..e60dc25
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnLacpConvergenceStatusTSerializerVer13.java
@@ -0,0 +1,79 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFBsnLacpConvergenceStatusT;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+
+public class OFBsnLacpConvergenceStatusTSerializerVer13 {
+
+ public final static byte SUCCESS_VAL = (byte) 0x0;
+ public final static byte TIMEDOUT_VAL = (byte) 0x1;
+ public final static byte OUT_OF_SYNC_VAL = (byte) 0x2;
+
+ public static OFBsnLacpConvergenceStatusT readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readByte());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, OFBsnLacpConvergenceStatusT e) {
+ bb.writeByte(toWireValue(e));
+ }
+
+ public static void putTo(OFBsnLacpConvergenceStatusT e, PrimitiveSink sink) {
+ sink.putByte(toWireValue(e));
+ }
+
+ public static OFBsnLacpConvergenceStatusT ofWireValue(byte val) {
+ switch(val) {
+ case SUCCESS_VAL:
+ return OFBsnLacpConvergenceStatusT.SUCCESS;
+ case TIMEDOUT_VAL:
+ return OFBsnLacpConvergenceStatusT.TIMEDOUT;
+ case OUT_OF_SYNC_VAL:
+ return OFBsnLacpConvergenceStatusT.OUT_OF_SYNC;
+ default:
+ throw new IllegalArgumentException("Illegal wire value for type OFBsnLacpConvergenceStatusT in version 1.3: " + val);
+ }
+ }
+
+
+ public static byte toWireValue(OFBsnLacpConvergenceStatusT e) {
+ switch(e) {
+ case SUCCESS:
+ return SUCCESS_VAL;
+ case TIMEDOUT:
+ return TIMEDOUT_VAL;
+ case OUT_OF_SYNC:
+ return OUT_OF_SYNC_VAL;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFBsnLacpConvergenceStatusT in version 1.3: " + e);
+ }
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnLacpStatsEntryVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnLacpStatsEntryVer13.java
new file mode 100644
index 0000000..6d0ac70
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnLacpStatsEntryVer13.java
@@ -0,0 +1,770 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnLacpStatsEntryVer13 implements OFBsnLacpStatsEntry {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnLacpStatsEntryVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 36;
+
+ private final static OFPort DEFAULT_PORT_NO = OFPort.ANY;
+ private final static int DEFAULT_ACTOR_SYS_PRIORITY = 0x0;
+ private final static MacAddress DEFAULT_ACTOR_SYS_MAC = MacAddress.NONE;
+ private final static int DEFAULT_ACTOR_PORT_PRIORITY = 0x0;
+ private final static int DEFAULT_ACTOR_PORT_NUM = 0x0;
+ private final static int DEFAULT_ACTOR_KEY = 0x0;
+ private final static short DEFAULT_CONVERGENCE_STATUS = (short) 0x0;
+ private final static int DEFAULT_PARTNER_SYS_PRIORITY = 0x0;
+ private final static MacAddress DEFAULT_PARTNER_SYS_MAC = MacAddress.NONE;
+ private final static int DEFAULT_PARTNER_PORT_PRIORITY = 0x0;
+ private final static int DEFAULT_PARTNER_PORT_NUM = 0x0;
+ private final static int DEFAULT_PARTNER_KEY = 0x0;
+
+ // OF message fields
+ private final OFPort portNo;
+ private final int actorSysPriority;
+ private final MacAddress actorSysMac;
+ private final int actorPortPriority;
+ private final int actorPortNum;
+ private final int actorKey;
+ private final short convergenceStatus;
+ private final int partnerSysPriority;
+ private final MacAddress partnerSysMac;
+ private final int partnerPortPriority;
+ private final int partnerPortNum;
+ private final int partnerKey;
+//
+ // Immutable default instance
+ final static OFBsnLacpStatsEntryVer13 DEFAULT = new OFBsnLacpStatsEntryVer13(
+ DEFAULT_PORT_NO, DEFAULT_ACTOR_SYS_PRIORITY, DEFAULT_ACTOR_SYS_MAC, DEFAULT_ACTOR_PORT_PRIORITY, DEFAULT_ACTOR_PORT_NUM, DEFAULT_ACTOR_KEY, DEFAULT_CONVERGENCE_STATUS, DEFAULT_PARTNER_SYS_PRIORITY, DEFAULT_PARTNER_SYS_MAC, DEFAULT_PARTNER_PORT_PRIORITY, DEFAULT_PARTNER_PORT_NUM, DEFAULT_PARTNER_KEY
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnLacpStatsEntryVer13(OFPort portNo, int actorSysPriority, MacAddress actorSysMac, int actorPortPriority, int actorPortNum, int actorKey, short convergenceStatus, int partnerSysPriority, MacAddress partnerSysMac, int partnerPortPriority, int partnerPortNum, int partnerKey) {
+ this.portNo = portNo;
+ this.actorSysPriority = actorSysPriority;
+ this.actorSysMac = actorSysMac;
+ this.actorPortPriority = actorPortPriority;
+ this.actorPortNum = actorPortNum;
+ this.actorKey = actorKey;
+ this.convergenceStatus = convergenceStatus;
+ this.partnerSysPriority = partnerSysPriority;
+ this.partnerSysMac = partnerSysMac;
+ this.partnerPortPriority = partnerPortPriority;
+ this.partnerPortNum = partnerPortNum;
+ this.partnerKey = partnerKey;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public int getActorSysPriority() {
+ return actorSysPriority;
+ }
+
+ @Override
+ public MacAddress getActorSysMac() {
+ return actorSysMac;
+ }
+
+ @Override
+ public int getActorPortPriority() {
+ return actorPortPriority;
+ }
+
+ @Override
+ public int getActorPortNum() {
+ return actorPortNum;
+ }
+
+ @Override
+ public int getActorKey() {
+ return actorKey;
+ }
+
+ @Override
+ public short getConvergenceStatus() {
+ return convergenceStatus;
+ }
+
+ @Override
+ public int getPartnerSysPriority() {
+ return partnerSysPriority;
+ }
+
+ @Override
+ public MacAddress getPartnerSysMac() {
+ return partnerSysMac;
+ }
+
+ @Override
+ public int getPartnerPortPriority() {
+ return partnerPortPriority;
+ }
+
+ @Override
+ public int getPartnerPortNum() {
+ return partnerPortNum;
+ }
+
+ @Override
+ public int getPartnerKey() {
+ return partnerKey;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFBsnLacpStatsEntry.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnLacpStatsEntry.Builder {
+ final OFBsnLacpStatsEntryVer13 parentMessage;
+
+ // OF message fields
+ private boolean portNoSet;
+ private OFPort portNo;
+ private boolean actorSysPrioritySet;
+ private int actorSysPriority;
+ private boolean actorSysMacSet;
+ private MacAddress actorSysMac;
+ private boolean actorPortPrioritySet;
+ private int actorPortPriority;
+ private boolean actorPortNumSet;
+ private int actorPortNum;
+ private boolean actorKeySet;
+ private int actorKey;
+ private boolean convergenceStatusSet;
+ private short convergenceStatus;
+ private boolean partnerSysPrioritySet;
+ private int partnerSysPriority;
+ private boolean partnerSysMacSet;
+ private MacAddress partnerSysMac;
+ private boolean partnerPortPrioritySet;
+ private int partnerPortPriority;
+ private boolean partnerPortNumSet;
+ private int partnerPortNum;
+ private boolean partnerKeySet;
+ private int partnerKey;
+
+ BuilderWithParent(OFBsnLacpStatsEntryVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public OFBsnLacpStatsEntry.Builder setPortNo(OFPort portNo) {
+ this.portNo = portNo;
+ this.portNoSet = true;
+ return this;
+ }
+ @Override
+ public int getActorSysPriority() {
+ return actorSysPriority;
+ }
+
+ @Override
+ public OFBsnLacpStatsEntry.Builder setActorSysPriority(int actorSysPriority) {
+ this.actorSysPriority = actorSysPriority;
+ this.actorSysPrioritySet = true;
+ return this;
+ }
+ @Override
+ public MacAddress getActorSysMac() {
+ return actorSysMac;
+ }
+
+ @Override
+ public OFBsnLacpStatsEntry.Builder setActorSysMac(MacAddress actorSysMac) {
+ this.actorSysMac = actorSysMac;
+ this.actorSysMacSet = true;
+ return this;
+ }
+ @Override
+ public int getActorPortPriority() {
+ return actorPortPriority;
+ }
+
+ @Override
+ public OFBsnLacpStatsEntry.Builder setActorPortPriority(int actorPortPriority) {
+ this.actorPortPriority = actorPortPriority;
+ this.actorPortPrioritySet = true;
+ return this;
+ }
+ @Override
+ public int getActorPortNum() {
+ return actorPortNum;
+ }
+
+ @Override
+ public OFBsnLacpStatsEntry.Builder setActorPortNum(int actorPortNum) {
+ this.actorPortNum = actorPortNum;
+ this.actorPortNumSet = true;
+ return this;
+ }
+ @Override
+ public int getActorKey() {
+ return actorKey;
+ }
+
+ @Override
+ public OFBsnLacpStatsEntry.Builder setActorKey(int actorKey) {
+ this.actorKey = actorKey;
+ this.actorKeySet = true;
+ return this;
+ }
+ @Override
+ public short getConvergenceStatus() {
+ return convergenceStatus;
+ }
+
+ @Override
+ public OFBsnLacpStatsEntry.Builder setConvergenceStatus(short convergenceStatus) {
+ this.convergenceStatus = convergenceStatus;
+ this.convergenceStatusSet = true;
+ return this;
+ }
+ @Override
+ public int getPartnerSysPriority() {
+ return partnerSysPriority;
+ }
+
+ @Override
+ public OFBsnLacpStatsEntry.Builder setPartnerSysPriority(int partnerSysPriority) {
+ this.partnerSysPriority = partnerSysPriority;
+ this.partnerSysPrioritySet = true;
+ return this;
+ }
+ @Override
+ public MacAddress getPartnerSysMac() {
+ return partnerSysMac;
+ }
+
+ @Override
+ public OFBsnLacpStatsEntry.Builder setPartnerSysMac(MacAddress partnerSysMac) {
+ this.partnerSysMac = partnerSysMac;
+ this.partnerSysMacSet = true;
+ return this;
+ }
+ @Override
+ public int getPartnerPortPriority() {
+ return partnerPortPriority;
+ }
+
+ @Override
+ public OFBsnLacpStatsEntry.Builder setPartnerPortPriority(int partnerPortPriority) {
+ this.partnerPortPriority = partnerPortPriority;
+ this.partnerPortPrioritySet = true;
+ return this;
+ }
+ @Override
+ public int getPartnerPortNum() {
+ return partnerPortNum;
+ }
+
+ @Override
+ public OFBsnLacpStatsEntry.Builder setPartnerPortNum(int partnerPortNum) {
+ this.partnerPortNum = partnerPortNum;
+ this.partnerPortNumSet = true;
+ return this;
+ }
+ @Override
+ public int getPartnerKey() {
+ return partnerKey;
+ }
+
+ @Override
+ public OFBsnLacpStatsEntry.Builder setPartnerKey(int partnerKey) {
+ this.partnerKey = partnerKey;
+ this.partnerKeySet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFBsnLacpStatsEntry build() {
+ OFPort portNo = this.portNoSet ? this.portNo : parentMessage.portNo;
+ if(portNo == null)
+ throw new NullPointerException("Property portNo must not be null");
+ int actorSysPriority = this.actorSysPrioritySet ? this.actorSysPriority : parentMessage.actorSysPriority;
+ MacAddress actorSysMac = this.actorSysMacSet ? this.actorSysMac : parentMessage.actorSysMac;
+ if(actorSysMac == null)
+ throw new NullPointerException("Property actorSysMac must not be null");
+ int actorPortPriority = this.actorPortPrioritySet ? this.actorPortPriority : parentMessage.actorPortPriority;
+ int actorPortNum = this.actorPortNumSet ? this.actorPortNum : parentMessage.actorPortNum;
+ int actorKey = this.actorKeySet ? this.actorKey : parentMessage.actorKey;
+ short convergenceStatus = this.convergenceStatusSet ? this.convergenceStatus : parentMessage.convergenceStatus;
+ int partnerSysPriority = this.partnerSysPrioritySet ? this.partnerSysPriority : parentMessage.partnerSysPriority;
+ MacAddress partnerSysMac = this.partnerSysMacSet ? this.partnerSysMac : parentMessage.partnerSysMac;
+ if(partnerSysMac == null)
+ throw new NullPointerException("Property partnerSysMac must not be null");
+ int partnerPortPriority = this.partnerPortPrioritySet ? this.partnerPortPriority : parentMessage.partnerPortPriority;
+ int partnerPortNum = this.partnerPortNumSet ? this.partnerPortNum : parentMessage.partnerPortNum;
+ int partnerKey = this.partnerKeySet ? this.partnerKey : parentMessage.partnerKey;
+
+ //
+ return new OFBsnLacpStatsEntryVer13(
+ portNo,
+ actorSysPriority,
+ actorSysMac,
+ actorPortPriority,
+ actorPortNum,
+ actorKey,
+ convergenceStatus,
+ partnerSysPriority,
+ partnerSysMac,
+ partnerPortPriority,
+ partnerPortNum,
+ partnerKey
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnLacpStatsEntry.Builder {
+ // OF message fields
+ private boolean portNoSet;
+ private OFPort portNo;
+ private boolean actorSysPrioritySet;
+ private int actorSysPriority;
+ private boolean actorSysMacSet;
+ private MacAddress actorSysMac;
+ private boolean actorPortPrioritySet;
+ private int actorPortPriority;
+ private boolean actorPortNumSet;
+ private int actorPortNum;
+ private boolean actorKeySet;
+ private int actorKey;
+ private boolean convergenceStatusSet;
+ private short convergenceStatus;
+ private boolean partnerSysPrioritySet;
+ private int partnerSysPriority;
+ private boolean partnerSysMacSet;
+ private MacAddress partnerSysMac;
+ private boolean partnerPortPrioritySet;
+ private int partnerPortPriority;
+ private boolean partnerPortNumSet;
+ private int partnerPortNum;
+ private boolean partnerKeySet;
+ private int partnerKey;
+
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public OFBsnLacpStatsEntry.Builder setPortNo(OFPort portNo) {
+ this.portNo = portNo;
+ this.portNoSet = true;
+ return this;
+ }
+ @Override
+ public int getActorSysPriority() {
+ return actorSysPriority;
+ }
+
+ @Override
+ public OFBsnLacpStatsEntry.Builder setActorSysPriority(int actorSysPriority) {
+ this.actorSysPriority = actorSysPriority;
+ this.actorSysPrioritySet = true;
+ return this;
+ }
+ @Override
+ public MacAddress getActorSysMac() {
+ return actorSysMac;
+ }
+
+ @Override
+ public OFBsnLacpStatsEntry.Builder setActorSysMac(MacAddress actorSysMac) {
+ this.actorSysMac = actorSysMac;
+ this.actorSysMacSet = true;
+ return this;
+ }
+ @Override
+ public int getActorPortPriority() {
+ return actorPortPriority;
+ }
+
+ @Override
+ public OFBsnLacpStatsEntry.Builder setActorPortPriority(int actorPortPriority) {
+ this.actorPortPriority = actorPortPriority;
+ this.actorPortPrioritySet = true;
+ return this;
+ }
+ @Override
+ public int getActorPortNum() {
+ return actorPortNum;
+ }
+
+ @Override
+ public OFBsnLacpStatsEntry.Builder setActorPortNum(int actorPortNum) {
+ this.actorPortNum = actorPortNum;
+ this.actorPortNumSet = true;
+ return this;
+ }
+ @Override
+ public int getActorKey() {
+ return actorKey;
+ }
+
+ @Override
+ public OFBsnLacpStatsEntry.Builder setActorKey(int actorKey) {
+ this.actorKey = actorKey;
+ this.actorKeySet = true;
+ return this;
+ }
+ @Override
+ public short getConvergenceStatus() {
+ return convergenceStatus;
+ }
+
+ @Override
+ public OFBsnLacpStatsEntry.Builder setConvergenceStatus(short convergenceStatus) {
+ this.convergenceStatus = convergenceStatus;
+ this.convergenceStatusSet = true;
+ return this;
+ }
+ @Override
+ public int getPartnerSysPriority() {
+ return partnerSysPriority;
+ }
+
+ @Override
+ public OFBsnLacpStatsEntry.Builder setPartnerSysPriority(int partnerSysPriority) {
+ this.partnerSysPriority = partnerSysPriority;
+ this.partnerSysPrioritySet = true;
+ return this;
+ }
+ @Override
+ public MacAddress getPartnerSysMac() {
+ return partnerSysMac;
+ }
+
+ @Override
+ public OFBsnLacpStatsEntry.Builder setPartnerSysMac(MacAddress partnerSysMac) {
+ this.partnerSysMac = partnerSysMac;
+ this.partnerSysMacSet = true;
+ return this;
+ }
+ @Override
+ public int getPartnerPortPriority() {
+ return partnerPortPriority;
+ }
+
+ @Override
+ public OFBsnLacpStatsEntry.Builder setPartnerPortPriority(int partnerPortPriority) {
+ this.partnerPortPriority = partnerPortPriority;
+ this.partnerPortPrioritySet = true;
+ return this;
+ }
+ @Override
+ public int getPartnerPortNum() {
+ return partnerPortNum;
+ }
+
+ @Override
+ public OFBsnLacpStatsEntry.Builder setPartnerPortNum(int partnerPortNum) {
+ this.partnerPortNum = partnerPortNum;
+ this.partnerPortNumSet = true;
+ return this;
+ }
+ @Override
+ public int getPartnerKey() {
+ return partnerKey;
+ }
+
+ @Override
+ public OFBsnLacpStatsEntry.Builder setPartnerKey(int partnerKey) {
+ this.partnerKey = partnerKey;
+ this.partnerKeySet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFBsnLacpStatsEntry build() {
+ OFPort portNo = this.portNoSet ? this.portNo : DEFAULT_PORT_NO;
+ if(portNo == null)
+ throw new NullPointerException("Property portNo must not be null");
+ int actorSysPriority = this.actorSysPrioritySet ? this.actorSysPriority : DEFAULT_ACTOR_SYS_PRIORITY;
+ MacAddress actorSysMac = this.actorSysMacSet ? this.actorSysMac : DEFAULT_ACTOR_SYS_MAC;
+ if(actorSysMac == null)
+ throw new NullPointerException("Property actorSysMac must not be null");
+ int actorPortPriority = this.actorPortPrioritySet ? this.actorPortPriority : DEFAULT_ACTOR_PORT_PRIORITY;
+ int actorPortNum = this.actorPortNumSet ? this.actorPortNum : DEFAULT_ACTOR_PORT_NUM;
+ int actorKey = this.actorKeySet ? this.actorKey : DEFAULT_ACTOR_KEY;
+ short convergenceStatus = this.convergenceStatusSet ? this.convergenceStatus : DEFAULT_CONVERGENCE_STATUS;
+ int partnerSysPriority = this.partnerSysPrioritySet ? this.partnerSysPriority : DEFAULT_PARTNER_SYS_PRIORITY;
+ MacAddress partnerSysMac = this.partnerSysMacSet ? this.partnerSysMac : DEFAULT_PARTNER_SYS_MAC;
+ if(partnerSysMac == null)
+ throw new NullPointerException("Property partnerSysMac must not be null");
+ int partnerPortPriority = this.partnerPortPrioritySet ? this.partnerPortPriority : DEFAULT_PARTNER_PORT_PRIORITY;
+ int partnerPortNum = this.partnerPortNumSet ? this.partnerPortNum : DEFAULT_PARTNER_PORT_NUM;
+ int partnerKey = this.partnerKeySet ? this.partnerKey : DEFAULT_PARTNER_KEY;
+
+
+ return new OFBsnLacpStatsEntryVer13(
+ portNo,
+ actorSysPriority,
+ actorSysMac,
+ actorPortPriority,
+ actorPortNum,
+ actorKey,
+ convergenceStatus,
+ partnerSysPriority,
+ partnerSysMac,
+ partnerPortPriority,
+ partnerPortNum,
+ partnerKey
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnLacpStatsEntry> {
+ @Override
+ public OFBsnLacpStatsEntry readFrom(ChannelBuffer bb) throws OFParseError {
+ OFPort portNo = OFPort.read4Bytes(bb);
+ int actorSysPriority = U16.f(bb.readShort());
+ MacAddress actorSysMac = MacAddress.read6Bytes(bb);
+ int actorPortPriority = U16.f(bb.readShort());
+ int actorPortNum = U16.f(bb.readShort());
+ int actorKey = U16.f(bb.readShort());
+ short convergenceStatus = U8.f(bb.readByte());
+ // pad: 1 bytes
+ bb.skipBytes(1);
+ int partnerSysPriority = U16.f(bb.readShort());
+ MacAddress partnerSysMac = MacAddress.read6Bytes(bb);
+ int partnerPortPriority = U16.f(bb.readShort());
+ int partnerPortNum = U16.f(bb.readShort());
+ int partnerKey = U16.f(bb.readShort());
+ // pad: 2 bytes
+ bb.skipBytes(2);
+
+ OFBsnLacpStatsEntryVer13 bsnLacpStatsEntryVer13 = new OFBsnLacpStatsEntryVer13(
+ portNo,
+ actorSysPriority,
+ actorSysMac,
+ actorPortPriority,
+ actorPortNum,
+ actorKey,
+ convergenceStatus,
+ partnerSysPriority,
+ partnerSysMac,
+ partnerPortPriority,
+ partnerPortNum,
+ partnerKey
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnLacpStatsEntryVer13);
+ return bsnLacpStatsEntryVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnLacpStatsEntryVer13Funnel FUNNEL = new OFBsnLacpStatsEntryVer13Funnel();
+ static class OFBsnLacpStatsEntryVer13Funnel implements Funnel<OFBsnLacpStatsEntryVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnLacpStatsEntryVer13 message, PrimitiveSink sink) {
+ message.portNo.putTo(sink);
+ sink.putInt(message.actorSysPriority);
+ message.actorSysMac.putTo(sink);
+ sink.putInt(message.actorPortPriority);
+ sink.putInt(message.actorPortNum);
+ sink.putInt(message.actorKey);
+ sink.putShort(message.convergenceStatus);
+ // skip pad (1 bytes)
+ sink.putInt(message.partnerSysPriority);
+ message.partnerSysMac.putTo(sink);
+ sink.putInt(message.partnerPortPriority);
+ sink.putInt(message.partnerPortNum);
+ sink.putInt(message.partnerKey);
+ // skip pad (2 bytes)
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnLacpStatsEntryVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnLacpStatsEntryVer13 message) {
+ message.portNo.write4Bytes(bb);
+ bb.writeShort(U16.t(message.actorSysPriority));
+ message.actorSysMac.write6Bytes(bb);
+ bb.writeShort(U16.t(message.actorPortPriority));
+ bb.writeShort(U16.t(message.actorPortNum));
+ bb.writeShort(U16.t(message.actorKey));
+ bb.writeByte(U8.t(message.convergenceStatus));
+ // pad: 1 bytes
+ bb.writeZero(1);
+ bb.writeShort(U16.t(message.partnerSysPriority));
+ message.partnerSysMac.write6Bytes(bb);
+ bb.writeShort(U16.t(message.partnerPortPriority));
+ bb.writeShort(U16.t(message.partnerPortNum));
+ bb.writeShort(U16.t(message.partnerKey));
+ // pad: 2 bytes
+ bb.writeZero(2);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnLacpStatsEntryVer13(");
+ b.append("portNo=").append(portNo);
+ b.append(", ");
+ b.append("actorSysPriority=").append(actorSysPriority);
+ b.append(", ");
+ b.append("actorSysMac=").append(actorSysMac);
+ b.append(", ");
+ b.append("actorPortPriority=").append(actorPortPriority);
+ b.append(", ");
+ b.append("actorPortNum=").append(actorPortNum);
+ b.append(", ");
+ b.append("actorKey=").append(actorKey);
+ b.append(", ");
+ b.append("convergenceStatus=").append(convergenceStatus);
+ b.append(", ");
+ b.append("partnerSysPriority=").append(partnerSysPriority);
+ b.append(", ");
+ b.append("partnerSysMac=").append(partnerSysMac);
+ b.append(", ");
+ b.append("partnerPortPriority=").append(partnerPortPriority);
+ b.append(", ");
+ b.append("partnerPortNum=").append(partnerPortNum);
+ b.append(", ");
+ b.append("partnerKey=").append(partnerKey);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnLacpStatsEntryVer13 other = (OFBsnLacpStatsEntryVer13) obj;
+
+ if (portNo == null) {
+ if (other.portNo != null)
+ return false;
+ } else if (!portNo.equals(other.portNo))
+ return false;
+ if( actorSysPriority != other.actorSysPriority)
+ return false;
+ if (actorSysMac == null) {
+ if (other.actorSysMac != null)
+ return false;
+ } else if (!actorSysMac.equals(other.actorSysMac))
+ return false;
+ if( actorPortPriority != other.actorPortPriority)
+ return false;
+ if( actorPortNum != other.actorPortNum)
+ return false;
+ if( actorKey != other.actorKey)
+ return false;
+ if( convergenceStatus != other.convergenceStatus)
+ return false;
+ if( partnerSysPriority != other.partnerSysPriority)
+ return false;
+ if (partnerSysMac == null) {
+ if (other.partnerSysMac != null)
+ return false;
+ } else if (!partnerSysMac.equals(other.partnerSysMac))
+ return false;
+ if( partnerPortPriority != other.partnerPortPriority)
+ return false;
+ if( partnerPortNum != other.partnerPortNum)
+ return false;
+ if( partnerKey != other.partnerKey)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((portNo == null) ? 0 : portNo.hashCode());
+ result = prime * result + actorSysPriority;
+ result = prime * result + ((actorSysMac == null) ? 0 : actorSysMac.hashCode());
+ result = prime * result + actorPortPriority;
+ result = prime * result + actorPortNum;
+ result = prime * result + actorKey;
+ result = prime * result + convergenceStatus;
+ result = prime * result + partnerSysPriority;
+ result = prime * result + ((partnerSysMac == null) ? 0 : partnerSysMac.hashCode());
+ result = prime * result + partnerPortPriority;
+ result = prime * result + partnerPortNum;
+ result = prime * result + partnerKey;
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnLacpStatsReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnLacpStatsReplyVer13.java
new file mode 100644
index 0000000..4662c39
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnLacpStatsReplyVer13.java
@@ -0,0 +1,458 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnLacpStatsReplyVer13 implements OFBsnLacpStatsReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnLacpStatsReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 24;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsReplyFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsReplyFlags>of();
+ private final static List<OFBsnLacpStatsEntry> DEFAULT_ENTRIES = ImmutableList.<OFBsnLacpStatsEntry>of();
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsReplyFlags> flags;
+ private final List<OFBsnLacpStatsEntry> entries;
+//
+ // Immutable default instance
+ final static OFBsnLacpStatsReplyVer13 DEFAULT = new OFBsnLacpStatsReplyVer13(
+ DEFAULT_XID, DEFAULT_FLAGS, DEFAULT_ENTRIES
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnLacpStatsReplyVer13(long xid, Set<OFStatsReplyFlags> flags, List<OFBsnLacpStatsEntry> entries) {
+ this.xid = xid;
+ this.flags = flags;
+ this.entries = entries;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x1L;
+ }
+
+ @Override
+ public List<OFBsnLacpStatsEntry> getEntries() {
+ return entries;
+ }
+
+
+
+ public OFBsnLacpStatsReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnLacpStatsReply.Builder {
+ final OFBsnLacpStatsReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean entriesSet;
+ private List<OFBsnLacpStatsEntry> entries;
+
+ BuilderWithParent(OFBsnLacpStatsReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnLacpStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnLacpStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x1L;
+ }
+
+ @Override
+ public List<OFBsnLacpStatsEntry> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFBsnLacpStatsReply.Builder setEntries(List<OFBsnLacpStatsEntry> entries) {
+ this.entries = entries;
+ this.entriesSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnLacpStatsReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ List<OFBsnLacpStatsEntry> entries = this.entriesSet ? this.entries : parentMessage.entries;
+ if(entries == null)
+ throw new NullPointerException("Property entries must not be null");
+
+ //
+ return new OFBsnLacpStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnLacpStatsReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean entriesSet;
+ private List<OFBsnLacpStatsEntry> entries;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnLacpStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnLacpStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x1L;
+ }
+
+ @Override
+ public List<OFBsnLacpStatsEntry> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFBsnLacpStatsReply.Builder setEntries(List<OFBsnLacpStatsEntry> entries) {
+ this.entries = entries;
+ this.entriesSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnLacpStatsReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ List<OFBsnLacpStatsEntry> entries = this.entriesSet ? this.entries : DEFAULT_ENTRIES;
+ if(entries == null)
+ throw new NullPointerException("Property entries must not be null");
+
+
+ return new OFBsnLacpStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnLacpStatsReply> {
+ @Override
+ public OFBsnLacpStatsReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 19
+ byte type = bb.readByte();
+ if(type != (byte) 0x13)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REPLY(19), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 65535
+ short statsType = bb.readShort();
+ if(statsType != (short) 0xffff)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.EXPERIMENTER(65535), got="+statsType);
+ Set<OFStatsReplyFlags> flags = OFStatsReplyFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x1L
+ int subtype = bb.readInt();
+ if(subtype != 0x1)
+ throw new OFParseError("Wrong subtype: Expected=0x1L(0x1L), got="+subtype);
+ List<OFBsnLacpStatsEntry> entries = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFBsnLacpStatsEntryVer13.READER);
+
+ OFBsnLacpStatsReplyVer13 bsnLacpStatsReplyVer13 = new OFBsnLacpStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnLacpStatsReplyVer13);
+ return bsnLacpStatsReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnLacpStatsReplyVer13Funnel FUNNEL = new OFBsnLacpStatsReplyVer13Funnel();
+ static class OFBsnLacpStatsReplyVer13Funnel implements Funnel<OFBsnLacpStatsReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnLacpStatsReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 19
+ sink.putByte((byte) 0x13);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property statsType = 65535
+ sink.putShort((short) 0xffff);
+ OFStatsReplyFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x1L
+ sink.putInt(0x1);
+ FunnelUtils.putList(message.entries, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnLacpStatsReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnLacpStatsReplyVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 19
+ bb.writeByte((byte) 0x13);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 65535
+ bb.writeShort((short) 0xffff);
+ OFStatsReplyFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x1L
+ bb.writeInt(0x1);
+ ChannelUtils.writeList(bb, message.entries);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnLacpStatsReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("entries=").append(entries);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnLacpStatsReplyVer13 other = (OFBsnLacpStatsReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if (entries == null) {
+ if (other.entries != null)
+ return false;
+ } else if (!entries.equals(other.entries))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * result + ((entries == null) ? 0 : entries.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnLacpStatsRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnLacpStatsRequestVer13.java
new file mode 100644
index 0000000..4995613
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnLacpStatsRequestVer13.java
@@ -0,0 +1,397 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnLacpStatsRequestVer13 implements OFBsnLacpStatsRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnLacpStatsRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 24;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsRequestFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsRequestFlags>of();
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsRequestFlags> flags;
+//
+ // Immutable default instance
+ final static OFBsnLacpStatsRequestVer13 DEFAULT = new OFBsnLacpStatsRequestVer13(
+ DEFAULT_XID, DEFAULT_FLAGS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnLacpStatsRequestVer13(long xid, Set<OFStatsRequestFlags> flags) {
+ this.xid = xid;
+ this.flags = flags;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x1L;
+ }
+
+
+
+ public OFBsnLacpStatsRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnLacpStatsRequest.Builder {
+ final OFBsnLacpStatsRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+
+ BuilderWithParent(OFBsnLacpStatsRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnLacpStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnLacpStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x1L;
+ }
+
+
+
+ @Override
+ public OFBsnLacpStatsRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+
+ //
+ return new OFBsnLacpStatsRequestVer13(
+ xid,
+ flags
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnLacpStatsRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnLacpStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnLacpStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x1L;
+ }
+
+//
+ @Override
+ public OFBsnLacpStatsRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+
+
+ return new OFBsnLacpStatsRequestVer13(
+ xid,
+ flags
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnLacpStatsRequest> {
+ @Override
+ public OFBsnLacpStatsRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 18
+ byte type = bb.readByte();
+ if(type != (byte) 0x12)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REQUEST(18), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 24)
+ throw new OFParseError("Wrong length: Expected=24(24), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 65535
+ short statsType = bb.readShort();
+ if(statsType != (short) 0xffff)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.EXPERIMENTER(65535), got="+statsType);
+ Set<OFStatsRequestFlags> flags = OFStatsRequestFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x1L
+ int subtype = bb.readInt();
+ if(subtype != 0x1)
+ throw new OFParseError("Wrong subtype: Expected=0x1L(0x1L), got="+subtype);
+
+ OFBsnLacpStatsRequestVer13 bsnLacpStatsRequestVer13 = new OFBsnLacpStatsRequestVer13(
+ xid,
+ flags
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnLacpStatsRequestVer13);
+ return bsnLacpStatsRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnLacpStatsRequestVer13Funnel FUNNEL = new OFBsnLacpStatsRequestVer13Funnel();
+ static class OFBsnLacpStatsRequestVer13Funnel implements Funnel<OFBsnLacpStatsRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnLacpStatsRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 18
+ sink.putByte((byte) 0x12);
+ // fixed value property length = 24
+ sink.putShort((short) 0x18);
+ sink.putLong(message.xid);
+ // fixed value property statsType = 65535
+ sink.putShort((short) 0xffff);
+ OFStatsRequestFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x1L
+ sink.putInt(0x1);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnLacpStatsRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnLacpStatsRequestVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 18
+ bb.writeByte((byte) 0x12);
+ // fixed value property length = 24
+ bb.writeShort((short) 0x18);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 65535
+ bb.writeShort((short) 0xffff);
+ OFStatsRequestFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x1L
+ bb.writeInt(0x1);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnLacpStatsRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnLacpStatsRequestVer13 other = (OFBsnLacpStatsRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnLogVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnLogVer13.java
new file mode 100644
index 0000000..7c2c1a2
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnLogVer13.java
@@ -0,0 +1,423 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnLogVer13 implements OFBsnLog {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnLogVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 17;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static String DEFAULT_DATA = "";
+
+ // OF message fields
+ private final long xid;
+ private final OFBsnLoglevel loglevel;
+ private final String data;
+//
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnLogVer13(long xid, OFBsnLoglevel loglevel, String data) {
+ this.xid = xid;
+ this.loglevel = loglevel;
+ this.data = data;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x3fL;
+ }
+
+ @Override
+ public OFBsnLoglevel getLoglevel() {
+ return loglevel;
+ }
+
+ @Override
+ public String getData() {
+ return data;
+ }
+
+
+
+ public OFBsnLog.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnLog.Builder {
+ final OFBsnLogVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean loglevelSet;
+ private OFBsnLoglevel loglevel;
+ private boolean dataSet;
+ private String data;
+
+ BuilderWithParent(OFBsnLogVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnLog.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x3fL;
+ }
+
+ @Override
+ public OFBsnLoglevel getLoglevel() {
+ return loglevel;
+ }
+
+ @Override
+ public OFBsnLog.Builder setLoglevel(OFBsnLoglevel loglevel) {
+ this.loglevel = loglevel;
+ this.loglevelSet = true;
+ return this;
+ }
+ @Override
+ public String getData() {
+ return data;
+ }
+
+ @Override
+ public OFBsnLog.Builder setData(String data) {
+ this.data = data;
+ this.dataSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnLog build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ OFBsnLoglevel loglevel = this.loglevelSet ? this.loglevel : parentMessage.loglevel;
+ if(loglevel == null)
+ throw new NullPointerException("Property loglevel must not be null");
+ String data = this.dataSet ? this.data : parentMessage.data;
+ if(data == null)
+ throw new NullPointerException("Property data must not be null");
+
+ //
+ return new OFBsnLogVer13(
+ xid,
+ loglevel,
+ data
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnLog.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean loglevelSet;
+ private OFBsnLoglevel loglevel;
+ private boolean dataSet;
+ private String data;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnLog.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x3fL;
+ }
+
+ @Override
+ public OFBsnLoglevel getLoglevel() {
+ return loglevel;
+ }
+
+ @Override
+ public OFBsnLog.Builder setLoglevel(OFBsnLoglevel loglevel) {
+ this.loglevel = loglevel;
+ this.loglevelSet = true;
+ return this;
+ }
+ @Override
+ public String getData() {
+ return data;
+ }
+
+ @Override
+ public OFBsnLog.Builder setData(String data) {
+ this.data = data;
+ this.dataSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnLog build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ if(!this.loglevelSet)
+ throw new IllegalStateException("Property loglevel doesn't have default value -- must be set");
+ if(loglevel == null)
+ throw new NullPointerException("Property loglevel must not be null");
+ String data = this.dataSet ? this.data : DEFAULT_DATA;
+ if(data == null)
+ throw new NullPointerException("Property data must not be null");
+
+
+ return new OFBsnLogVer13(
+ xid,
+ loglevel,
+ data
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnLog> {
+ @Override
+ public OFBsnLog readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 4
+ byte type = bb.readByte();
+ if(type != (byte) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x3fL
+ int subtype = bb.readInt();
+ if(subtype != 0x3f)
+ throw new OFParseError("Wrong subtype: Expected=0x3fL(0x3fL), got="+subtype);
+ OFBsnLoglevel loglevel = OFBsnLoglevelSerializerVer13.readFrom(bb);
+ String data = ChannelUtils.readFixedLengthString(bb, length - (bb.readerIndex() - start));
+
+ OFBsnLogVer13 bsnLogVer13 = new OFBsnLogVer13(
+ xid,
+ loglevel,
+ data
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnLogVer13);
+ return bsnLogVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnLogVer13Funnel FUNNEL = new OFBsnLogVer13Funnel();
+ static class OFBsnLogVer13Funnel implements Funnel<OFBsnLogVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnLogVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 4
+ sink.putByte((byte) 0x4);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x3fL
+ sink.putInt(0x3f);
+ OFBsnLoglevelSerializerVer13.putTo(message.loglevel, sink);
+ sink.putUnencodedChars(message.data);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnLogVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnLogVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 4
+ bb.writeByte((byte) 0x4);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x3fL
+ bb.writeInt(0x3f);
+ OFBsnLoglevelSerializerVer13.writeTo(bb, message.loglevel);
+ ChannelUtils.writeFixedLengthString(bb, message.data, message.data.length());
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnLogVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("loglevel=").append(loglevel);
+ b.append(", ");
+ b.append("data=").append(data);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnLogVer13 other = (OFBsnLogVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (loglevel == null) {
+ if (other.loglevel != null)
+ return false;
+ } else if (!loglevel.equals(other.loglevel))
+ return false;
+ if (data == null) {
+ if (other.data != null)
+ return false;
+ } else if (!data.equals(other.data))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((loglevel == null) ? 0 : loglevel.hashCode());
+ result = prime * result + ((data == null) ? 0 : data.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnLoglevelSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnLoglevelSerializerVer13.java
new file mode 100644
index 0000000..2f26b4c
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnLoglevelSerializerVer13.java
@@ -0,0 +1,94 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFBsnLoglevel;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+
+public class OFBsnLoglevelSerializerVer13 {
+
+ public final static byte BSN_LOGLEVEL_MSG_VAL = (byte) 0x0;
+ public final static byte BSN_LOGLEVEL_ERROR_VAL = (byte) 0x1;
+ public final static byte BSN_LOGLEVEL_WARN_VAL = (byte) 0x2;
+ public final static byte BSN_LOGLEVEL_INFO_VAL = (byte) 0x3;
+ public final static byte BSN_LOGLEVEL_VERBOSE_VAL = (byte) 0x4;
+ public final static byte BSN_LOGLEVEL_TRACE_VAL = (byte) 0x5;
+
+ public static OFBsnLoglevel readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readByte());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, OFBsnLoglevel e) {
+ bb.writeByte(toWireValue(e));
+ }
+
+ public static void putTo(OFBsnLoglevel e, PrimitiveSink sink) {
+ sink.putByte(toWireValue(e));
+ }
+
+ public static OFBsnLoglevel ofWireValue(byte val) {
+ switch(val) {
+ case BSN_LOGLEVEL_MSG_VAL:
+ return OFBsnLoglevel.BSN_LOGLEVEL_MSG;
+ case BSN_LOGLEVEL_ERROR_VAL:
+ return OFBsnLoglevel.BSN_LOGLEVEL_ERROR;
+ case BSN_LOGLEVEL_WARN_VAL:
+ return OFBsnLoglevel.BSN_LOGLEVEL_WARN;
+ case BSN_LOGLEVEL_INFO_VAL:
+ return OFBsnLoglevel.BSN_LOGLEVEL_INFO;
+ case BSN_LOGLEVEL_VERBOSE_VAL:
+ return OFBsnLoglevel.BSN_LOGLEVEL_VERBOSE;
+ case BSN_LOGLEVEL_TRACE_VAL:
+ return OFBsnLoglevel.BSN_LOGLEVEL_TRACE;
+ default:
+ throw new IllegalArgumentException("Illegal wire value for type OFBsnLoglevel in version 1.3: " + val);
+ }
+ }
+
+
+ public static byte toWireValue(OFBsnLoglevel e) {
+ switch(e) {
+ case BSN_LOGLEVEL_MSG:
+ return BSN_LOGLEVEL_MSG_VAL;
+ case BSN_LOGLEVEL_ERROR:
+ return BSN_LOGLEVEL_ERROR_VAL;
+ case BSN_LOGLEVEL_WARN:
+ return BSN_LOGLEVEL_WARN_VAL;
+ case BSN_LOGLEVEL_INFO:
+ return BSN_LOGLEVEL_INFO_VAL;
+ case BSN_LOGLEVEL_VERBOSE:
+ return BSN_LOGLEVEL_VERBOSE_VAL;
+ case BSN_LOGLEVEL_TRACE:
+ return BSN_LOGLEVEL_TRACE_VAL;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFBsnLoglevel in version 1.3: " + e);
+ }
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnPduRxReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnPduRxReplyVer13.java
new file mode 100644
index 0000000..42f8184
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnPduRxReplyVer13.java
@@ -0,0 +1,462 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnPduRxReplyVer13 implements OFBsnPduRxReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnPduRxReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 25;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static long DEFAULT_STATUS = 0x0L;
+ private final static OFPort DEFAULT_PORT_NO = OFPort.ANY;
+ private final static short DEFAULT_SLOT_NUM = (short) 0x0;
+
+ // OF message fields
+ private final long xid;
+ private final long status;
+ private final OFPort portNo;
+ private final short slotNum;
+//
+ // Immutable default instance
+ final static OFBsnPduRxReplyVer13 DEFAULT = new OFBsnPduRxReplyVer13(
+ DEFAULT_XID, DEFAULT_STATUS, DEFAULT_PORT_NO, DEFAULT_SLOT_NUM
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnPduRxReplyVer13(long xid, long status, OFPort portNo, short slotNum) {
+ this.xid = xid;
+ this.status = status;
+ this.portNo = portNo;
+ this.slotNum = slotNum;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x22L;
+ }
+
+ @Override
+ public long getStatus() {
+ return status;
+ }
+
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public short getSlotNum() {
+ return slotNum;
+ }
+
+
+
+ public OFBsnPduRxReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnPduRxReply.Builder {
+ final OFBsnPduRxReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean statusSet;
+ private long status;
+ private boolean portNoSet;
+ private OFPort portNo;
+ private boolean slotNumSet;
+ private short slotNum;
+
+ BuilderWithParent(OFBsnPduRxReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnPduRxReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x22L;
+ }
+
+ @Override
+ public long getStatus() {
+ return status;
+ }
+
+ @Override
+ public OFBsnPduRxReply.Builder setStatus(long status) {
+ this.status = status;
+ this.statusSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public OFBsnPduRxReply.Builder setPortNo(OFPort portNo) {
+ this.portNo = portNo;
+ this.portNoSet = true;
+ return this;
+ }
+ @Override
+ public short getSlotNum() {
+ return slotNum;
+ }
+
+ @Override
+ public OFBsnPduRxReply.Builder setSlotNum(short slotNum) {
+ this.slotNum = slotNum;
+ this.slotNumSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnPduRxReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ long status = this.statusSet ? this.status : parentMessage.status;
+ OFPort portNo = this.portNoSet ? this.portNo : parentMessage.portNo;
+ if(portNo == null)
+ throw new NullPointerException("Property portNo must not be null");
+ short slotNum = this.slotNumSet ? this.slotNum : parentMessage.slotNum;
+
+ //
+ return new OFBsnPduRxReplyVer13(
+ xid,
+ status,
+ portNo,
+ slotNum
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnPduRxReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean statusSet;
+ private long status;
+ private boolean portNoSet;
+ private OFPort portNo;
+ private boolean slotNumSet;
+ private short slotNum;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnPduRxReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x22L;
+ }
+
+ @Override
+ public long getStatus() {
+ return status;
+ }
+
+ @Override
+ public OFBsnPduRxReply.Builder setStatus(long status) {
+ this.status = status;
+ this.statusSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public OFBsnPduRxReply.Builder setPortNo(OFPort portNo) {
+ this.portNo = portNo;
+ this.portNoSet = true;
+ return this;
+ }
+ @Override
+ public short getSlotNum() {
+ return slotNum;
+ }
+
+ @Override
+ public OFBsnPduRxReply.Builder setSlotNum(short slotNum) {
+ this.slotNum = slotNum;
+ this.slotNumSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnPduRxReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ long status = this.statusSet ? this.status : DEFAULT_STATUS;
+ OFPort portNo = this.portNoSet ? this.portNo : DEFAULT_PORT_NO;
+ if(portNo == null)
+ throw new NullPointerException("Property portNo must not be null");
+ short slotNum = this.slotNumSet ? this.slotNum : DEFAULT_SLOT_NUM;
+
+
+ return new OFBsnPduRxReplyVer13(
+ xid,
+ status,
+ portNo,
+ slotNum
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnPduRxReply> {
+ @Override
+ public OFBsnPduRxReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 4
+ byte type = bb.readByte();
+ if(type != (byte) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 25)
+ throw new OFParseError("Wrong length: Expected=25(25), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x22L
+ int subtype = bb.readInt();
+ if(subtype != 0x22)
+ throw new OFParseError("Wrong subtype: Expected=0x22L(0x22L), got="+subtype);
+ long status = U32.f(bb.readInt());
+ OFPort portNo = OFPort.read4Bytes(bb);
+ short slotNum = U8.f(bb.readByte());
+
+ OFBsnPduRxReplyVer13 bsnPduRxReplyVer13 = new OFBsnPduRxReplyVer13(
+ xid,
+ status,
+ portNo,
+ slotNum
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnPduRxReplyVer13);
+ return bsnPduRxReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnPduRxReplyVer13Funnel FUNNEL = new OFBsnPduRxReplyVer13Funnel();
+ static class OFBsnPduRxReplyVer13Funnel implements Funnel<OFBsnPduRxReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnPduRxReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property length = 25
+ sink.putShort((short) 0x19);
+ sink.putLong(message.xid);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x22L
+ sink.putInt(0x22);
+ sink.putLong(message.status);
+ message.portNo.putTo(sink);
+ sink.putShort(message.slotNum);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnPduRxReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnPduRxReplyVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property length = 25
+ bb.writeShort((short) 0x19);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x22L
+ bb.writeInt(0x22);
+ bb.writeInt(U32.t(message.status));
+ message.portNo.write4Bytes(bb);
+ bb.writeByte(U8.t(message.slotNum));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnPduRxReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("status=").append(status);
+ b.append(", ");
+ b.append("portNo=").append(portNo);
+ b.append(", ");
+ b.append("slotNum=").append(slotNum);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnPduRxReplyVer13 other = (OFBsnPduRxReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if( status != other.status)
+ return false;
+ if (portNo == null) {
+ if (other.portNo != null)
+ return false;
+ } else if (!portNo.equals(other.portNo))
+ return false;
+ if( slotNum != other.slotNum)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * (int) (status ^ (status >>> 32));
+ result = prime * result + ((portNo == null) ? 0 : portNo.hashCode());
+ result = prime * result + slotNum;
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnPduRxRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnPduRxRequestVer13.java
new file mode 100644
index 0000000..cf6463e
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnPduRxRequestVer13.java
@@ -0,0 +1,524 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+import java.util.Arrays;
+
+class OFBsnPduRxRequestVer13 implements OFBsnPduRxRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnPduRxRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 28;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static long DEFAULT_TIMEOUT_MS = 0x0L;
+ private final static OFPort DEFAULT_PORT_NO = OFPort.ANY;
+ private final static short DEFAULT_SLOT_NUM = (short) 0x0;
+ private final static byte[] DEFAULT_DATA = new byte[0];
+
+ // OF message fields
+ private final long xid;
+ private final long timeoutMs;
+ private final OFPort portNo;
+ private final short slotNum;
+ private final byte[] data;
+//
+ // Immutable default instance
+ final static OFBsnPduRxRequestVer13 DEFAULT = new OFBsnPduRxRequestVer13(
+ DEFAULT_XID, DEFAULT_TIMEOUT_MS, DEFAULT_PORT_NO, DEFAULT_SLOT_NUM, DEFAULT_DATA
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnPduRxRequestVer13(long xid, long timeoutMs, OFPort portNo, short slotNum, byte[] data) {
+ this.xid = xid;
+ this.timeoutMs = timeoutMs;
+ this.portNo = portNo;
+ this.slotNum = slotNum;
+ this.data = data;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x21L;
+ }
+
+ @Override
+ public long getTimeoutMs() {
+ return timeoutMs;
+ }
+
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public short getSlotNum() {
+ return slotNum;
+ }
+
+ @Override
+ public byte[] getData() {
+ return data;
+ }
+
+
+
+ public OFBsnPduRxRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnPduRxRequest.Builder {
+ final OFBsnPduRxRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean timeoutMsSet;
+ private long timeoutMs;
+ private boolean portNoSet;
+ private OFPort portNo;
+ private boolean slotNumSet;
+ private short slotNum;
+ private boolean dataSet;
+ private byte[] data;
+
+ BuilderWithParent(OFBsnPduRxRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnPduRxRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x21L;
+ }
+
+ @Override
+ public long getTimeoutMs() {
+ return timeoutMs;
+ }
+
+ @Override
+ public OFBsnPduRxRequest.Builder setTimeoutMs(long timeoutMs) {
+ this.timeoutMs = timeoutMs;
+ this.timeoutMsSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public OFBsnPduRxRequest.Builder setPortNo(OFPort portNo) {
+ this.portNo = portNo;
+ this.portNoSet = true;
+ return this;
+ }
+ @Override
+ public short getSlotNum() {
+ return slotNum;
+ }
+
+ @Override
+ public OFBsnPduRxRequest.Builder setSlotNum(short slotNum) {
+ this.slotNum = slotNum;
+ this.slotNumSet = true;
+ return this;
+ }
+ @Override
+ public byte[] getData() {
+ return data;
+ }
+
+ @Override
+ public OFBsnPduRxRequest.Builder setData(byte[] data) {
+ this.data = data;
+ this.dataSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnPduRxRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ long timeoutMs = this.timeoutMsSet ? this.timeoutMs : parentMessage.timeoutMs;
+ OFPort portNo = this.portNoSet ? this.portNo : parentMessage.portNo;
+ if(portNo == null)
+ throw new NullPointerException("Property portNo must not be null");
+ short slotNum = this.slotNumSet ? this.slotNum : parentMessage.slotNum;
+ byte[] data = this.dataSet ? this.data : parentMessage.data;
+ if(data == null)
+ throw new NullPointerException("Property data must not be null");
+
+ //
+ return new OFBsnPduRxRequestVer13(
+ xid,
+ timeoutMs,
+ portNo,
+ slotNum,
+ data
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnPduRxRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean timeoutMsSet;
+ private long timeoutMs;
+ private boolean portNoSet;
+ private OFPort portNo;
+ private boolean slotNumSet;
+ private short slotNum;
+ private boolean dataSet;
+ private byte[] data;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnPduRxRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x21L;
+ }
+
+ @Override
+ public long getTimeoutMs() {
+ return timeoutMs;
+ }
+
+ @Override
+ public OFBsnPduRxRequest.Builder setTimeoutMs(long timeoutMs) {
+ this.timeoutMs = timeoutMs;
+ this.timeoutMsSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public OFBsnPduRxRequest.Builder setPortNo(OFPort portNo) {
+ this.portNo = portNo;
+ this.portNoSet = true;
+ return this;
+ }
+ @Override
+ public short getSlotNum() {
+ return slotNum;
+ }
+
+ @Override
+ public OFBsnPduRxRequest.Builder setSlotNum(short slotNum) {
+ this.slotNum = slotNum;
+ this.slotNumSet = true;
+ return this;
+ }
+ @Override
+ public byte[] getData() {
+ return data;
+ }
+
+ @Override
+ public OFBsnPduRxRequest.Builder setData(byte[] data) {
+ this.data = data;
+ this.dataSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnPduRxRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ long timeoutMs = this.timeoutMsSet ? this.timeoutMs : DEFAULT_TIMEOUT_MS;
+ OFPort portNo = this.portNoSet ? this.portNo : DEFAULT_PORT_NO;
+ if(portNo == null)
+ throw new NullPointerException("Property portNo must not be null");
+ short slotNum = this.slotNumSet ? this.slotNum : DEFAULT_SLOT_NUM;
+ byte[] data = this.dataSet ? this.data : DEFAULT_DATA;
+ if(data == null)
+ throw new NullPointerException("Property data must not be null");
+
+
+ return new OFBsnPduRxRequestVer13(
+ xid,
+ timeoutMs,
+ portNo,
+ slotNum,
+ data
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnPduRxRequest> {
+ @Override
+ public OFBsnPduRxRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 4
+ byte type = bb.readByte();
+ if(type != (byte) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x21L
+ int subtype = bb.readInt();
+ if(subtype != 0x21)
+ throw new OFParseError("Wrong subtype: Expected=0x21L(0x21L), got="+subtype);
+ long timeoutMs = U32.f(bb.readInt());
+ OFPort portNo = OFPort.read4Bytes(bb);
+ short slotNum = U8.f(bb.readByte());
+ // pad: 3 bytes
+ bb.skipBytes(3);
+ byte[] data = ChannelUtils.readBytes(bb, length - (bb.readerIndex() - start));
+
+ OFBsnPduRxRequestVer13 bsnPduRxRequestVer13 = new OFBsnPduRxRequestVer13(
+ xid,
+ timeoutMs,
+ portNo,
+ slotNum,
+ data
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnPduRxRequestVer13);
+ return bsnPduRxRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnPduRxRequestVer13Funnel FUNNEL = new OFBsnPduRxRequestVer13Funnel();
+ static class OFBsnPduRxRequestVer13Funnel implements Funnel<OFBsnPduRxRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnPduRxRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 4
+ sink.putByte((byte) 0x4);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x21L
+ sink.putInt(0x21);
+ sink.putLong(message.timeoutMs);
+ message.portNo.putTo(sink);
+ sink.putShort(message.slotNum);
+ // skip pad (3 bytes)
+ sink.putBytes(message.data);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnPduRxRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnPduRxRequestVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 4
+ bb.writeByte((byte) 0x4);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x21L
+ bb.writeInt(0x21);
+ bb.writeInt(U32.t(message.timeoutMs));
+ message.portNo.write4Bytes(bb);
+ bb.writeByte(U8.t(message.slotNum));
+ // pad: 3 bytes
+ bb.writeZero(3);
+ bb.writeBytes(message.data);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnPduRxRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("timeoutMs=").append(timeoutMs);
+ b.append(", ");
+ b.append("portNo=").append(portNo);
+ b.append(", ");
+ b.append("slotNum=").append(slotNum);
+ b.append(", ");
+ b.append("data=").append(Arrays.toString(data));
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnPduRxRequestVer13 other = (OFBsnPduRxRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if( timeoutMs != other.timeoutMs)
+ return false;
+ if (portNo == null) {
+ if (other.portNo != null)
+ return false;
+ } else if (!portNo.equals(other.portNo))
+ return false;
+ if( slotNum != other.slotNum)
+ return false;
+ if (!Arrays.equals(data, other.data))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * (int) (timeoutMs ^ (timeoutMs >>> 32));
+ result = prime * result + ((portNo == null) ? 0 : portNo.hashCode());
+ result = prime * result + slotNum;
+ result = prime * result + Arrays.hashCode(data);
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnPduRxTimeoutVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnPduRxTimeoutVer13.java
new file mode 100644
index 0000000..061f8b7
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnPduRxTimeoutVer13.java
@@ -0,0 +1,415 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnPduRxTimeoutVer13 implements OFBsnPduRxTimeout {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnPduRxTimeoutVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 21;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static OFPort DEFAULT_PORT_NO = OFPort.ANY;
+ private final static short DEFAULT_SLOT_NUM = (short) 0x0;
+
+ // OF message fields
+ private final long xid;
+ private final OFPort portNo;
+ private final short slotNum;
+//
+ // Immutable default instance
+ final static OFBsnPduRxTimeoutVer13 DEFAULT = new OFBsnPduRxTimeoutVer13(
+ DEFAULT_XID, DEFAULT_PORT_NO, DEFAULT_SLOT_NUM
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnPduRxTimeoutVer13(long xid, OFPort portNo, short slotNum) {
+ this.xid = xid;
+ this.portNo = portNo;
+ this.slotNum = slotNum;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x23L;
+ }
+
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public short getSlotNum() {
+ return slotNum;
+ }
+
+
+
+ public OFBsnPduRxTimeout.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnPduRxTimeout.Builder {
+ final OFBsnPduRxTimeoutVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean portNoSet;
+ private OFPort portNo;
+ private boolean slotNumSet;
+ private short slotNum;
+
+ BuilderWithParent(OFBsnPduRxTimeoutVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnPduRxTimeout.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x23L;
+ }
+
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public OFBsnPduRxTimeout.Builder setPortNo(OFPort portNo) {
+ this.portNo = portNo;
+ this.portNoSet = true;
+ return this;
+ }
+ @Override
+ public short getSlotNum() {
+ return slotNum;
+ }
+
+ @Override
+ public OFBsnPduRxTimeout.Builder setSlotNum(short slotNum) {
+ this.slotNum = slotNum;
+ this.slotNumSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnPduRxTimeout build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ OFPort portNo = this.portNoSet ? this.portNo : parentMessage.portNo;
+ if(portNo == null)
+ throw new NullPointerException("Property portNo must not be null");
+ short slotNum = this.slotNumSet ? this.slotNum : parentMessage.slotNum;
+
+ //
+ return new OFBsnPduRxTimeoutVer13(
+ xid,
+ portNo,
+ slotNum
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnPduRxTimeout.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean portNoSet;
+ private OFPort portNo;
+ private boolean slotNumSet;
+ private short slotNum;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnPduRxTimeout.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x23L;
+ }
+
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public OFBsnPduRxTimeout.Builder setPortNo(OFPort portNo) {
+ this.portNo = portNo;
+ this.portNoSet = true;
+ return this;
+ }
+ @Override
+ public short getSlotNum() {
+ return slotNum;
+ }
+
+ @Override
+ public OFBsnPduRxTimeout.Builder setSlotNum(short slotNum) {
+ this.slotNum = slotNum;
+ this.slotNumSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnPduRxTimeout build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ OFPort portNo = this.portNoSet ? this.portNo : DEFAULT_PORT_NO;
+ if(portNo == null)
+ throw new NullPointerException("Property portNo must not be null");
+ short slotNum = this.slotNumSet ? this.slotNum : DEFAULT_SLOT_NUM;
+
+
+ return new OFBsnPduRxTimeoutVer13(
+ xid,
+ portNo,
+ slotNum
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnPduRxTimeout> {
+ @Override
+ public OFBsnPduRxTimeout readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 4
+ byte type = bb.readByte();
+ if(type != (byte) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 21)
+ throw new OFParseError("Wrong length: Expected=21(21), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x23L
+ int subtype = bb.readInt();
+ if(subtype != 0x23)
+ throw new OFParseError("Wrong subtype: Expected=0x23L(0x23L), got="+subtype);
+ OFPort portNo = OFPort.read4Bytes(bb);
+ short slotNum = U8.f(bb.readByte());
+
+ OFBsnPduRxTimeoutVer13 bsnPduRxTimeoutVer13 = new OFBsnPduRxTimeoutVer13(
+ xid,
+ portNo,
+ slotNum
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnPduRxTimeoutVer13);
+ return bsnPduRxTimeoutVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnPduRxTimeoutVer13Funnel FUNNEL = new OFBsnPduRxTimeoutVer13Funnel();
+ static class OFBsnPduRxTimeoutVer13Funnel implements Funnel<OFBsnPduRxTimeoutVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnPduRxTimeoutVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property length = 21
+ sink.putShort((short) 0x15);
+ sink.putLong(message.xid);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x23L
+ sink.putInt(0x23);
+ message.portNo.putTo(sink);
+ sink.putShort(message.slotNum);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnPduRxTimeoutVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnPduRxTimeoutVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property length = 21
+ bb.writeShort((short) 0x15);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x23L
+ bb.writeInt(0x23);
+ message.portNo.write4Bytes(bb);
+ bb.writeByte(U8.t(message.slotNum));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnPduRxTimeoutVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("portNo=").append(portNo);
+ b.append(", ");
+ b.append("slotNum=").append(slotNum);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnPduRxTimeoutVer13 other = (OFBsnPduRxTimeoutVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (portNo == null) {
+ if (other.portNo != null)
+ return false;
+ } else if (!portNo.equals(other.portNo))
+ return false;
+ if( slotNum != other.slotNum)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((portNo == null) ? 0 : portNo.hashCode());
+ result = prime * result + slotNum;
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnPduSlotNumTSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnPduSlotNumTSerializerVer13.java
new file mode 100644
index 0000000..2bd51e2
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnPduSlotNumTSerializerVer13.java
@@ -0,0 +1,69 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFBsnPduSlotNumT;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+
+public class OFBsnPduSlotNumTSerializerVer13 {
+
+ public final static byte PDU_SLOT_NUM_ANY_VAL = (byte) 0xff;
+
+ public static OFBsnPduSlotNumT readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readByte());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, OFBsnPduSlotNumT e) {
+ bb.writeByte(toWireValue(e));
+ }
+
+ public static void putTo(OFBsnPduSlotNumT e, PrimitiveSink sink) {
+ sink.putByte(toWireValue(e));
+ }
+
+ public static OFBsnPduSlotNumT ofWireValue(byte val) {
+ switch(val) {
+ case PDU_SLOT_NUM_ANY_VAL:
+ return OFBsnPduSlotNumT.PDU_SLOT_NUM_ANY;
+ default:
+ throw new IllegalArgumentException("Illegal wire value for type OFBsnPduSlotNumT in version 1.3: " + val);
+ }
+ }
+
+
+ public static byte toWireValue(OFBsnPduSlotNumT e) {
+ switch(e) {
+ case PDU_SLOT_NUM_ANY:
+ return PDU_SLOT_NUM_ANY_VAL;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFBsnPduSlotNumT in version 1.3: " + e);
+ }
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnPduTxReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnPduTxReplyVer13.java
new file mode 100644
index 0000000..2c8c0ca
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnPduTxReplyVer13.java
@@ -0,0 +1,462 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnPduTxReplyVer13 implements OFBsnPduTxReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnPduTxReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 25;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static long DEFAULT_STATUS = 0x0L;
+ private final static OFPort DEFAULT_PORT_NO = OFPort.ANY;
+ private final static short DEFAULT_SLOT_NUM = (short) 0x0;
+
+ // OF message fields
+ private final long xid;
+ private final long status;
+ private final OFPort portNo;
+ private final short slotNum;
+//
+ // Immutable default instance
+ final static OFBsnPduTxReplyVer13 DEFAULT = new OFBsnPduTxReplyVer13(
+ DEFAULT_XID, DEFAULT_STATUS, DEFAULT_PORT_NO, DEFAULT_SLOT_NUM
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnPduTxReplyVer13(long xid, long status, OFPort portNo, short slotNum) {
+ this.xid = xid;
+ this.status = status;
+ this.portNo = portNo;
+ this.slotNum = slotNum;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x20L;
+ }
+
+ @Override
+ public long getStatus() {
+ return status;
+ }
+
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public short getSlotNum() {
+ return slotNum;
+ }
+
+
+
+ public OFBsnPduTxReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnPduTxReply.Builder {
+ final OFBsnPduTxReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean statusSet;
+ private long status;
+ private boolean portNoSet;
+ private OFPort portNo;
+ private boolean slotNumSet;
+ private short slotNum;
+
+ BuilderWithParent(OFBsnPduTxReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnPduTxReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x20L;
+ }
+
+ @Override
+ public long getStatus() {
+ return status;
+ }
+
+ @Override
+ public OFBsnPduTxReply.Builder setStatus(long status) {
+ this.status = status;
+ this.statusSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public OFBsnPduTxReply.Builder setPortNo(OFPort portNo) {
+ this.portNo = portNo;
+ this.portNoSet = true;
+ return this;
+ }
+ @Override
+ public short getSlotNum() {
+ return slotNum;
+ }
+
+ @Override
+ public OFBsnPduTxReply.Builder setSlotNum(short slotNum) {
+ this.slotNum = slotNum;
+ this.slotNumSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnPduTxReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ long status = this.statusSet ? this.status : parentMessage.status;
+ OFPort portNo = this.portNoSet ? this.portNo : parentMessage.portNo;
+ if(portNo == null)
+ throw new NullPointerException("Property portNo must not be null");
+ short slotNum = this.slotNumSet ? this.slotNum : parentMessage.slotNum;
+
+ //
+ return new OFBsnPduTxReplyVer13(
+ xid,
+ status,
+ portNo,
+ slotNum
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnPduTxReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean statusSet;
+ private long status;
+ private boolean portNoSet;
+ private OFPort portNo;
+ private boolean slotNumSet;
+ private short slotNum;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnPduTxReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x20L;
+ }
+
+ @Override
+ public long getStatus() {
+ return status;
+ }
+
+ @Override
+ public OFBsnPduTxReply.Builder setStatus(long status) {
+ this.status = status;
+ this.statusSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public OFBsnPduTxReply.Builder setPortNo(OFPort portNo) {
+ this.portNo = portNo;
+ this.portNoSet = true;
+ return this;
+ }
+ @Override
+ public short getSlotNum() {
+ return slotNum;
+ }
+
+ @Override
+ public OFBsnPduTxReply.Builder setSlotNum(short slotNum) {
+ this.slotNum = slotNum;
+ this.slotNumSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnPduTxReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ long status = this.statusSet ? this.status : DEFAULT_STATUS;
+ OFPort portNo = this.portNoSet ? this.portNo : DEFAULT_PORT_NO;
+ if(portNo == null)
+ throw new NullPointerException("Property portNo must not be null");
+ short slotNum = this.slotNumSet ? this.slotNum : DEFAULT_SLOT_NUM;
+
+
+ return new OFBsnPduTxReplyVer13(
+ xid,
+ status,
+ portNo,
+ slotNum
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnPduTxReply> {
+ @Override
+ public OFBsnPduTxReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 4
+ byte type = bb.readByte();
+ if(type != (byte) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 25)
+ throw new OFParseError("Wrong length: Expected=25(25), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x20L
+ int subtype = bb.readInt();
+ if(subtype != 0x20)
+ throw new OFParseError("Wrong subtype: Expected=0x20L(0x20L), got="+subtype);
+ long status = U32.f(bb.readInt());
+ OFPort portNo = OFPort.read4Bytes(bb);
+ short slotNum = U8.f(bb.readByte());
+
+ OFBsnPduTxReplyVer13 bsnPduTxReplyVer13 = new OFBsnPduTxReplyVer13(
+ xid,
+ status,
+ portNo,
+ slotNum
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnPduTxReplyVer13);
+ return bsnPduTxReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnPduTxReplyVer13Funnel FUNNEL = new OFBsnPduTxReplyVer13Funnel();
+ static class OFBsnPduTxReplyVer13Funnel implements Funnel<OFBsnPduTxReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnPduTxReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property length = 25
+ sink.putShort((short) 0x19);
+ sink.putLong(message.xid);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x20L
+ sink.putInt(0x20);
+ sink.putLong(message.status);
+ message.portNo.putTo(sink);
+ sink.putShort(message.slotNum);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnPduTxReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnPduTxReplyVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property length = 25
+ bb.writeShort((short) 0x19);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x20L
+ bb.writeInt(0x20);
+ bb.writeInt(U32.t(message.status));
+ message.portNo.write4Bytes(bb);
+ bb.writeByte(U8.t(message.slotNum));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnPduTxReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("status=").append(status);
+ b.append(", ");
+ b.append("portNo=").append(portNo);
+ b.append(", ");
+ b.append("slotNum=").append(slotNum);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnPduTxReplyVer13 other = (OFBsnPduTxReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if( status != other.status)
+ return false;
+ if (portNo == null) {
+ if (other.portNo != null)
+ return false;
+ } else if (!portNo.equals(other.portNo))
+ return false;
+ if( slotNum != other.slotNum)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * (int) (status ^ (status >>> 32));
+ result = prime * result + ((portNo == null) ? 0 : portNo.hashCode());
+ result = prime * result + slotNum;
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnPduTxRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnPduTxRequestVer13.java
new file mode 100644
index 0000000..eb252c8
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnPduTxRequestVer13.java
@@ -0,0 +1,524 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+import java.util.Arrays;
+
+class OFBsnPduTxRequestVer13 implements OFBsnPduTxRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnPduTxRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 28;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static long DEFAULT_TX_INTERVAL_MS = 0x0L;
+ private final static OFPort DEFAULT_PORT_NO = OFPort.ANY;
+ private final static short DEFAULT_SLOT_NUM = (short) 0x0;
+ private final static byte[] DEFAULT_DATA = new byte[0];
+
+ // OF message fields
+ private final long xid;
+ private final long txIntervalMs;
+ private final OFPort portNo;
+ private final short slotNum;
+ private final byte[] data;
+//
+ // Immutable default instance
+ final static OFBsnPduTxRequestVer13 DEFAULT = new OFBsnPduTxRequestVer13(
+ DEFAULT_XID, DEFAULT_TX_INTERVAL_MS, DEFAULT_PORT_NO, DEFAULT_SLOT_NUM, DEFAULT_DATA
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnPduTxRequestVer13(long xid, long txIntervalMs, OFPort portNo, short slotNum, byte[] data) {
+ this.xid = xid;
+ this.txIntervalMs = txIntervalMs;
+ this.portNo = portNo;
+ this.slotNum = slotNum;
+ this.data = data;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x1fL;
+ }
+
+ @Override
+ public long getTxIntervalMs() {
+ return txIntervalMs;
+ }
+
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public short getSlotNum() {
+ return slotNum;
+ }
+
+ @Override
+ public byte[] getData() {
+ return data;
+ }
+
+
+
+ public OFBsnPduTxRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnPduTxRequest.Builder {
+ final OFBsnPduTxRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean txIntervalMsSet;
+ private long txIntervalMs;
+ private boolean portNoSet;
+ private OFPort portNo;
+ private boolean slotNumSet;
+ private short slotNum;
+ private boolean dataSet;
+ private byte[] data;
+
+ BuilderWithParent(OFBsnPduTxRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnPduTxRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x1fL;
+ }
+
+ @Override
+ public long getTxIntervalMs() {
+ return txIntervalMs;
+ }
+
+ @Override
+ public OFBsnPduTxRequest.Builder setTxIntervalMs(long txIntervalMs) {
+ this.txIntervalMs = txIntervalMs;
+ this.txIntervalMsSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public OFBsnPduTxRequest.Builder setPortNo(OFPort portNo) {
+ this.portNo = portNo;
+ this.portNoSet = true;
+ return this;
+ }
+ @Override
+ public short getSlotNum() {
+ return slotNum;
+ }
+
+ @Override
+ public OFBsnPduTxRequest.Builder setSlotNum(short slotNum) {
+ this.slotNum = slotNum;
+ this.slotNumSet = true;
+ return this;
+ }
+ @Override
+ public byte[] getData() {
+ return data;
+ }
+
+ @Override
+ public OFBsnPduTxRequest.Builder setData(byte[] data) {
+ this.data = data;
+ this.dataSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnPduTxRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ long txIntervalMs = this.txIntervalMsSet ? this.txIntervalMs : parentMessage.txIntervalMs;
+ OFPort portNo = this.portNoSet ? this.portNo : parentMessage.portNo;
+ if(portNo == null)
+ throw new NullPointerException("Property portNo must not be null");
+ short slotNum = this.slotNumSet ? this.slotNum : parentMessage.slotNum;
+ byte[] data = this.dataSet ? this.data : parentMessage.data;
+ if(data == null)
+ throw new NullPointerException("Property data must not be null");
+
+ //
+ return new OFBsnPduTxRequestVer13(
+ xid,
+ txIntervalMs,
+ portNo,
+ slotNum,
+ data
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnPduTxRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean txIntervalMsSet;
+ private long txIntervalMs;
+ private boolean portNoSet;
+ private OFPort portNo;
+ private boolean slotNumSet;
+ private short slotNum;
+ private boolean dataSet;
+ private byte[] data;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnPduTxRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x1fL;
+ }
+
+ @Override
+ public long getTxIntervalMs() {
+ return txIntervalMs;
+ }
+
+ @Override
+ public OFBsnPduTxRequest.Builder setTxIntervalMs(long txIntervalMs) {
+ this.txIntervalMs = txIntervalMs;
+ this.txIntervalMsSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public OFBsnPduTxRequest.Builder setPortNo(OFPort portNo) {
+ this.portNo = portNo;
+ this.portNoSet = true;
+ return this;
+ }
+ @Override
+ public short getSlotNum() {
+ return slotNum;
+ }
+
+ @Override
+ public OFBsnPduTxRequest.Builder setSlotNum(short slotNum) {
+ this.slotNum = slotNum;
+ this.slotNumSet = true;
+ return this;
+ }
+ @Override
+ public byte[] getData() {
+ return data;
+ }
+
+ @Override
+ public OFBsnPduTxRequest.Builder setData(byte[] data) {
+ this.data = data;
+ this.dataSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnPduTxRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ long txIntervalMs = this.txIntervalMsSet ? this.txIntervalMs : DEFAULT_TX_INTERVAL_MS;
+ OFPort portNo = this.portNoSet ? this.portNo : DEFAULT_PORT_NO;
+ if(portNo == null)
+ throw new NullPointerException("Property portNo must not be null");
+ short slotNum = this.slotNumSet ? this.slotNum : DEFAULT_SLOT_NUM;
+ byte[] data = this.dataSet ? this.data : DEFAULT_DATA;
+ if(data == null)
+ throw new NullPointerException("Property data must not be null");
+
+
+ return new OFBsnPduTxRequestVer13(
+ xid,
+ txIntervalMs,
+ portNo,
+ slotNum,
+ data
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnPduTxRequest> {
+ @Override
+ public OFBsnPduTxRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 4
+ byte type = bb.readByte();
+ if(type != (byte) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x1fL
+ int subtype = bb.readInt();
+ if(subtype != 0x1f)
+ throw new OFParseError("Wrong subtype: Expected=0x1fL(0x1fL), got="+subtype);
+ long txIntervalMs = U32.f(bb.readInt());
+ OFPort portNo = OFPort.read4Bytes(bb);
+ short slotNum = U8.f(bb.readByte());
+ // pad: 3 bytes
+ bb.skipBytes(3);
+ byte[] data = ChannelUtils.readBytes(bb, length - (bb.readerIndex() - start));
+
+ OFBsnPduTxRequestVer13 bsnPduTxRequestVer13 = new OFBsnPduTxRequestVer13(
+ xid,
+ txIntervalMs,
+ portNo,
+ slotNum,
+ data
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnPduTxRequestVer13);
+ return bsnPduTxRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnPduTxRequestVer13Funnel FUNNEL = new OFBsnPduTxRequestVer13Funnel();
+ static class OFBsnPduTxRequestVer13Funnel implements Funnel<OFBsnPduTxRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnPduTxRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 4
+ sink.putByte((byte) 0x4);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x1fL
+ sink.putInt(0x1f);
+ sink.putLong(message.txIntervalMs);
+ message.portNo.putTo(sink);
+ sink.putShort(message.slotNum);
+ // skip pad (3 bytes)
+ sink.putBytes(message.data);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnPduTxRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnPduTxRequestVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 4
+ bb.writeByte((byte) 0x4);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x1fL
+ bb.writeInt(0x1f);
+ bb.writeInt(U32.t(message.txIntervalMs));
+ message.portNo.write4Bytes(bb);
+ bb.writeByte(U8.t(message.slotNum));
+ // pad: 3 bytes
+ bb.writeZero(3);
+ bb.writeBytes(message.data);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnPduTxRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("txIntervalMs=").append(txIntervalMs);
+ b.append(", ");
+ b.append("portNo=").append(portNo);
+ b.append(", ");
+ b.append("slotNum=").append(slotNum);
+ b.append(", ");
+ b.append("data=").append(Arrays.toString(data));
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnPduTxRequestVer13 other = (OFBsnPduTxRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if( txIntervalMs != other.txIntervalMs)
+ return false;
+ if (portNo == null) {
+ if (other.portNo != null)
+ return false;
+ } else if (!portNo.equals(other.portNo))
+ return false;
+ if( slotNum != other.slotNum)
+ return false;
+ if (!Arrays.equals(data, other.data))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * (int) (txIntervalMs ^ (txIntervalMs >>> 32));
+ result = prime * result + ((portNo == null) ? 0 : portNo.hashCode());
+ result = prime * result + slotNum;
+ result = prime * result + Arrays.hashCode(data);
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnPktinFlagSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnPktinFlagSerializerVer13.java
new file mode 100644
index 0000000..9c43fd4
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnPktinFlagSerializerVer13.java
@@ -0,0 +1,138 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_set_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFBsnPktinFlag;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import java.util.EnumSet;
+import java.util.Collections;
+
+
+public class OFBsnPktinFlagSerializerVer13 {
+
+ public final static long BSN_PKTIN_FLAG_PDU_VAL = 0x1L;
+ public final static long BSN_PKTIN_FLAG_NEW_HOST_VAL = 0x2L;
+ public final static long BSN_PKTIN_FLAG_STATION_MOVE_VAL = 0x4L;
+ public final static long BSN_PKTIN_FLAG_ARP_VAL = 0x8L;
+ public final static long BSN_PKTIN_FLAG_DHCP_VAL = 0x10L;
+ public final static long BSN_PKTIN_FLAG_L2_CPU_VAL = 0x20L;
+ public final static long BSN_PKTIN_FLAG_DEBUG_VAL = 0x40L;
+ public final static long BSN_PKTIN_FLAG_TTL_EXPIRED_VAL = 0x80L;
+ public final static long BSN_PKTIN_FLAG_L3_MISS_VAL = 0x100L;
+ public final static long BSN_PKTIN_FLAG_L3_CPU_VAL = 0x200L;
+ public final static long BSN_PKTIN_FLAG_INGRESS_ACL_VAL = 0x400L;
+
+ public static Set<OFBsnPktinFlag> readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readLong());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, Set<OFBsnPktinFlag> set) {
+ bb.writeLong(toWireValue(set));
+ }
+
+ public static void putTo(Set<OFBsnPktinFlag> set, PrimitiveSink sink) {
+ sink.putLong(toWireValue(set));
+ }
+
+
+ public static Set<OFBsnPktinFlag> ofWireValue(long val) {
+ EnumSet<OFBsnPktinFlag> set = EnumSet.noneOf(OFBsnPktinFlag.class);
+
+ if((val & BSN_PKTIN_FLAG_PDU_VAL) != 0)
+ set.add(OFBsnPktinFlag.BSN_PKTIN_FLAG_PDU);
+ if((val & BSN_PKTIN_FLAG_NEW_HOST_VAL) != 0)
+ set.add(OFBsnPktinFlag.BSN_PKTIN_FLAG_NEW_HOST);
+ if((val & BSN_PKTIN_FLAG_STATION_MOVE_VAL) != 0)
+ set.add(OFBsnPktinFlag.BSN_PKTIN_FLAG_STATION_MOVE);
+ if((val & BSN_PKTIN_FLAG_ARP_VAL) != 0)
+ set.add(OFBsnPktinFlag.BSN_PKTIN_FLAG_ARP);
+ if((val & BSN_PKTIN_FLAG_DHCP_VAL) != 0)
+ set.add(OFBsnPktinFlag.BSN_PKTIN_FLAG_DHCP);
+ if((val & BSN_PKTIN_FLAG_L2_CPU_VAL) != 0)
+ set.add(OFBsnPktinFlag.BSN_PKTIN_FLAG_L2_CPU);
+ if((val & BSN_PKTIN_FLAG_DEBUG_VAL) != 0)
+ set.add(OFBsnPktinFlag.BSN_PKTIN_FLAG_DEBUG);
+ if((val & BSN_PKTIN_FLAG_TTL_EXPIRED_VAL) != 0)
+ set.add(OFBsnPktinFlag.BSN_PKTIN_FLAG_TTL_EXPIRED);
+ if((val & BSN_PKTIN_FLAG_L3_MISS_VAL) != 0)
+ set.add(OFBsnPktinFlag.BSN_PKTIN_FLAG_L3_MISS);
+ if((val & BSN_PKTIN_FLAG_L3_CPU_VAL) != 0)
+ set.add(OFBsnPktinFlag.BSN_PKTIN_FLAG_L3_CPU);
+ if((val & BSN_PKTIN_FLAG_INGRESS_ACL_VAL) != 0)
+ set.add(OFBsnPktinFlag.BSN_PKTIN_FLAG_INGRESS_ACL);
+ return Collections.unmodifiableSet(set);
+ }
+
+ public static long toWireValue(Set<OFBsnPktinFlag> set) {
+ long wireValue = 0;
+
+ for(OFBsnPktinFlag e: set) {
+ switch(e) {
+ case BSN_PKTIN_FLAG_PDU:
+ wireValue |= BSN_PKTIN_FLAG_PDU_VAL;
+ break;
+ case BSN_PKTIN_FLAG_NEW_HOST:
+ wireValue |= BSN_PKTIN_FLAG_NEW_HOST_VAL;
+ break;
+ case BSN_PKTIN_FLAG_STATION_MOVE:
+ wireValue |= BSN_PKTIN_FLAG_STATION_MOVE_VAL;
+ break;
+ case BSN_PKTIN_FLAG_ARP:
+ wireValue |= BSN_PKTIN_FLAG_ARP_VAL;
+ break;
+ case BSN_PKTIN_FLAG_DHCP:
+ wireValue |= BSN_PKTIN_FLAG_DHCP_VAL;
+ break;
+ case BSN_PKTIN_FLAG_L2_CPU:
+ wireValue |= BSN_PKTIN_FLAG_L2_CPU_VAL;
+ break;
+ case BSN_PKTIN_FLAG_DEBUG:
+ wireValue |= BSN_PKTIN_FLAG_DEBUG_VAL;
+ break;
+ case BSN_PKTIN_FLAG_TTL_EXPIRED:
+ wireValue |= BSN_PKTIN_FLAG_TTL_EXPIRED_VAL;
+ break;
+ case BSN_PKTIN_FLAG_L3_MISS:
+ wireValue |= BSN_PKTIN_FLAG_L3_MISS_VAL;
+ break;
+ case BSN_PKTIN_FLAG_L3_CPU:
+ wireValue |= BSN_PKTIN_FLAG_L3_CPU_VAL;
+ break;
+ case BSN_PKTIN_FLAG_INGRESS_ACL:
+ wireValue |= BSN_PKTIN_FLAG_INGRESS_ACL_VAL;
+ break;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFBsnPktinFlag in version 1.3: " + e);
+ }
+ }
+ return wireValue;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnPortCounterSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnPortCounterSerializerVer13.java
new file mode 100644
index 0000000..0c5c819
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnPortCounterSerializerVer13.java
@@ -0,0 +1,199 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFBsnPortCounter;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+
+public class OFBsnPortCounterSerializerVer13 {
+
+ public final static byte BSN_PORT_COUNTER_RX_BYTES_VAL = (byte) 0x0;
+ public final static byte BSN_PORT_COUNTER_RX_PACKETS_UNICAST_VAL = (byte) 0x1;
+ public final static byte BSN_PORT_COUNTER_RX_PACKETS_BROADCAST_VAL = (byte) 0x2;
+ public final static byte BSN_PORT_COUNTER_RX_PACKETS_MULTICAST_VAL = (byte) 0x3;
+ public final static byte BSN_PORT_COUNTER_RX_DROPPED_VAL = (byte) 0x4;
+ public final static byte BSN_PORT_COUNTER_RX_ERRORS_VAL = (byte) 0x5;
+ public final static byte BSN_PORT_COUNTER_TX_BYTES_VAL = (byte) 0x6;
+ public final static byte BSN_PORT_COUNTER_TX_PACKETS_UNICAST_VAL = (byte) 0x7;
+ public final static byte BSN_PORT_COUNTER_TX_PACKETS_BROADCAST_VAL = (byte) 0x8;
+ public final static byte BSN_PORT_COUNTER_TX_PACKETS_MULTICAST_VAL = (byte) 0x9;
+ public final static byte BSN_PORT_COUNTER_TX_DROPPED_VAL = (byte) 0xa;
+ public final static byte BSN_PORT_COUNTER_TX_ERRORS_VAL = (byte) 0xb;
+ public final static byte BSN_PORT_COUNTER_RX_RUNTS_VAL = (byte) 0xc;
+ public final static byte BSN_PORT_COUNTER_RX_GIANTS_VAL = (byte) 0xd;
+ public final static byte BSN_PORT_COUNTER_RX_CRC_ERRORS_VAL = (byte) 0xe;
+ public final static byte BSN_PORT_COUNTER_RX_ALIGNMENT_ERRORS_VAL = (byte) 0xf;
+ public final static byte BSN_PORT_COUNTER_RX_SYMBOL_ERRORS_VAL = (byte) 0x10;
+ public final static byte BSN_PORT_COUNTER_RX_PAUSE_INPUT_VAL = (byte) 0x11;
+ public final static byte BSN_PORT_COUNTER_TX_COLLISIONS_VAL = (byte) 0x12;
+ public final static byte BSN_PORT_COUNTER_TX_LATE_COLLISIONS_VAL = (byte) 0x13;
+ public final static byte BSN_PORT_COUNTER_TX_DEFERRED_VAL = (byte) 0x14;
+ public final static byte BSN_PORT_COUNTER_TX_PAUSE_OUTPUT_VAL = (byte) 0x15;
+ public final static byte BSN_PORT_COUNTER_RX_PACKETS_VAL = (byte) 0x16;
+ public final static byte BSN_PORT_COUNTER_TX_PACKETS_VAL = (byte) 0x17;
+ public final static byte BSN_PORT_COUNTER_RX_LENGTH_ERRORS_VAL = (byte) 0x18;
+ public final static byte BSN_PORT_COUNTER_RX_OVERFLOW_ERRORS_VAL = (byte) 0x19;
+ public final static byte BSN_PORT_COUNTER_TX_CARRIER_ERRORS_VAL = (byte) 0x1a;
+
+ public static OFBsnPortCounter readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readByte());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, OFBsnPortCounter e) {
+ bb.writeByte(toWireValue(e));
+ }
+
+ public static void putTo(OFBsnPortCounter e, PrimitiveSink sink) {
+ sink.putByte(toWireValue(e));
+ }
+
+ public static OFBsnPortCounter ofWireValue(byte val) {
+ switch(val) {
+ case BSN_PORT_COUNTER_RX_BYTES_VAL:
+ return OFBsnPortCounter.BSN_PORT_COUNTER_RX_BYTES;
+ case BSN_PORT_COUNTER_RX_PACKETS_UNICAST_VAL:
+ return OFBsnPortCounter.BSN_PORT_COUNTER_RX_PACKETS_UNICAST;
+ case BSN_PORT_COUNTER_RX_PACKETS_BROADCAST_VAL:
+ return OFBsnPortCounter.BSN_PORT_COUNTER_RX_PACKETS_BROADCAST;
+ case BSN_PORT_COUNTER_RX_PACKETS_MULTICAST_VAL:
+ return OFBsnPortCounter.BSN_PORT_COUNTER_RX_PACKETS_MULTICAST;
+ case BSN_PORT_COUNTER_RX_DROPPED_VAL:
+ return OFBsnPortCounter.BSN_PORT_COUNTER_RX_DROPPED;
+ case BSN_PORT_COUNTER_RX_ERRORS_VAL:
+ return OFBsnPortCounter.BSN_PORT_COUNTER_RX_ERRORS;
+ case BSN_PORT_COUNTER_TX_BYTES_VAL:
+ return OFBsnPortCounter.BSN_PORT_COUNTER_TX_BYTES;
+ case BSN_PORT_COUNTER_TX_PACKETS_UNICAST_VAL:
+ return OFBsnPortCounter.BSN_PORT_COUNTER_TX_PACKETS_UNICAST;
+ case BSN_PORT_COUNTER_TX_PACKETS_BROADCAST_VAL:
+ return OFBsnPortCounter.BSN_PORT_COUNTER_TX_PACKETS_BROADCAST;
+ case BSN_PORT_COUNTER_TX_PACKETS_MULTICAST_VAL:
+ return OFBsnPortCounter.BSN_PORT_COUNTER_TX_PACKETS_MULTICAST;
+ case BSN_PORT_COUNTER_TX_DROPPED_VAL:
+ return OFBsnPortCounter.BSN_PORT_COUNTER_TX_DROPPED;
+ case BSN_PORT_COUNTER_TX_ERRORS_VAL:
+ return OFBsnPortCounter.BSN_PORT_COUNTER_TX_ERRORS;
+ case BSN_PORT_COUNTER_RX_RUNTS_VAL:
+ return OFBsnPortCounter.BSN_PORT_COUNTER_RX_RUNTS;
+ case BSN_PORT_COUNTER_RX_GIANTS_VAL:
+ return OFBsnPortCounter.BSN_PORT_COUNTER_RX_GIANTS;
+ case BSN_PORT_COUNTER_RX_CRC_ERRORS_VAL:
+ return OFBsnPortCounter.BSN_PORT_COUNTER_RX_CRC_ERRORS;
+ case BSN_PORT_COUNTER_RX_ALIGNMENT_ERRORS_VAL:
+ return OFBsnPortCounter.BSN_PORT_COUNTER_RX_ALIGNMENT_ERRORS;
+ case BSN_PORT_COUNTER_RX_SYMBOL_ERRORS_VAL:
+ return OFBsnPortCounter.BSN_PORT_COUNTER_RX_SYMBOL_ERRORS;
+ case BSN_PORT_COUNTER_RX_PAUSE_INPUT_VAL:
+ return OFBsnPortCounter.BSN_PORT_COUNTER_RX_PAUSE_INPUT;
+ case BSN_PORT_COUNTER_TX_COLLISIONS_VAL:
+ return OFBsnPortCounter.BSN_PORT_COUNTER_TX_COLLISIONS;
+ case BSN_PORT_COUNTER_TX_LATE_COLLISIONS_VAL:
+ return OFBsnPortCounter.BSN_PORT_COUNTER_TX_LATE_COLLISIONS;
+ case BSN_PORT_COUNTER_TX_DEFERRED_VAL:
+ return OFBsnPortCounter.BSN_PORT_COUNTER_TX_DEFERRED;
+ case BSN_PORT_COUNTER_TX_PAUSE_OUTPUT_VAL:
+ return OFBsnPortCounter.BSN_PORT_COUNTER_TX_PAUSE_OUTPUT;
+ case BSN_PORT_COUNTER_RX_PACKETS_VAL:
+ return OFBsnPortCounter.BSN_PORT_COUNTER_RX_PACKETS;
+ case BSN_PORT_COUNTER_TX_PACKETS_VAL:
+ return OFBsnPortCounter.BSN_PORT_COUNTER_TX_PACKETS;
+ case BSN_PORT_COUNTER_RX_LENGTH_ERRORS_VAL:
+ return OFBsnPortCounter.BSN_PORT_COUNTER_RX_LENGTH_ERRORS;
+ case BSN_PORT_COUNTER_RX_OVERFLOW_ERRORS_VAL:
+ return OFBsnPortCounter.BSN_PORT_COUNTER_RX_OVERFLOW_ERRORS;
+ case BSN_PORT_COUNTER_TX_CARRIER_ERRORS_VAL:
+ return OFBsnPortCounter.BSN_PORT_COUNTER_TX_CARRIER_ERRORS;
+ default:
+ throw new IllegalArgumentException("Illegal wire value for type OFBsnPortCounter in version 1.3: " + val);
+ }
+ }
+
+
+ public static byte toWireValue(OFBsnPortCounter e) {
+ switch(e) {
+ case BSN_PORT_COUNTER_RX_BYTES:
+ return BSN_PORT_COUNTER_RX_BYTES_VAL;
+ case BSN_PORT_COUNTER_RX_PACKETS_UNICAST:
+ return BSN_PORT_COUNTER_RX_PACKETS_UNICAST_VAL;
+ case BSN_PORT_COUNTER_RX_PACKETS_BROADCAST:
+ return BSN_PORT_COUNTER_RX_PACKETS_BROADCAST_VAL;
+ case BSN_PORT_COUNTER_RX_PACKETS_MULTICAST:
+ return BSN_PORT_COUNTER_RX_PACKETS_MULTICAST_VAL;
+ case BSN_PORT_COUNTER_RX_DROPPED:
+ return BSN_PORT_COUNTER_RX_DROPPED_VAL;
+ case BSN_PORT_COUNTER_RX_ERRORS:
+ return BSN_PORT_COUNTER_RX_ERRORS_VAL;
+ case BSN_PORT_COUNTER_TX_BYTES:
+ return BSN_PORT_COUNTER_TX_BYTES_VAL;
+ case BSN_PORT_COUNTER_TX_PACKETS_UNICAST:
+ return BSN_PORT_COUNTER_TX_PACKETS_UNICAST_VAL;
+ case BSN_PORT_COUNTER_TX_PACKETS_BROADCAST:
+ return BSN_PORT_COUNTER_TX_PACKETS_BROADCAST_VAL;
+ case BSN_PORT_COUNTER_TX_PACKETS_MULTICAST:
+ return BSN_PORT_COUNTER_TX_PACKETS_MULTICAST_VAL;
+ case BSN_PORT_COUNTER_TX_DROPPED:
+ return BSN_PORT_COUNTER_TX_DROPPED_VAL;
+ case BSN_PORT_COUNTER_TX_ERRORS:
+ return BSN_PORT_COUNTER_TX_ERRORS_VAL;
+ case BSN_PORT_COUNTER_RX_RUNTS:
+ return BSN_PORT_COUNTER_RX_RUNTS_VAL;
+ case BSN_PORT_COUNTER_RX_GIANTS:
+ return BSN_PORT_COUNTER_RX_GIANTS_VAL;
+ case BSN_PORT_COUNTER_RX_CRC_ERRORS:
+ return BSN_PORT_COUNTER_RX_CRC_ERRORS_VAL;
+ case BSN_PORT_COUNTER_RX_ALIGNMENT_ERRORS:
+ return BSN_PORT_COUNTER_RX_ALIGNMENT_ERRORS_VAL;
+ case BSN_PORT_COUNTER_RX_SYMBOL_ERRORS:
+ return BSN_PORT_COUNTER_RX_SYMBOL_ERRORS_VAL;
+ case BSN_PORT_COUNTER_RX_PAUSE_INPUT:
+ return BSN_PORT_COUNTER_RX_PAUSE_INPUT_VAL;
+ case BSN_PORT_COUNTER_TX_COLLISIONS:
+ return BSN_PORT_COUNTER_TX_COLLISIONS_VAL;
+ case BSN_PORT_COUNTER_TX_LATE_COLLISIONS:
+ return BSN_PORT_COUNTER_TX_LATE_COLLISIONS_VAL;
+ case BSN_PORT_COUNTER_TX_DEFERRED:
+ return BSN_PORT_COUNTER_TX_DEFERRED_VAL;
+ case BSN_PORT_COUNTER_TX_PAUSE_OUTPUT:
+ return BSN_PORT_COUNTER_TX_PAUSE_OUTPUT_VAL;
+ case BSN_PORT_COUNTER_RX_PACKETS:
+ return BSN_PORT_COUNTER_RX_PACKETS_VAL;
+ case BSN_PORT_COUNTER_TX_PACKETS:
+ return BSN_PORT_COUNTER_TX_PACKETS_VAL;
+ case BSN_PORT_COUNTER_RX_LENGTH_ERRORS:
+ return BSN_PORT_COUNTER_RX_LENGTH_ERRORS_VAL;
+ case BSN_PORT_COUNTER_RX_OVERFLOW_ERRORS:
+ return BSN_PORT_COUNTER_RX_OVERFLOW_ERRORS_VAL;
+ case BSN_PORT_COUNTER_TX_CARRIER_ERRORS:
+ return BSN_PORT_COUNTER_TX_CARRIER_ERRORS_VAL;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFBsnPortCounter in version 1.3: " + e);
+ }
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnPortCounterStatsEntryVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnPortCounterStatsEntryVer13.java
new file mode 100644
index 0000000..abddc03
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnPortCounterStatsEntryVer13.java
@@ -0,0 +1,310 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnPortCounterStatsEntryVer13 implements OFBsnPortCounterStatsEntry {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnPortCounterStatsEntryVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 8;
+
+ private final static OFPort DEFAULT_PORT_NO = OFPort.ANY;
+ private final static List<U64> DEFAULT_VALUES = ImmutableList.<U64>of();
+
+ // OF message fields
+ private final OFPort portNo;
+ private final List<U64> values;
+//
+ // Immutable default instance
+ final static OFBsnPortCounterStatsEntryVer13 DEFAULT = new OFBsnPortCounterStatsEntryVer13(
+ DEFAULT_PORT_NO, DEFAULT_VALUES
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnPortCounterStatsEntryVer13(OFPort portNo, List<U64> values) {
+ this.portNo = portNo;
+ this.values = values;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public List<U64> getValues() {
+ return values;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFBsnPortCounterStatsEntry.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnPortCounterStatsEntry.Builder {
+ final OFBsnPortCounterStatsEntryVer13 parentMessage;
+
+ // OF message fields
+ private boolean portNoSet;
+ private OFPort portNo;
+ private boolean valuesSet;
+ private List<U64> values;
+
+ BuilderWithParent(OFBsnPortCounterStatsEntryVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public OFBsnPortCounterStatsEntry.Builder setPortNo(OFPort portNo) {
+ this.portNo = portNo;
+ this.portNoSet = true;
+ return this;
+ }
+ @Override
+ public List<U64> getValues() {
+ return values;
+ }
+
+ @Override
+ public OFBsnPortCounterStatsEntry.Builder setValues(List<U64> values) {
+ this.values = values;
+ this.valuesSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFBsnPortCounterStatsEntry build() {
+ OFPort portNo = this.portNoSet ? this.portNo : parentMessage.portNo;
+ if(portNo == null)
+ throw new NullPointerException("Property portNo must not be null");
+ List<U64> values = this.valuesSet ? this.values : parentMessage.values;
+ if(values == null)
+ throw new NullPointerException("Property values must not be null");
+
+ //
+ return new OFBsnPortCounterStatsEntryVer13(
+ portNo,
+ values
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnPortCounterStatsEntry.Builder {
+ // OF message fields
+ private boolean portNoSet;
+ private OFPort portNo;
+ private boolean valuesSet;
+ private List<U64> values;
+
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public OFBsnPortCounterStatsEntry.Builder setPortNo(OFPort portNo) {
+ this.portNo = portNo;
+ this.portNoSet = true;
+ return this;
+ }
+ @Override
+ public List<U64> getValues() {
+ return values;
+ }
+
+ @Override
+ public OFBsnPortCounterStatsEntry.Builder setValues(List<U64> values) {
+ this.values = values;
+ this.valuesSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFBsnPortCounterStatsEntry build() {
+ OFPort portNo = this.portNoSet ? this.portNo : DEFAULT_PORT_NO;
+ if(portNo == null)
+ throw new NullPointerException("Property portNo must not be null");
+ List<U64> values = this.valuesSet ? this.values : DEFAULT_VALUES;
+ if(values == null)
+ throw new NullPointerException("Property values must not be null");
+
+
+ return new OFBsnPortCounterStatsEntryVer13(
+ portNo,
+ values
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnPortCounterStatsEntry> {
+ @Override
+ public OFBsnPortCounterStatsEntry readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ // pad: 2 bytes
+ bb.skipBytes(2);
+ OFPort portNo = OFPort.read4Bytes(bb);
+ List<U64> values = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), U64.READER);
+
+ OFBsnPortCounterStatsEntryVer13 bsnPortCounterStatsEntryVer13 = new OFBsnPortCounterStatsEntryVer13(
+ portNo,
+ values
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnPortCounterStatsEntryVer13);
+ return bsnPortCounterStatsEntryVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnPortCounterStatsEntryVer13Funnel FUNNEL = new OFBsnPortCounterStatsEntryVer13Funnel();
+ static class OFBsnPortCounterStatsEntryVer13Funnel implements Funnel<OFBsnPortCounterStatsEntryVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnPortCounterStatsEntryVer13 message, PrimitiveSink sink) {
+ // FIXME: skip funnel of length
+ // skip pad (2 bytes)
+ message.portNo.putTo(sink);
+ FunnelUtils.putList(message.values, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnPortCounterStatsEntryVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnPortCounterStatsEntryVer13 message) {
+ int startIndex = bb.writerIndex();
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ // pad: 2 bytes
+ bb.writeZero(2);
+ message.portNo.write4Bytes(bb);
+ ChannelUtils.writeList(bb, message.values);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnPortCounterStatsEntryVer13(");
+ b.append("portNo=").append(portNo);
+ b.append(", ");
+ b.append("values=").append(values);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnPortCounterStatsEntryVer13 other = (OFBsnPortCounterStatsEntryVer13) obj;
+
+ if (portNo == null) {
+ if (other.portNo != null)
+ return false;
+ } else if (!portNo.equals(other.portNo))
+ return false;
+ if (values == null) {
+ if (other.values != null)
+ return false;
+ } else if (!values.equals(other.values))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((portNo == null) ? 0 : portNo.hashCode());
+ result = prime * result + ((values == null) ? 0 : values.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnPortCounterStatsReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnPortCounterStatsReplyVer13.java
new file mode 100644
index 0000000..6039442
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnPortCounterStatsReplyVer13.java
@@ -0,0 +1,458 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnPortCounterStatsReplyVer13 implements OFBsnPortCounterStatsReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnPortCounterStatsReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 24;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsReplyFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsReplyFlags>of();
+ private final static List<OFBsnPortCounterStatsEntry> DEFAULT_ENTRIES = ImmutableList.<OFBsnPortCounterStatsEntry>of();
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsReplyFlags> flags;
+ private final List<OFBsnPortCounterStatsEntry> entries;
+//
+ // Immutable default instance
+ final static OFBsnPortCounterStatsReplyVer13 DEFAULT = new OFBsnPortCounterStatsReplyVer13(
+ DEFAULT_XID, DEFAULT_FLAGS, DEFAULT_ENTRIES
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnPortCounterStatsReplyVer13(long xid, Set<OFStatsReplyFlags> flags, List<OFBsnPortCounterStatsEntry> entries) {
+ this.xid = xid;
+ this.flags = flags;
+ this.entries = entries;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x8L;
+ }
+
+ @Override
+ public List<OFBsnPortCounterStatsEntry> getEntries() {
+ return entries;
+ }
+
+
+
+ public OFBsnPortCounterStatsReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnPortCounterStatsReply.Builder {
+ final OFBsnPortCounterStatsReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean entriesSet;
+ private List<OFBsnPortCounterStatsEntry> entries;
+
+ BuilderWithParent(OFBsnPortCounterStatsReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnPortCounterStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnPortCounterStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x8L;
+ }
+
+ @Override
+ public List<OFBsnPortCounterStatsEntry> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFBsnPortCounterStatsReply.Builder setEntries(List<OFBsnPortCounterStatsEntry> entries) {
+ this.entries = entries;
+ this.entriesSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnPortCounterStatsReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ List<OFBsnPortCounterStatsEntry> entries = this.entriesSet ? this.entries : parentMessage.entries;
+ if(entries == null)
+ throw new NullPointerException("Property entries must not be null");
+
+ //
+ return new OFBsnPortCounterStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnPortCounterStatsReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean entriesSet;
+ private List<OFBsnPortCounterStatsEntry> entries;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnPortCounterStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnPortCounterStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x8L;
+ }
+
+ @Override
+ public List<OFBsnPortCounterStatsEntry> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFBsnPortCounterStatsReply.Builder setEntries(List<OFBsnPortCounterStatsEntry> entries) {
+ this.entries = entries;
+ this.entriesSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnPortCounterStatsReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ List<OFBsnPortCounterStatsEntry> entries = this.entriesSet ? this.entries : DEFAULT_ENTRIES;
+ if(entries == null)
+ throw new NullPointerException("Property entries must not be null");
+
+
+ return new OFBsnPortCounterStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnPortCounterStatsReply> {
+ @Override
+ public OFBsnPortCounterStatsReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 19
+ byte type = bb.readByte();
+ if(type != (byte) 0x13)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REPLY(19), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 65535
+ short statsType = bb.readShort();
+ if(statsType != (short) 0xffff)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.EXPERIMENTER(65535), got="+statsType);
+ Set<OFStatsReplyFlags> flags = OFStatsReplyFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x8L
+ int subtype = bb.readInt();
+ if(subtype != 0x8)
+ throw new OFParseError("Wrong subtype: Expected=0x8L(0x8L), got="+subtype);
+ List<OFBsnPortCounterStatsEntry> entries = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFBsnPortCounterStatsEntryVer13.READER);
+
+ OFBsnPortCounterStatsReplyVer13 bsnPortCounterStatsReplyVer13 = new OFBsnPortCounterStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnPortCounterStatsReplyVer13);
+ return bsnPortCounterStatsReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnPortCounterStatsReplyVer13Funnel FUNNEL = new OFBsnPortCounterStatsReplyVer13Funnel();
+ static class OFBsnPortCounterStatsReplyVer13Funnel implements Funnel<OFBsnPortCounterStatsReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnPortCounterStatsReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 19
+ sink.putByte((byte) 0x13);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property statsType = 65535
+ sink.putShort((short) 0xffff);
+ OFStatsReplyFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x8L
+ sink.putInt(0x8);
+ FunnelUtils.putList(message.entries, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnPortCounterStatsReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnPortCounterStatsReplyVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 19
+ bb.writeByte((byte) 0x13);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 65535
+ bb.writeShort((short) 0xffff);
+ OFStatsReplyFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x8L
+ bb.writeInt(0x8);
+ ChannelUtils.writeList(bb, message.entries);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnPortCounterStatsReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("entries=").append(entries);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnPortCounterStatsReplyVer13 other = (OFBsnPortCounterStatsReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if (entries == null) {
+ if (other.entries != null)
+ return false;
+ } else if (!entries.equals(other.entries))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * result + ((entries == null) ? 0 : entries.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnPortCounterStatsRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnPortCounterStatsRequestVer13.java
new file mode 100644
index 0000000..0098b40
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnPortCounterStatsRequestVer13.java
@@ -0,0 +1,451 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnPortCounterStatsRequestVer13 implements OFBsnPortCounterStatsRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnPortCounterStatsRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 28;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsRequestFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsRequestFlags>of();
+ private final static OFPort DEFAULT_PORT_NO = OFPort.ANY;
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsRequestFlags> flags;
+ private final OFPort portNo;
+//
+ // Immutable default instance
+ final static OFBsnPortCounterStatsRequestVer13 DEFAULT = new OFBsnPortCounterStatsRequestVer13(
+ DEFAULT_XID, DEFAULT_FLAGS, DEFAULT_PORT_NO
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnPortCounterStatsRequestVer13(long xid, Set<OFStatsRequestFlags> flags, OFPort portNo) {
+ this.xid = xid;
+ this.flags = flags;
+ this.portNo = portNo;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x8L;
+ }
+
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+
+
+ public OFBsnPortCounterStatsRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnPortCounterStatsRequest.Builder {
+ final OFBsnPortCounterStatsRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+ private boolean portNoSet;
+ private OFPort portNo;
+
+ BuilderWithParent(OFBsnPortCounterStatsRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnPortCounterStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnPortCounterStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x8L;
+ }
+
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public OFBsnPortCounterStatsRequest.Builder setPortNo(OFPort portNo) {
+ this.portNo = portNo;
+ this.portNoSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnPortCounterStatsRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ OFPort portNo = this.portNoSet ? this.portNo : parentMessage.portNo;
+ if(portNo == null)
+ throw new NullPointerException("Property portNo must not be null");
+
+ //
+ return new OFBsnPortCounterStatsRequestVer13(
+ xid,
+ flags,
+ portNo
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnPortCounterStatsRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+ private boolean portNoSet;
+ private OFPort portNo;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnPortCounterStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnPortCounterStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x8L;
+ }
+
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public OFBsnPortCounterStatsRequest.Builder setPortNo(OFPort portNo) {
+ this.portNo = portNo;
+ this.portNoSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnPortCounterStatsRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ OFPort portNo = this.portNoSet ? this.portNo : DEFAULT_PORT_NO;
+ if(portNo == null)
+ throw new NullPointerException("Property portNo must not be null");
+
+
+ return new OFBsnPortCounterStatsRequestVer13(
+ xid,
+ flags,
+ portNo
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnPortCounterStatsRequest> {
+ @Override
+ public OFBsnPortCounterStatsRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 18
+ byte type = bb.readByte();
+ if(type != (byte) 0x12)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REQUEST(18), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 28)
+ throw new OFParseError("Wrong length: Expected=28(28), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 65535
+ short statsType = bb.readShort();
+ if(statsType != (short) 0xffff)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.EXPERIMENTER(65535), got="+statsType);
+ Set<OFStatsRequestFlags> flags = OFStatsRequestFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x8L
+ int subtype = bb.readInt();
+ if(subtype != 0x8)
+ throw new OFParseError("Wrong subtype: Expected=0x8L(0x8L), got="+subtype);
+ OFPort portNo = OFPort.read4Bytes(bb);
+
+ OFBsnPortCounterStatsRequestVer13 bsnPortCounterStatsRequestVer13 = new OFBsnPortCounterStatsRequestVer13(
+ xid,
+ flags,
+ portNo
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnPortCounterStatsRequestVer13);
+ return bsnPortCounterStatsRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnPortCounterStatsRequestVer13Funnel FUNNEL = new OFBsnPortCounterStatsRequestVer13Funnel();
+ static class OFBsnPortCounterStatsRequestVer13Funnel implements Funnel<OFBsnPortCounterStatsRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnPortCounterStatsRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 18
+ sink.putByte((byte) 0x12);
+ // fixed value property length = 28
+ sink.putShort((short) 0x1c);
+ sink.putLong(message.xid);
+ // fixed value property statsType = 65535
+ sink.putShort((short) 0xffff);
+ OFStatsRequestFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x8L
+ sink.putInt(0x8);
+ message.portNo.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnPortCounterStatsRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnPortCounterStatsRequestVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 18
+ bb.writeByte((byte) 0x12);
+ // fixed value property length = 28
+ bb.writeShort((short) 0x1c);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 65535
+ bb.writeShort((short) 0xffff);
+ OFStatsRequestFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x8L
+ bb.writeInt(0x8);
+ message.portNo.write4Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnPortCounterStatsRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("portNo=").append(portNo);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnPortCounterStatsRequestVer13 other = (OFBsnPortCounterStatsRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if (portNo == null) {
+ if (other.portNo != null)
+ return false;
+ } else if (!portNo.equals(other.portNo))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * result + ((portNo == null) ? 0 : portNo.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnRoleStatusVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnRoleStatusVer13.java
new file mode 100644
index 0000000..00db5b9
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnRoleStatusVer13.java
@@ -0,0 +1,477 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnRoleStatusVer13 implements OFBsnRoleStatus {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnRoleStatusVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 32;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static U64 DEFAULT_GENERATION_ID = U64.ZERO;
+
+ // OF message fields
+ private final long xid;
+ private final OFControllerRole role;
+ private final OFBsnControllerRoleReason reason;
+ private final U64 generationId;
+//
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnRoleStatusVer13(long xid, OFControllerRole role, OFBsnControllerRoleReason reason, U64 generationId) {
+ this.xid = xid;
+ this.role = role;
+ this.reason = reason;
+ this.generationId = generationId;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x37L;
+ }
+
+ @Override
+ public OFControllerRole getRole() {
+ return role;
+ }
+
+ @Override
+ public OFBsnControllerRoleReason getReason() {
+ return reason;
+ }
+
+ @Override
+ public U64 getGenerationId() {
+ return generationId;
+ }
+
+
+
+ public OFBsnRoleStatus.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnRoleStatus.Builder {
+ final OFBsnRoleStatusVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean roleSet;
+ private OFControllerRole role;
+ private boolean reasonSet;
+ private OFBsnControllerRoleReason reason;
+ private boolean generationIdSet;
+ private U64 generationId;
+
+ BuilderWithParent(OFBsnRoleStatusVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnRoleStatus.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x37L;
+ }
+
+ @Override
+ public OFControllerRole getRole() {
+ return role;
+ }
+
+ @Override
+ public OFBsnRoleStatus.Builder setRole(OFControllerRole role) {
+ this.role = role;
+ this.roleSet = true;
+ return this;
+ }
+ @Override
+ public OFBsnControllerRoleReason getReason() {
+ return reason;
+ }
+
+ @Override
+ public OFBsnRoleStatus.Builder setReason(OFBsnControllerRoleReason reason) {
+ this.reason = reason;
+ this.reasonSet = true;
+ return this;
+ }
+ @Override
+ public U64 getGenerationId() {
+ return generationId;
+ }
+
+ @Override
+ public OFBsnRoleStatus.Builder setGenerationId(U64 generationId) {
+ this.generationId = generationId;
+ this.generationIdSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnRoleStatus build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ OFControllerRole role = this.roleSet ? this.role : parentMessage.role;
+ if(role == null)
+ throw new NullPointerException("Property role must not be null");
+ OFBsnControllerRoleReason reason = this.reasonSet ? this.reason : parentMessage.reason;
+ if(reason == null)
+ throw new NullPointerException("Property reason must not be null");
+ U64 generationId = this.generationIdSet ? this.generationId : parentMessage.generationId;
+ if(generationId == null)
+ throw new NullPointerException("Property generationId must not be null");
+
+ //
+ return new OFBsnRoleStatusVer13(
+ xid,
+ role,
+ reason,
+ generationId
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnRoleStatus.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean roleSet;
+ private OFControllerRole role;
+ private boolean reasonSet;
+ private OFBsnControllerRoleReason reason;
+ private boolean generationIdSet;
+ private U64 generationId;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnRoleStatus.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x37L;
+ }
+
+ @Override
+ public OFControllerRole getRole() {
+ return role;
+ }
+
+ @Override
+ public OFBsnRoleStatus.Builder setRole(OFControllerRole role) {
+ this.role = role;
+ this.roleSet = true;
+ return this;
+ }
+ @Override
+ public OFBsnControllerRoleReason getReason() {
+ return reason;
+ }
+
+ @Override
+ public OFBsnRoleStatus.Builder setReason(OFBsnControllerRoleReason reason) {
+ this.reason = reason;
+ this.reasonSet = true;
+ return this;
+ }
+ @Override
+ public U64 getGenerationId() {
+ return generationId;
+ }
+
+ @Override
+ public OFBsnRoleStatus.Builder setGenerationId(U64 generationId) {
+ this.generationId = generationId;
+ this.generationIdSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnRoleStatus build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ if(!this.roleSet)
+ throw new IllegalStateException("Property role doesn't have default value -- must be set");
+ if(role == null)
+ throw new NullPointerException("Property role must not be null");
+ if(!this.reasonSet)
+ throw new IllegalStateException("Property reason doesn't have default value -- must be set");
+ if(reason == null)
+ throw new NullPointerException("Property reason must not be null");
+ U64 generationId = this.generationIdSet ? this.generationId : DEFAULT_GENERATION_ID;
+ if(generationId == null)
+ throw new NullPointerException("Property generationId must not be null");
+
+
+ return new OFBsnRoleStatusVer13(
+ xid,
+ role,
+ reason,
+ generationId
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnRoleStatus> {
+ @Override
+ public OFBsnRoleStatus readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 4
+ byte type = bb.readByte();
+ if(type != (byte) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 32)
+ throw new OFParseError("Wrong length: Expected=32(32), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x37L
+ int subtype = bb.readInt();
+ if(subtype != 0x37)
+ throw new OFParseError("Wrong subtype: Expected=0x37L(0x37L), got="+subtype);
+ OFControllerRole role = OFControllerRoleSerializerVer13.readFrom(bb);
+ OFBsnControllerRoleReason reason = OFBsnControllerRoleReasonSerializerVer13.readFrom(bb);
+ // pad: 3 bytes
+ bb.skipBytes(3);
+ U64 generationId = U64.ofRaw(bb.readLong());
+
+ OFBsnRoleStatusVer13 bsnRoleStatusVer13 = new OFBsnRoleStatusVer13(
+ xid,
+ role,
+ reason,
+ generationId
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnRoleStatusVer13);
+ return bsnRoleStatusVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnRoleStatusVer13Funnel FUNNEL = new OFBsnRoleStatusVer13Funnel();
+ static class OFBsnRoleStatusVer13Funnel implements Funnel<OFBsnRoleStatusVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnRoleStatusVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property length = 32
+ sink.putShort((short) 0x20);
+ sink.putLong(message.xid);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x37L
+ sink.putInt(0x37);
+ OFControllerRoleSerializerVer13.putTo(message.role, sink);
+ OFBsnControllerRoleReasonSerializerVer13.putTo(message.reason, sink);
+ // skip pad (3 bytes)
+ message.generationId.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnRoleStatusVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnRoleStatusVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property length = 32
+ bb.writeShort((short) 0x20);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x37L
+ bb.writeInt(0x37);
+ OFControllerRoleSerializerVer13.writeTo(bb, message.role);
+ OFBsnControllerRoleReasonSerializerVer13.writeTo(bb, message.reason);
+ // pad: 3 bytes
+ bb.writeZero(3);
+ bb.writeLong(message.generationId.getValue());
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnRoleStatusVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("role=").append(role);
+ b.append(", ");
+ b.append("reason=").append(reason);
+ b.append(", ");
+ b.append("generationId=").append(generationId);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnRoleStatusVer13 other = (OFBsnRoleStatusVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (role == null) {
+ if (other.role != null)
+ return false;
+ } else if (!role.equals(other.role))
+ return false;
+ if (reason == null) {
+ if (other.reason != null)
+ return false;
+ } else if (!reason.equals(other.reason))
+ return false;
+ if (generationId == null) {
+ if (other.generationId != null)
+ return false;
+ } else if (!generationId.equals(other.generationId))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((role == null) ? 0 : role.hashCode());
+ result = prime * result + ((reason == null) ? 0 : reason.hashCode());
+ result = prime * result + ((generationId == null) ? 0 : generationId.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnSetAuxCxnsReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnSetAuxCxnsReplyVer13.java
new file mode 100644
index 0000000..836536e
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnSetAuxCxnsReplyVer13.java
@@ -0,0 +1,408 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import java.util.Set;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnSetAuxCxnsReplyVer13 implements OFBsnSetAuxCxnsReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnSetAuxCxnsReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 24;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static long DEFAULT_NUM_AUX = 0x0L;
+ private final static long DEFAULT_STATUS = 0x0L;
+
+ // OF message fields
+ private final long xid;
+ private final long numAux;
+ private final long status;
+//
+ // Immutable default instance
+ final static OFBsnSetAuxCxnsReplyVer13 DEFAULT = new OFBsnSetAuxCxnsReplyVer13(
+ DEFAULT_XID, DEFAULT_NUM_AUX, DEFAULT_STATUS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnSetAuxCxnsReplyVer13(long xid, long numAux, long status) {
+ this.xid = xid;
+ this.numAux = numAux;
+ this.status = status;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x3bL;
+ }
+
+ @Override
+ public long getNumAux() {
+ return numAux;
+ }
+
+ @Override
+ public long getStatus() {
+ return status;
+ }
+
+
+
+ public OFBsnSetAuxCxnsReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnSetAuxCxnsReply.Builder {
+ final OFBsnSetAuxCxnsReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean numAuxSet;
+ private long numAux;
+ private boolean statusSet;
+ private long status;
+
+ BuilderWithParent(OFBsnSetAuxCxnsReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnSetAuxCxnsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x3bL;
+ }
+
+ @Override
+ public long getNumAux() {
+ return numAux;
+ }
+
+ @Override
+ public OFBsnSetAuxCxnsReply.Builder setNumAux(long numAux) {
+ this.numAux = numAux;
+ this.numAuxSet = true;
+ return this;
+ }
+ @Override
+ public long getStatus() {
+ return status;
+ }
+
+ @Override
+ public OFBsnSetAuxCxnsReply.Builder setStatus(long status) {
+ this.status = status;
+ this.statusSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnSetAuxCxnsReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ long numAux = this.numAuxSet ? this.numAux : parentMessage.numAux;
+ long status = this.statusSet ? this.status : parentMessage.status;
+
+ //
+ return new OFBsnSetAuxCxnsReplyVer13(
+ xid,
+ numAux,
+ status
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnSetAuxCxnsReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean numAuxSet;
+ private long numAux;
+ private boolean statusSet;
+ private long status;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnSetAuxCxnsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x3bL;
+ }
+
+ @Override
+ public long getNumAux() {
+ return numAux;
+ }
+
+ @Override
+ public OFBsnSetAuxCxnsReply.Builder setNumAux(long numAux) {
+ this.numAux = numAux;
+ this.numAuxSet = true;
+ return this;
+ }
+ @Override
+ public long getStatus() {
+ return status;
+ }
+
+ @Override
+ public OFBsnSetAuxCxnsReply.Builder setStatus(long status) {
+ this.status = status;
+ this.statusSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnSetAuxCxnsReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ long numAux = this.numAuxSet ? this.numAux : DEFAULT_NUM_AUX;
+ long status = this.statusSet ? this.status : DEFAULT_STATUS;
+
+
+ return new OFBsnSetAuxCxnsReplyVer13(
+ xid,
+ numAux,
+ status
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnSetAuxCxnsReply> {
+ @Override
+ public OFBsnSetAuxCxnsReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 4
+ byte type = bb.readByte();
+ if(type != (byte) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 24)
+ throw new OFParseError("Wrong length: Expected=24(24), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x3bL
+ int subtype = bb.readInt();
+ if(subtype != 0x3b)
+ throw new OFParseError("Wrong subtype: Expected=0x3bL(0x3bL), got="+subtype);
+ long numAux = U32.f(bb.readInt());
+ long status = U32.f(bb.readInt());
+
+ OFBsnSetAuxCxnsReplyVer13 bsnSetAuxCxnsReplyVer13 = new OFBsnSetAuxCxnsReplyVer13(
+ xid,
+ numAux,
+ status
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnSetAuxCxnsReplyVer13);
+ return bsnSetAuxCxnsReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnSetAuxCxnsReplyVer13Funnel FUNNEL = new OFBsnSetAuxCxnsReplyVer13Funnel();
+ static class OFBsnSetAuxCxnsReplyVer13Funnel implements Funnel<OFBsnSetAuxCxnsReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnSetAuxCxnsReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property length = 24
+ sink.putShort((short) 0x18);
+ sink.putLong(message.xid);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x3bL
+ sink.putInt(0x3b);
+ sink.putLong(message.numAux);
+ sink.putLong(message.status);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnSetAuxCxnsReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnSetAuxCxnsReplyVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property length = 24
+ bb.writeShort((short) 0x18);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x3bL
+ bb.writeInt(0x3b);
+ bb.writeInt(U32.t(message.numAux));
+ bb.writeInt(U32.t(message.status));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnSetAuxCxnsReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("numAux=").append(numAux);
+ b.append(", ");
+ b.append("status=").append(status);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnSetAuxCxnsReplyVer13 other = (OFBsnSetAuxCxnsReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if( numAux != other.numAux)
+ return false;
+ if( status != other.status)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * (int) (numAux ^ (numAux >>> 32));
+ result = prime * (int) (status ^ (status >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnSetAuxCxnsRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnSetAuxCxnsRequestVer13.java
new file mode 100644
index 0000000..f96b27e
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnSetAuxCxnsRequestVer13.java
@@ -0,0 +1,361 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import java.util.Set;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnSetAuxCxnsRequestVer13 implements OFBsnSetAuxCxnsRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnSetAuxCxnsRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 20;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static long DEFAULT_NUM_AUX = 0x0L;
+
+ // OF message fields
+ private final long xid;
+ private final long numAux;
+//
+ // Immutable default instance
+ final static OFBsnSetAuxCxnsRequestVer13 DEFAULT = new OFBsnSetAuxCxnsRequestVer13(
+ DEFAULT_XID, DEFAULT_NUM_AUX
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnSetAuxCxnsRequestVer13(long xid, long numAux) {
+ this.xid = xid;
+ this.numAux = numAux;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x3aL;
+ }
+
+ @Override
+ public long getNumAux() {
+ return numAux;
+ }
+
+
+
+ public OFBsnSetAuxCxnsRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnSetAuxCxnsRequest.Builder {
+ final OFBsnSetAuxCxnsRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean numAuxSet;
+ private long numAux;
+
+ BuilderWithParent(OFBsnSetAuxCxnsRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnSetAuxCxnsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x3aL;
+ }
+
+ @Override
+ public long getNumAux() {
+ return numAux;
+ }
+
+ @Override
+ public OFBsnSetAuxCxnsRequest.Builder setNumAux(long numAux) {
+ this.numAux = numAux;
+ this.numAuxSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnSetAuxCxnsRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ long numAux = this.numAuxSet ? this.numAux : parentMessage.numAux;
+
+ //
+ return new OFBsnSetAuxCxnsRequestVer13(
+ xid,
+ numAux
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnSetAuxCxnsRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean numAuxSet;
+ private long numAux;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnSetAuxCxnsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x3aL;
+ }
+
+ @Override
+ public long getNumAux() {
+ return numAux;
+ }
+
+ @Override
+ public OFBsnSetAuxCxnsRequest.Builder setNumAux(long numAux) {
+ this.numAux = numAux;
+ this.numAuxSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnSetAuxCxnsRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ long numAux = this.numAuxSet ? this.numAux : DEFAULT_NUM_AUX;
+
+
+ return new OFBsnSetAuxCxnsRequestVer13(
+ xid,
+ numAux
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnSetAuxCxnsRequest> {
+ @Override
+ public OFBsnSetAuxCxnsRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 4
+ byte type = bb.readByte();
+ if(type != (byte) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 20)
+ throw new OFParseError("Wrong length: Expected=20(20), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x3aL
+ int subtype = bb.readInt();
+ if(subtype != 0x3a)
+ throw new OFParseError("Wrong subtype: Expected=0x3aL(0x3aL), got="+subtype);
+ long numAux = U32.f(bb.readInt());
+
+ OFBsnSetAuxCxnsRequestVer13 bsnSetAuxCxnsRequestVer13 = new OFBsnSetAuxCxnsRequestVer13(
+ xid,
+ numAux
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnSetAuxCxnsRequestVer13);
+ return bsnSetAuxCxnsRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnSetAuxCxnsRequestVer13Funnel FUNNEL = new OFBsnSetAuxCxnsRequestVer13Funnel();
+ static class OFBsnSetAuxCxnsRequestVer13Funnel implements Funnel<OFBsnSetAuxCxnsRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnSetAuxCxnsRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property length = 20
+ sink.putShort((short) 0x14);
+ sink.putLong(message.xid);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x3aL
+ sink.putInt(0x3a);
+ sink.putLong(message.numAux);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnSetAuxCxnsRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnSetAuxCxnsRequestVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property length = 20
+ bb.writeShort((short) 0x14);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x3aL
+ bb.writeInt(0x3a);
+ bb.writeInt(U32.t(message.numAux));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnSetAuxCxnsRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("numAux=").append(numAux);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnSetAuxCxnsRequestVer13 other = (OFBsnSetAuxCxnsRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if( numAux != other.numAux)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * (int) (numAux ^ (numAux >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnSetLacpReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnSetLacpReplyVer13.java
new file mode 100644
index 0000000..fe19e6f
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnSetLacpReplyVer13.java
@@ -0,0 +1,415 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import java.util.Set;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnSetLacpReplyVer13 implements OFBsnSetLacpReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnSetLacpReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 24;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static long DEFAULT_STATUS = 0x0L;
+ private final static OFPort DEFAULT_PORT_NO = OFPort.ANY;
+
+ // OF message fields
+ private final long xid;
+ private final long status;
+ private final OFPort portNo;
+//
+ // Immutable default instance
+ final static OFBsnSetLacpReplyVer13 DEFAULT = new OFBsnSetLacpReplyVer13(
+ DEFAULT_XID, DEFAULT_STATUS, DEFAULT_PORT_NO
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnSetLacpReplyVer13(long xid, long status, OFPort portNo) {
+ this.xid = xid;
+ this.status = status;
+ this.portNo = portNo;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x2aL;
+ }
+
+ @Override
+ public long getStatus() {
+ return status;
+ }
+
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+
+
+ public OFBsnSetLacpReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnSetLacpReply.Builder {
+ final OFBsnSetLacpReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean statusSet;
+ private long status;
+ private boolean portNoSet;
+ private OFPort portNo;
+
+ BuilderWithParent(OFBsnSetLacpReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnSetLacpReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x2aL;
+ }
+
+ @Override
+ public long getStatus() {
+ return status;
+ }
+
+ @Override
+ public OFBsnSetLacpReply.Builder setStatus(long status) {
+ this.status = status;
+ this.statusSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public OFBsnSetLacpReply.Builder setPortNo(OFPort portNo) {
+ this.portNo = portNo;
+ this.portNoSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnSetLacpReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ long status = this.statusSet ? this.status : parentMessage.status;
+ OFPort portNo = this.portNoSet ? this.portNo : parentMessage.portNo;
+ if(portNo == null)
+ throw new NullPointerException("Property portNo must not be null");
+
+ //
+ return new OFBsnSetLacpReplyVer13(
+ xid,
+ status,
+ portNo
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnSetLacpReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean statusSet;
+ private long status;
+ private boolean portNoSet;
+ private OFPort portNo;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnSetLacpReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x2aL;
+ }
+
+ @Override
+ public long getStatus() {
+ return status;
+ }
+
+ @Override
+ public OFBsnSetLacpReply.Builder setStatus(long status) {
+ this.status = status;
+ this.statusSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public OFBsnSetLacpReply.Builder setPortNo(OFPort portNo) {
+ this.portNo = portNo;
+ this.portNoSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnSetLacpReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ long status = this.statusSet ? this.status : DEFAULT_STATUS;
+ OFPort portNo = this.portNoSet ? this.portNo : DEFAULT_PORT_NO;
+ if(portNo == null)
+ throw new NullPointerException("Property portNo must not be null");
+
+
+ return new OFBsnSetLacpReplyVer13(
+ xid,
+ status,
+ portNo
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnSetLacpReply> {
+ @Override
+ public OFBsnSetLacpReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 4
+ byte type = bb.readByte();
+ if(type != (byte) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 24)
+ throw new OFParseError("Wrong length: Expected=24(24), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x2aL
+ int subtype = bb.readInt();
+ if(subtype != 0x2a)
+ throw new OFParseError("Wrong subtype: Expected=0x2aL(0x2aL), got="+subtype);
+ long status = U32.f(bb.readInt());
+ OFPort portNo = OFPort.read4Bytes(bb);
+
+ OFBsnSetLacpReplyVer13 bsnSetLacpReplyVer13 = new OFBsnSetLacpReplyVer13(
+ xid,
+ status,
+ portNo
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnSetLacpReplyVer13);
+ return bsnSetLacpReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnSetLacpReplyVer13Funnel FUNNEL = new OFBsnSetLacpReplyVer13Funnel();
+ static class OFBsnSetLacpReplyVer13Funnel implements Funnel<OFBsnSetLacpReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnSetLacpReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property length = 24
+ sink.putShort((short) 0x18);
+ sink.putLong(message.xid);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x2aL
+ sink.putInt(0x2a);
+ sink.putLong(message.status);
+ message.portNo.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnSetLacpReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnSetLacpReplyVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property length = 24
+ bb.writeShort((short) 0x18);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x2aL
+ bb.writeInt(0x2a);
+ bb.writeInt(U32.t(message.status));
+ message.portNo.write4Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnSetLacpReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("status=").append(status);
+ b.append(", ");
+ b.append("portNo=").append(portNo);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnSetLacpReplyVer13 other = (OFBsnSetLacpReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if( status != other.status)
+ return false;
+ if (portNo == null) {
+ if (other.portNo != null)
+ return false;
+ } else if (!portNo.equals(other.portNo))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * (int) (status ^ (status >>> 32));
+ result = prime * result + ((portNo == null) ? 0 : portNo.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnSetLacpRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnSetLacpRequestVer13.java
new file mode 100644
index 0000000..6dc30f3
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnSetLacpRequestVer13.java
@@ -0,0 +1,662 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import java.util.Set;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnSetLacpRequestVer13 implements OFBsnSetLacpRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnSetLacpRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 38;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static short DEFAULT_ENABLED = (short) 0x0;
+ private final static OFPort DEFAULT_PORT_NO = OFPort.ANY;
+ private final static int DEFAULT_ACTOR_SYS_PRIORITY = 0x0;
+ private final static MacAddress DEFAULT_ACTOR_SYS_MAC = MacAddress.NONE;
+ private final static int DEFAULT_ACTOR_PORT_PRIORITY = 0x0;
+ private final static int DEFAULT_ACTOR_PORT_NUM = 0x0;
+ private final static int DEFAULT_ACTOR_KEY = 0x0;
+
+ // OF message fields
+ private final long xid;
+ private final short enabled;
+ private final OFPort portNo;
+ private final int actorSysPriority;
+ private final MacAddress actorSysMac;
+ private final int actorPortPriority;
+ private final int actorPortNum;
+ private final int actorKey;
+//
+ // Immutable default instance
+ final static OFBsnSetLacpRequestVer13 DEFAULT = new OFBsnSetLacpRequestVer13(
+ DEFAULT_XID, DEFAULT_ENABLED, DEFAULT_PORT_NO, DEFAULT_ACTOR_SYS_PRIORITY, DEFAULT_ACTOR_SYS_MAC, DEFAULT_ACTOR_PORT_PRIORITY, DEFAULT_ACTOR_PORT_NUM, DEFAULT_ACTOR_KEY
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnSetLacpRequestVer13(long xid, short enabled, OFPort portNo, int actorSysPriority, MacAddress actorSysMac, int actorPortPriority, int actorPortNum, int actorKey) {
+ this.xid = xid;
+ this.enabled = enabled;
+ this.portNo = portNo;
+ this.actorSysPriority = actorSysPriority;
+ this.actorSysMac = actorSysMac;
+ this.actorPortPriority = actorPortPriority;
+ this.actorPortNum = actorPortNum;
+ this.actorKey = actorKey;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x29L;
+ }
+
+ @Override
+ public short getEnabled() {
+ return enabled;
+ }
+
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public int getActorSysPriority() {
+ return actorSysPriority;
+ }
+
+ @Override
+ public MacAddress getActorSysMac() {
+ return actorSysMac;
+ }
+
+ @Override
+ public int getActorPortPriority() {
+ return actorPortPriority;
+ }
+
+ @Override
+ public int getActorPortNum() {
+ return actorPortNum;
+ }
+
+ @Override
+ public int getActorKey() {
+ return actorKey;
+ }
+
+
+
+ public OFBsnSetLacpRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnSetLacpRequest.Builder {
+ final OFBsnSetLacpRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean enabledSet;
+ private short enabled;
+ private boolean portNoSet;
+ private OFPort portNo;
+ private boolean actorSysPrioritySet;
+ private int actorSysPriority;
+ private boolean actorSysMacSet;
+ private MacAddress actorSysMac;
+ private boolean actorPortPrioritySet;
+ private int actorPortPriority;
+ private boolean actorPortNumSet;
+ private int actorPortNum;
+ private boolean actorKeySet;
+ private int actorKey;
+
+ BuilderWithParent(OFBsnSetLacpRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnSetLacpRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x29L;
+ }
+
+ @Override
+ public short getEnabled() {
+ return enabled;
+ }
+
+ @Override
+ public OFBsnSetLacpRequest.Builder setEnabled(short enabled) {
+ this.enabled = enabled;
+ this.enabledSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public OFBsnSetLacpRequest.Builder setPortNo(OFPort portNo) {
+ this.portNo = portNo;
+ this.portNoSet = true;
+ return this;
+ }
+ @Override
+ public int getActorSysPriority() {
+ return actorSysPriority;
+ }
+
+ @Override
+ public OFBsnSetLacpRequest.Builder setActorSysPriority(int actorSysPriority) {
+ this.actorSysPriority = actorSysPriority;
+ this.actorSysPrioritySet = true;
+ return this;
+ }
+ @Override
+ public MacAddress getActorSysMac() {
+ return actorSysMac;
+ }
+
+ @Override
+ public OFBsnSetLacpRequest.Builder setActorSysMac(MacAddress actorSysMac) {
+ this.actorSysMac = actorSysMac;
+ this.actorSysMacSet = true;
+ return this;
+ }
+ @Override
+ public int getActorPortPriority() {
+ return actorPortPriority;
+ }
+
+ @Override
+ public OFBsnSetLacpRequest.Builder setActorPortPriority(int actorPortPriority) {
+ this.actorPortPriority = actorPortPriority;
+ this.actorPortPrioritySet = true;
+ return this;
+ }
+ @Override
+ public int getActorPortNum() {
+ return actorPortNum;
+ }
+
+ @Override
+ public OFBsnSetLacpRequest.Builder setActorPortNum(int actorPortNum) {
+ this.actorPortNum = actorPortNum;
+ this.actorPortNumSet = true;
+ return this;
+ }
+ @Override
+ public int getActorKey() {
+ return actorKey;
+ }
+
+ @Override
+ public OFBsnSetLacpRequest.Builder setActorKey(int actorKey) {
+ this.actorKey = actorKey;
+ this.actorKeySet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnSetLacpRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ short enabled = this.enabledSet ? this.enabled : parentMessage.enabled;
+ OFPort portNo = this.portNoSet ? this.portNo : parentMessage.portNo;
+ if(portNo == null)
+ throw new NullPointerException("Property portNo must not be null");
+ int actorSysPriority = this.actorSysPrioritySet ? this.actorSysPriority : parentMessage.actorSysPriority;
+ MacAddress actorSysMac = this.actorSysMacSet ? this.actorSysMac : parentMessage.actorSysMac;
+ if(actorSysMac == null)
+ throw new NullPointerException("Property actorSysMac must not be null");
+ int actorPortPriority = this.actorPortPrioritySet ? this.actorPortPriority : parentMessage.actorPortPriority;
+ int actorPortNum = this.actorPortNumSet ? this.actorPortNum : parentMessage.actorPortNum;
+ int actorKey = this.actorKeySet ? this.actorKey : parentMessage.actorKey;
+
+ //
+ return new OFBsnSetLacpRequestVer13(
+ xid,
+ enabled,
+ portNo,
+ actorSysPriority,
+ actorSysMac,
+ actorPortPriority,
+ actorPortNum,
+ actorKey
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnSetLacpRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean enabledSet;
+ private short enabled;
+ private boolean portNoSet;
+ private OFPort portNo;
+ private boolean actorSysPrioritySet;
+ private int actorSysPriority;
+ private boolean actorSysMacSet;
+ private MacAddress actorSysMac;
+ private boolean actorPortPrioritySet;
+ private int actorPortPriority;
+ private boolean actorPortNumSet;
+ private int actorPortNum;
+ private boolean actorKeySet;
+ private int actorKey;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnSetLacpRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x29L;
+ }
+
+ @Override
+ public short getEnabled() {
+ return enabled;
+ }
+
+ @Override
+ public OFBsnSetLacpRequest.Builder setEnabled(short enabled) {
+ this.enabled = enabled;
+ this.enabledSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public OFBsnSetLacpRequest.Builder setPortNo(OFPort portNo) {
+ this.portNo = portNo;
+ this.portNoSet = true;
+ return this;
+ }
+ @Override
+ public int getActorSysPriority() {
+ return actorSysPriority;
+ }
+
+ @Override
+ public OFBsnSetLacpRequest.Builder setActorSysPriority(int actorSysPriority) {
+ this.actorSysPriority = actorSysPriority;
+ this.actorSysPrioritySet = true;
+ return this;
+ }
+ @Override
+ public MacAddress getActorSysMac() {
+ return actorSysMac;
+ }
+
+ @Override
+ public OFBsnSetLacpRequest.Builder setActorSysMac(MacAddress actorSysMac) {
+ this.actorSysMac = actorSysMac;
+ this.actorSysMacSet = true;
+ return this;
+ }
+ @Override
+ public int getActorPortPriority() {
+ return actorPortPriority;
+ }
+
+ @Override
+ public OFBsnSetLacpRequest.Builder setActorPortPriority(int actorPortPriority) {
+ this.actorPortPriority = actorPortPriority;
+ this.actorPortPrioritySet = true;
+ return this;
+ }
+ @Override
+ public int getActorPortNum() {
+ return actorPortNum;
+ }
+
+ @Override
+ public OFBsnSetLacpRequest.Builder setActorPortNum(int actorPortNum) {
+ this.actorPortNum = actorPortNum;
+ this.actorPortNumSet = true;
+ return this;
+ }
+ @Override
+ public int getActorKey() {
+ return actorKey;
+ }
+
+ @Override
+ public OFBsnSetLacpRequest.Builder setActorKey(int actorKey) {
+ this.actorKey = actorKey;
+ this.actorKeySet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnSetLacpRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ short enabled = this.enabledSet ? this.enabled : DEFAULT_ENABLED;
+ OFPort portNo = this.portNoSet ? this.portNo : DEFAULT_PORT_NO;
+ if(portNo == null)
+ throw new NullPointerException("Property portNo must not be null");
+ int actorSysPriority = this.actorSysPrioritySet ? this.actorSysPriority : DEFAULT_ACTOR_SYS_PRIORITY;
+ MacAddress actorSysMac = this.actorSysMacSet ? this.actorSysMac : DEFAULT_ACTOR_SYS_MAC;
+ if(actorSysMac == null)
+ throw new NullPointerException("Property actorSysMac must not be null");
+ int actorPortPriority = this.actorPortPrioritySet ? this.actorPortPriority : DEFAULT_ACTOR_PORT_PRIORITY;
+ int actorPortNum = this.actorPortNumSet ? this.actorPortNum : DEFAULT_ACTOR_PORT_NUM;
+ int actorKey = this.actorKeySet ? this.actorKey : DEFAULT_ACTOR_KEY;
+
+
+ return new OFBsnSetLacpRequestVer13(
+ xid,
+ enabled,
+ portNo,
+ actorSysPriority,
+ actorSysMac,
+ actorPortPriority,
+ actorPortNum,
+ actorKey
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnSetLacpRequest> {
+ @Override
+ public OFBsnSetLacpRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 4
+ byte type = bb.readByte();
+ if(type != (byte) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 38)
+ throw new OFParseError("Wrong length: Expected=38(38), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x29L
+ int subtype = bb.readInt();
+ if(subtype != 0x29)
+ throw new OFParseError("Wrong subtype: Expected=0x29L(0x29L), got="+subtype);
+ short enabled = U8.f(bb.readByte());
+ // pad: 3 bytes
+ bb.skipBytes(3);
+ OFPort portNo = OFPort.read4Bytes(bb);
+ int actorSysPriority = U16.f(bb.readShort());
+ MacAddress actorSysMac = MacAddress.read6Bytes(bb);
+ int actorPortPriority = U16.f(bb.readShort());
+ int actorPortNum = U16.f(bb.readShort());
+ int actorKey = U16.f(bb.readShort());
+
+ OFBsnSetLacpRequestVer13 bsnSetLacpRequestVer13 = new OFBsnSetLacpRequestVer13(
+ xid,
+ enabled,
+ portNo,
+ actorSysPriority,
+ actorSysMac,
+ actorPortPriority,
+ actorPortNum,
+ actorKey
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnSetLacpRequestVer13);
+ return bsnSetLacpRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnSetLacpRequestVer13Funnel FUNNEL = new OFBsnSetLacpRequestVer13Funnel();
+ static class OFBsnSetLacpRequestVer13Funnel implements Funnel<OFBsnSetLacpRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnSetLacpRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property length = 38
+ sink.putShort((short) 0x26);
+ sink.putLong(message.xid);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x29L
+ sink.putInt(0x29);
+ sink.putShort(message.enabled);
+ // skip pad (3 bytes)
+ message.portNo.putTo(sink);
+ sink.putInt(message.actorSysPriority);
+ message.actorSysMac.putTo(sink);
+ sink.putInt(message.actorPortPriority);
+ sink.putInt(message.actorPortNum);
+ sink.putInt(message.actorKey);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnSetLacpRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnSetLacpRequestVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property length = 38
+ bb.writeShort((short) 0x26);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x29L
+ bb.writeInt(0x29);
+ bb.writeByte(U8.t(message.enabled));
+ // pad: 3 bytes
+ bb.writeZero(3);
+ message.portNo.write4Bytes(bb);
+ bb.writeShort(U16.t(message.actorSysPriority));
+ message.actorSysMac.write6Bytes(bb);
+ bb.writeShort(U16.t(message.actorPortPriority));
+ bb.writeShort(U16.t(message.actorPortNum));
+ bb.writeShort(U16.t(message.actorKey));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnSetLacpRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("enabled=").append(enabled);
+ b.append(", ");
+ b.append("portNo=").append(portNo);
+ b.append(", ");
+ b.append("actorSysPriority=").append(actorSysPriority);
+ b.append(", ");
+ b.append("actorSysMac=").append(actorSysMac);
+ b.append(", ");
+ b.append("actorPortPriority=").append(actorPortPriority);
+ b.append(", ");
+ b.append("actorPortNum=").append(actorPortNum);
+ b.append(", ");
+ b.append("actorKey=").append(actorKey);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnSetLacpRequestVer13 other = (OFBsnSetLacpRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if( enabled != other.enabled)
+ return false;
+ if (portNo == null) {
+ if (other.portNo != null)
+ return false;
+ } else if (!portNo.equals(other.portNo))
+ return false;
+ if( actorSysPriority != other.actorSysPriority)
+ return false;
+ if (actorSysMac == null) {
+ if (other.actorSysMac != null)
+ return false;
+ } else if (!actorSysMac.equals(other.actorSysMac))
+ return false;
+ if( actorPortPriority != other.actorPortPriority)
+ return false;
+ if( actorPortNum != other.actorPortNum)
+ return false;
+ if( actorKey != other.actorKey)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + enabled;
+ result = prime * result + ((portNo == null) ? 0 : portNo.hashCode());
+ result = prime * result + actorSysPriority;
+ result = prime * result + ((actorSysMac == null) ? 0 : actorSysMac.hashCode());
+ result = prime * result + actorPortPriority;
+ result = prime * result + actorPortNum;
+ result = prime * result + actorKey;
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnSetMirroringVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnSetMirroringVer13.java
new file mode 100644
index 0000000..bf447a9
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnSetMirroringVer13.java
@@ -0,0 +1,366 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import java.util.Set;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnSetMirroringVer13 implements OFBsnSetMirroring {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnSetMirroringVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 20;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static short DEFAULT_REPORT_MIRROR_PORTS = (short) 0x0;
+
+ // OF message fields
+ private final long xid;
+ private final short reportMirrorPorts;
+//
+ // Immutable default instance
+ final static OFBsnSetMirroringVer13 DEFAULT = new OFBsnSetMirroringVer13(
+ DEFAULT_XID, DEFAULT_REPORT_MIRROR_PORTS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnSetMirroringVer13(long xid, short reportMirrorPorts) {
+ this.xid = xid;
+ this.reportMirrorPorts = reportMirrorPorts;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x3L;
+ }
+
+ @Override
+ public short getReportMirrorPorts() {
+ return reportMirrorPorts;
+ }
+
+
+
+ public OFBsnSetMirroring.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnSetMirroring.Builder {
+ final OFBsnSetMirroringVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean reportMirrorPortsSet;
+ private short reportMirrorPorts;
+
+ BuilderWithParent(OFBsnSetMirroringVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnSetMirroring.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x3L;
+ }
+
+ @Override
+ public short getReportMirrorPorts() {
+ return reportMirrorPorts;
+ }
+
+ @Override
+ public OFBsnSetMirroring.Builder setReportMirrorPorts(short reportMirrorPorts) {
+ this.reportMirrorPorts = reportMirrorPorts;
+ this.reportMirrorPortsSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnSetMirroring build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ short reportMirrorPorts = this.reportMirrorPortsSet ? this.reportMirrorPorts : parentMessage.reportMirrorPorts;
+
+ //
+ return new OFBsnSetMirroringVer13(
+ xid,
+ reportMirrorPorts
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnSetMirroring.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean reportMirrorPortsSet;
+ private short reportMirrorPorts;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnSetMirroring.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x3L;
+ }
+
+ @Override
+ public short getReportMirrorPorts() {
+ return reportMirrorPorts;
+ }
+
+ @Override
+ public OFBsnSetMirroring.Builder setReportMirrorPorts(short reportMirrorPorts) {
+ this.reportMirrorPorts = reportMirrorPorts;
+ this.reportMirrorPortsSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnSetMirroring build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ short reportMirrorPorts = this.reportMirrorPortsSet ? this.reportMirrorPorts : DEFAULT_REPORT_MIRROR_PORTS;
+
+
+ return new OFBsnSetMirroringVer13(
+ xid,
+ reportMirrorPorts
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnSetMirroring> {
+ @Override
+ public OFBsnSetMirroring readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 4
+ byte type = bb.readByte();
+ if(type != (byte) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 20)
+ throw new OFParseError("Wrong length: Expected=20(20), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x3L
+ int subtype = bb.readInt();
+ if(subtype != 0x3)
+ throw new OFParseError("Wrong subtype: Expected=0x3L(0x3L), got="+subtype);
+ short reportMirrorPorts = U8.f(bb.readByte());
+ // pad: 3 bytes
+ bb.skipBytes(3);
+
+ OFBsnSetMirroringVer13 bsnSetMirroringVer13 = new OFBsnSetMirroringVer13(
+ xid,
+ reportMirrorPorts
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnSetMirroringVer13);
+ return bsnSetMirroringVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnSetMirroringVer13Funnel FUNNEL = new OFBsnSetMirroringVer13Funnel();
+ static class OFBsnSetMirroringVer13Funnel implements Funnel<OFBsnSetMirroringVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnSetMirroringVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property length = 20
+ sink.putShort((short) 0x14);
+ sink.putLong(message.xid);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x3L
+ sink.putInt(0x3);
+ sink.putShort(message.reportMirrorPorts);
+ // skip pad (3 bytes)
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnSetMirroringVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnSetMirroringVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property length = 20
+ bb.writeShort((short) 0x14);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x3L
+ bb.writeInt(0x3);
+ bb.writeByte(U8.t(message.reportMirrorPorts));
+ // pad: 3 bytes
+ bb.writeZero(3);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnSetMirroringVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("reportMirrorPorts=").append(reportMirrorPorts);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnSetMirroringVer13 other = (OFBsnSetMirroringVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if( reportMirrorPorts != other.reportMirrorPorts)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + reportMirrorPorts;
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnSetPktinSuppressionReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnSetPktinSuppressionReplyVer13.java
new file mode 100644
index 0000000..2ff9aeb
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnSetPktinSuppressionReplyVer13.java
@@ -0,0 +1,361 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import java.util.Set;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnSetPktinSuppressionReplyVer13 implements OFBsnSetPktinSuppressionReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnSetPktinSuppressionReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 20;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static long DEFAULT_STATUS = 0x0L;
+
+ // OF message fields
+ private final long xid;
+ private final long status;
+//
+ // Immutable default instance
+ final static OFBsnSetPktinSuppressionReplyVer13 DEFAULT = new OFBsnSetPktinSuppressionReplyVer13(
+ DEFAULT_XID, DEFAULT_STATUS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnSetPktinSuppressionReplyVer13(long xid, long status) {
+ this.xid = xid;
+ this.status = status;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x19L;
+ }
+
+ @Override
+ public long getStatus() {
+ return status;
+ }
+
+
+
+ public OFBsnSetPktinSuppressionReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnSetPktinSuppressionReply.Builder {
+ final OFBsnSetPktinSuppressionReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean statusSet;
+ private long status;
+
+ BuilderWithParent(OFBsnSetPktinSuppressionReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnSetPktinSuppressionReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x19L;
+ }
+
+ @Override
+ public long getStatus() {
+ return status;
+ }
+
+ @Override
+ public OFBsnSetPktinSuppressionReply.Builder setStatus(long status) {
+ this.status = status;
+ this.statusSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnSetPktinSuppressionReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ long status = this.statusSet ? this.status : parentMessage.status;
+
+ //
+ return new OFBsnSetPktinSuppressionReplyVer13(
+ xid,
+ status
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnSetPktinSuppressionReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean statusSet;
+ private long status;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnSetPktinSuppressionReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x19L;
+ }
+
+ @Override
+ public long getStatus() {
+ return status;
+ }
+
+ @Override
+ public OFBsnSetPktinSuppressionReply.Builder setStatus(long status) {
+ this.status = status;
+ this.statusSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnSetPktinSuppressionReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ long status = this.statusSet ? this.status : DEFAULT_STATUS;
+
+
+ return new OFBsnSetPktinSuppressionReplyVer13(
+ xid,
+ status
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnSetPktinSuppressionReply> {
+ @Override
+ public OFBsnSetPktinSuppressionReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 4
+ byte type = bb.readByte();
+ if(type != (byte) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 20)
+ throw new OFParseError("Wrong length: Expected=20(20), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x19L
+ int subtype = bb.readInt();
+ if(subtype != 0x19)
+ throw new OFParseError("Wrong subtype: Expected=0x19L(0x19L), got="+subtype);
+ long status = U32.f(bb.readInt());
+
+ OFBsnSetPktinSuppressionReplyVer13 bsnSetPktinSuppressionReplyVer13 = new OFBsnSetPktinSuppressionReplyVer13(
+ xid,
+ status
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnSetPktinSuppressionReplyVer13);
+ return bsnSetPktinSuppressionReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnSetPktinSuppressionReplyVer13Funnel FUNNEL = new OFBsnSetPktinSuppressionReplyVer13Funnel();
+ static class OFBsnSetPktinSuppressionReplyVer13Funnel implements Funnel<OFBsnSetPktinSuppressionReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnSetPktinSuppressionReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property length = 20
+ sink.putShort((short) 0x14);
+ sink.putLong(message.xid);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x19L
+ sink.putInt(0x19);
+ sink.putLong(message.status);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnSetPktinSuppressionReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnSetPktinSuppressionReplyVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property length = 20
+ bb.writeShort((short) 0x14);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x19L
+ bb.writeInt(0x19);
+ bb.writeInt(U32.t(message.status));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnSetPktinSuppressionReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("status=").append(status);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnSetPktinSuppressionReplyVer13 other = (OFBsnSetPktinSuppressionReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if( status != other.status)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * (int) (status ^ (status >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnSetPktinSuppressionRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnSetPktinSuppressionRequestVer13.java
new file mode 100644
index 0000000..84ab62f
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnSetPktinSuppressionRequestVer13.java
@@ -0,0 +1,561 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import java.util.Set;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnSetPktinSuppressionRequestVer13 implements OFBsnSetPktinSuppressionRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnSetPktinSuppressionRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 32;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static boolean DEFAULT_ENABLED = false;
+ private final static int DEFAULT_IDLE_TIMEOUT = 0x0;
+ private final static int DEFAULT_HARD_TIMEOUT = 0x0;
+ private final static int DEFAULT_PRIORITY = 0x0;
+ private final static U64 DEFAULT_COOKIE = U64.ZERO;
+
+ // OF message fields
+ private final long xid;
+ private final boolean enabled;
+ private final int idleTimeout;
+ private final int hardTimeout;
+ private final int priority;
+ private final U64 cookie;
+//
+ // Immutable default instance
+ final static OFBsnSetPktinSuppressionRequestVer13 DEFAULT = new OFBsnSetPktinSuppressionRequestVer13(
+ DEFAULT_XID, DEFAULT_ENABLED, DEFAULT_IDLE_TIMEOUT, DEFAULT_HARD_TIMEOUT, DEFAULT_PRIORITY, DEFAULT_COOKIE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnSetPktinSuppressionRequestVer13(long xid, boolean enabled, int idleTimeout, int hardTimeout, int priority, U64 cookie) {
+ this.xid = xid;
+ this.enabled = enabled;
+ this.idleTimeout = idleTimeout;
+ this.hardTimeout = hardTimeout;
+ this.priority = priority;
+ this.cookie = cookie;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0xbL;
+ }
+
+ @Override
+ public boolean isEnabled() {
+ return enabled;
+ }
+
+ @Override
+ public int getIdleTimeout() {
+ return idleTimeout;
+ }
+
+ @Override
+ public int getHardTimeout() {
+ return hardTimeout;
+ }
+
+ @Override
+ public int getPriority() {
+ return priority;
+ }
+
+ @Override
+ public U64 getCookie() {
+ return cookie;
+ }
+
+
+
+ public OFBsnSetPktinSuppressionRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnSetPktinSuppressionRequest.Builder {
+ final OFBsnSetPktinSuppressionRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean enabledSet;
+ private boolean enabled;
+ private boolean idleTimeoutSet;
+ private int idleTimeout;
+ private boolean hardTimeoutSet;
+ private int hardTimeout;
+ private boolean prioritySet;
+ private int priority;
+ private boolean cookieSet;
+ private U64 cookie;
+
+ BuilderWithParent(OFBsnSetPktinSuppressionRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnSetPktinSuppressionRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0xbL;
+ }
+
+ @Override
+ public boolean isEnabled() {
+ return enabled;
+ }
+
+ @Override
+ public OFBsnSetPktinSuppressionRequest.Builder setEnabled(boolean enabled) {
+ this.enabled = enabled;
+ this.enabledSet = true;
+ return this;
+ }
+ @Override
+ public int getIdleTimeout() {
+ return idleTimeout;
+ }
+
+ @Override
+ public OFBsnSetPktinSuppressionRequest.Builder setIdleTimeout(int idleTimeout) {
+ this.idleTimeout = idleTimeout;
+ this.idleTimeoutSet = true;
+ return this;
+ }
+ @Override
+ public int getHardTimeout() {
+ return hardTimeout;
+ }
+
+ @Override
+ public OFBsnSetPktinSuppressionRequest.Builder setHardTimeout(int hardTimeout) {
+ this.hardTimeout = hardTimeout;
+ this.hardTimeoutSet = true;
+ return this;
+ }
+ @Override
+ public int getPriority() {
+ return priority;
+ }
+
+ @Override
+ public OFBsnSetPktinSuppressionRequest.Builder setPriority(int priority) {
+ this.priority = priority;
+ this.prioritySet = true;
+ return this;
+ }
+ @Override
+ public U64 getCookie() {
+ return cookie;
+ }
+
+ @Override
+ public OFBsnSetPktinSuppressionRequest.Builder setCookie(U64 cookie) {
+ this.cookie = cookie;
+ this.cookieSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnSetPktinSuppressionRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ boolean enabled = this.enabledSet ? this.enabled : parentMessage.enabled;
+ int idleTimeout = this.idleTimeoutSet ? this.idleTimeout : parentMessage.idleTimeout;
+ int hardTimeout = this.hardTimeoutSet ? this.hardTimeout : parentMessage.hardTimeout;
+ int priority = this.prioritySet ? this.priority : parentMessage.priority;
+ U64 cookie = this.cookieSet ? this.cookie : parentMessage.cookie;
+ if(cookie == null)
+ throw new NullPointerException("Property cookie must not be null");
+
+ //
+ return new OFBsnSetPktinSuppressionRequestVer13(
+ xid,
+ enabled,
+ idleTimeout,
+ hardTimeout,
+ priority,
+ cookie
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnSetPktinSuppressionRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean enabledSet;
+ private boolean enabled;
+ private boolean idleTimeoutSet;
+ private int idleTimeout;
+ private boolean hardTimeoutSet;
+ private int hardTimeout;
+ private boolean prioritySet;
+ private int priority;
+ private boolean cookieSet;
+ private U64 cookie;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnSetPktinSuppressionRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0xbL;
+ }
+
+ @Override
+ public boolean isEnabled() {
+ return enabled;
+ }
+
+ @Override
+ public OFBsnSetPktinSuppressionRequest.Builder setEnabled(boolean enabled) {
+ this.enabled = enabled;
+ this.enabledSet = true;
+ return this;
+ }
+ @Override
+ public int getIdleTimeout() {
+ return idleTimeout;
+ }
+
+ @Override
+ public OFBsnSetPktinSuppressionRequest.Builder setIdleTimeout(int idleTimeout) {
+ this.idleTimeout = idleTimeout;
+ this.idleTimeoutSet = true;
+ return this;
+ }
+ @Override
+ public int getHardTimeout() {
+ return hardTimeout;
+ }
+
+ @Override
+ public OFBsnSetPktinSuppressionRequest.Builder setHardTimeout(int hardTimeout) {
+ this.hardTimeout = hardTimeout;
+ this.hardTimeoutSet = true;
+ return this;
+ }
+ @Override
+ public int getPriority() {
+ return priority;
+ }
+
+ @Override
+ public OFBsnSetPktinSuppressionRequest.Builder setPriority(int priority) {
+ this.priority = priority;
+ this.prioritySet = true;
+ return this;
+ }
+ @Override
+ public U64 getCookie() {
+ return cookie;
+ }
+
+ @Override
+ public OFBsnSetPktinSuppressionRequest.Builder setCookie(U64 cookie) {
+ this.cookie = cookie;
+ this.cookieSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnSetPktinSuppressionRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ boolean enabled = this.enabledSet ? this.enabled : DEFAULT_ENABLED;
+ int idleTimeout = this.idleTimeoutSet ? this.idleTimeout : DEFAULT_IDLE_TIMEOUT;
+ int hardTimeout = this.hardTimeoutSet ? this.hardTimeout : DEFAULT_HARD_TIMEOUT;
+ int priority = this.prioritySet ? this.priority : DEFAULT_PRIORITY;
+ U64 cookie = this.cookieSet ? this.cookie : DEFAULT_COOKIE;
+ if(cookie == null)
+ throw new NullPointerException("Property cookie must not be null");
+
+
+ return new OFBsnSetPktinSuppressionRequestVer13(
+ xid,
+ enabled,
+ idleTimeout,
+ hardTimeout,
+ priority,
+ cookie
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnSetPktinSuppressionRequest> {
+ @Override
+ public OFBsnSetPktinSuppressionRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 4
+ byte type = bb.readByte();
+ if(type != (byte) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 32)
+ throw new OFParseError("Wrong length: Expected=32(32), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0xbL
+ int subtype = bb.readInt();
+ if(subtype != 0xb)
+ throw new OFParseError("Wrong subtype: Expected=0xbL(0xbL), got="+subtype);
+ boolean enabled = (bb.readByte() != 0);
+ // pad: 1 bytes
+ bb.skipBytes(1);
+ int idleTimeout = U16.f(bb.readShort());
+ int hardTimeout = U16.f(bb.readShort());
+ int priority = U16.f(bb.readShort());
+ U64 cookie = U64.ofRaw(bb.readLong());
+
+ OFBsnSetPktinSuppressionRequestVer13 bsnSetPktinSuppressionRequestVer13 = new OFBsnSetPktinSuppressionRequestVer13(
+ xid,
+ enabled,
+ idleTimeout,
+ hardTimeout,
+ priority,
+ cookie
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnSetPktinSuppressionRequestVer13);
+ return bsnSetPktinSuppressionRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnSetPktinSuppressionRequestVer13Funnel FUNNEL = new OFBsnSetPktinSuppressionRequestVer13Funnel();
+ static class OFBsnSetPktinSuppressionRequestVer13Funnel implements Funnel<OFBsnSetPktinSuppressionRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnSetPktinSuppressionRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property length = 32
+ sink.putShort((short) 0x20);
+ sink.putLong(message.xid);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0xbL
+ sink.putInt(0xb);
+ sink.putBoolean(message.enabled);
+ // skip pad (1 bytes)
+ sink.putInt(message.idleTimeout);
+ sink.putInt(message.hardTimeout);
+ sink.putInt(message.priority);
+ message.cookie.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnSetPktinSuppressionRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnSetPktinSuppressionRequestVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property length = 32
+ bb.writeShort((short) 0x20);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0xbL
+ bb.writeInt(0xb);
+ bb.writeByte(message.enabled ? 1 : 0);
+ // pad: 1 bytes
+ bb.writeZero(1);
+ bb.writeShort(U16.t(message.idleTimeout));
+ bb.writeShort(U16.t(message.hardTimeout));
+ bb.writeShort(U16.t(message.priority));
+ bb.writeLong(message.cookie.getValue());
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnSetPktinSuppressionRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("enabled=").append(enabled);
+ b.append(", ");
+ b.append("idleTimeout=").append(idleTimeout);
+ b.append(", ");
+ b.append("hardTimeout=").append(hardTimeout);
+ b.append(", ");
+ b.append("priority=").append(priority);
+ b.append(", ");
+ b.append("cookie=").append(cookie);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnSetPktinSuppressionRequestVer13 other = (OFBsnSetPktinSuppressionRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if( enabled != other.enabled)
+ return false;
+ if( idleTimeout != other.idleTimeout)
+ return false;
+ if( hardTimeout != other.hardTimeout)
+ return false;
+ if( priority != other.priority)
+ return false;
+ if (cookie == null) {
+ if (other.cookie != null)
+ return false;
+ } else if (!cookie.equals(other.cookie))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + (enabled ? 1231 : 1237);
+ result = prime * result + idleTimeout;
+ result = prime * result + hardTimeout;
+ result = prime * result + priority;
+ result = prime * result + ((cookie == null) ? 0 : cookie.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnSetSwitchPipelineReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnSetSwitchPipelineReplyVer13.java
new file mode 100644
index 0000000..c8eb9e0
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnSetSwitchPipelineReplyVer13.java
@@ -0,0 +1,361 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import java.util.Set;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnSetSwitchPipelineReplyVer13 implements OFBsnSetSwitchPipelineReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnSetSwitchPipelineReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 20;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static long DEFAULT_STATUS = 0x0L;
+
+ // OF message fields
+ private final long xid;
+ private final long status;
+//
+ // Immutable default instance
+ final static OFBsnSetSwitchPipelineReplyVer13 DEFAULT = new OFBsnSetSwitchPipelineReplyVer13(
+ DEFAULT_XID, DEFAULT_STATUS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnSetSwitchPipelineReplyVer13(long xid, long status) {
+ this.xid = xid;
+ this.status = status;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x36L;
+ }
+
+ @Override
+ public long getStatus() {
+ return status;
+ }
+
+
+
+ public OFBsnSetSwitchPipelineReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnSetSwitchPipelineReply.Builder {
+ final OFBsnSetSwitchPipelineReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean statusSet;
+ private long status;
+
+ BuilderWithParent(OFBsnSetSwitchPipelineReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnSetSwitchPipelineReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x36L;
+ }
+
+ @Override
+ public long getStatus() {
+ return status;
+ }
+
+ @Override
+ public OFBsnSetSwitchPipelineReply.Builder setStatus(long status) {
+ this.status = status;
+ this.statusSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnSetSwitchPipelineReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ long status = this.statusSet ? this.status : parentMessage.status;
+
+ //
+ return new OFBsnSetSwitchPipelineReplyVer13(
+ xid,
+ status
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnSetSwitchPipelineReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean statusSet;
+ private long status;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnSetSwitchPipelineReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x36L;
+ }
+
+ @Override
+ public long getStatus() {
+ return status;
+ }
+
+ @Override
+ public OFBsnSetSwitchPipelineReply.Builder setStatus(long status) {
+ this.status = status;
+ this.statusSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnSetSwitchPipelineReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ long status = this.statusSet ? this.status : DEFAULT_STATUS;
+
+
+ return new OFBsnSetSwitchPipelineReplyVer13(
+ xid,
+ status
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnSetSwitchPipelineReply> {
+ @Override
+ public OFBsnSetSwitchPipelineReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 4
+ byte type = bb.readByte();
+ if(type != (byte) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 20)
+ throw new OFParseError("Wrong length: Expected=20(20), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x36L
+ int subtype = bb.readInt();
+ if(subtype != 0x36)
+ throw new OFParseError("Wrong subtype: Expected=0x36L(0x36L), got="+subtype);
+ long status = U32.f(bb.readInt());
+
+ OFBsnSetSwitchPipelineReplyVer13 bsnSetSwitchPipelineReplyVer13 = new OFBsnSetSwitchPipelineReplyVer13(
+ xid,
+ status
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnSetSwitchPipelineReplyVer13);
+ return bsnSetSwitchPipelineReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnSetSwitchPipelineReplyVer13Funnel FUNNEL = new OFBsnSetSwitchPipelineReplyVer13Funnel();
+ static class OFBsnSetSwitchPipelineReplyVer13Funnel implements Funnel<OFBsnSetSwitchPipelineReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnSetSwitchPipelineReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property length = 20
+ sink.putShort((short) 0x14);
+ sink.putLong(message.xid);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x36L
+ sink.putInt(0x36);
+ sink.putLong(message.status);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnSetSwitchPipelineReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnSetSwitchPipelineReplyVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property length = 20
+ bb.writeShort((short) 0x14);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x36L
+ bb.writeInt(0x36);
+ bb.writeInt(U32.t(message.status));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnSetSwitchPipelineReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("status=").append(status);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnSetSwitchPipelineReplyVer13 other = (OFBsnSetSwitchPipelineReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if( status != other.status)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * (int) (status ^ (status >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnSetSwitchPipelineRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnSetSwitchPipelineRequestVer13.java
new file mode 100644
index 0000000..a5aa2a6
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnSetSwitchPipelineRequestVer13.java
@@ -0,0 +1,368 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import java.util.Set;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnSetSwitchPipelineRequestVer13 implements OFBsnSetSwitchPipelineRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnSetSwitchPipelineRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 272;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static String DEFAULT_PIPELINE = "";
+
+ // OF message fields
+ private final long xid;
+ private final String pipeline;
+//
+ // Immutable default instance
+ final static OFBsnSetSwitchPipelineRequestVer13 DEFAULT = new OFBsnSetSwitchPipelineRequestVer13(
+ DEFAULT_XID, DEFAULT_PIPELINE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnSetSwitchPipelineRequestVer13(long xid, String pipeline) {
+ this.xid = xid;
+ this.pipeline = pipeline;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x35L;
+ }
+
+ @Override
+ public String getPipeline() {
+ return pipeline;
+ }
+
+
+
+ public OFBsnSetSwitchPipelineRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnSetSwitchPipelineRequest.Builder {
+ final OFBsnSetSwitchPipelineRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean pipelineSet;
+ private String pipeline;
+
+ BuilderWithParent(OFBsnSetSwitchPipelineRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnSetSwitchPipelineRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x35L;
+ }
+
+ @Override
+ public String getPipeline() {
+ return pipeline;
+ }
+
+ @Override
+ public OFBsnSetSwitchPipelineRequest.Builder setPipeline(String pipeline) {
+ this.pipeline = pipeline;
+ this.pipelineSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnSetSwitchPipelineRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ String pipeline = this.pipelineSet ? this.pipeline : parentMessage.pipeline;
+ if(pipeline == null)
+ throw new NullPointerException("Property pipeline must not be null");
+
+ //
+ return new OFBsnSetSwitchPipelineRequestVer13(
+ xid,
+ pipeline
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnSetSwitchPipelineRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean pipelineSet;
+ private String pipeline;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnSetSwitchPipelineRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x35L;
+ }
+
+ @Override
+ public String getPipeline() {
+ return pipeline;
+ }
+
+ @Override
+ public OFBsnSetSwitchPipelineRequest.Builder setPipeline(String pipeline) {
+ this.pipeline = pipeline;
+ this.pipelineSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnSetSwitchPipelineRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ String pipeline = this.pipelineSet ? this.pipeline : DEFAULT_PIPELINE;
+ if(pipeline == null)
+ throw new NullPointerException("Property pipeline must not be null");
+
+
+ return new OFBsnSetSwitchPipelineRequestVer13(
+ xid,
+ pipeline
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnSetSwitchPipelineRequest> {
+ @Override
+ public OFBsnSetSwitchPipelineRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 4
+ byte type = bb.readByte();
+ if(type != (byte) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 272)
+ throw new OFParseError("Wrong length: Expected=272(272), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x35L
+ int subtype = bb.readInt();
+ if(subtype != 0x35)
+ throw new OFParseError("Wrong subtype: Expected=0x35L(0x35L), got="+subtype);
+ String pipeline = ChannelUtils.readFixedLengthString(bb, 256);
+
+ OFBsnSetSwitchPipelineRequestVer13 bsnSetSwitchPipelineRequestVer13 = new OFBsnSetSwitchPipelineRequestVer13(
+ xid,
+ pipeline
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnSetSwitchPipelineRequestVer13);
+ return bsnSetSwitchPipelineRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnSetSwitchPipelineRequestVer13Funnel FUNNEL = new OFBsnSetSwitchPipelineRequestVer13Funnel();
+ static class OFBsnSetSwitchPipelineRequestVer13Funnel implements Funnel<OFBsnSetSwitchPipelineRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnSetSwitchPipelineRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property length = 272
+ sink.putShort((short) 0x110);
+ sink.putLong(message.xid);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x35L
+ sink.putInt(0x35);
+ sink.putUnencodedChars(message.pipeline);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnSetSwitchPipelineRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnSetSwitchPipelineRequestVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property length = 272
+ bb.writeShort((short) 0x110);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x35L
+ bb.writeInt(0x35);
+ ChannelUtils.writeFixedLengthString(bb, message.pipeline, 256);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnSetSwitchPipelineRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("pipeline=").append(pipeline);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnSetSwitchPipelineRequestVer13 other = (OFBsnSetSwitchPipelineRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (pipeline == null) {
+ if (other.pipeline != null)
+ return false;
+ } else if (!pipeline.equals(other.pipeline))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((pipeline == null) ? 0 : pipeline.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnStatsReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnStatsReplyVer13.java
new file mode 100644
index 0000000..b6151d4
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnStatsReplyVer13.java
@@ -0,0 +1,118 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_virtual_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.jboss.netty.buffer.ChannelBuffer;
+
+abstract class OFBsnStatsReplyVer13 {
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 24;
+
+
+ public final static OFBsnStatsReplyVer13.Reader READER = new Reader();
+
+ static class Reader implements OFMessageReader<OFBsnStatsReply> {
+ @Override
+ public OFBsnStatsReply readFrom(ChannelBuffer bb) throws OFParseError {
+ if(bb.readableBytes() < MINIMUM_LENGTH)
+ return null;
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 19
+ byte type = bb.readByte();
+ if(type != (byte) 0x13)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REPLY(19), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ U32.f(bb.readInt());
+ // fixed value property statsType == 65535
+ short statsType = bb.readShort();
+ if(statsType != (short) 0xffff)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.EXPERIMENTER(65535), got="+statsType);
+ OFStatsReplyFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ int subtype = bb.readInt();
+ bb.readerIndex(start);
+ switch(subtype) {
+ case 0xd:
+ // discriminator value 0xdL=0xdL for class OFBsnDebugCounterDescStatsReplyVer13
+ return OFBsnDebugCounterDescStatsReplyVer13.READER.readFrom(bb);
+ case 0xc:
+ // discriminator value 0xcL=0xcL for class OFBsnDebugCounterStatsReplyVer13
+ return OFBsnDebugCounterStatsReplyVer13.READER.readFrom(bb);
+ case 0xa:
+ // discriminator value 0xaL=0xaL for class OFBsnFlowChecksumBucketStatsReplyVer13
+ return OFBsnFlowChecksumBucketStatsReplyVer13.READER.readFrom(bb);
+ case 0x5:
+ // discriminator value 0x5L=0x5L for class OFBsnGentableBucketStatsReplyVer13
+ return OFBsnGentableBucketStatsReplyVer13.READER.readFrom(bb);
+ case 0x4:
+ // discriminator value 0x4L=0x4L for class OFBsnGentableDescStatsReplyVer13
+ return OFBsnGentableDescStatsReplyVer13.READER.readFrom(bb);
+ case 0x2:
+ // discriminator value 0x2L=0x2L for class OFBsnGentableEntryDescStatsReplyVer13
+ return OFBsnGentableEntryDescStatsReplyVer13.READER.readFrom(bb);
+ case 0x3:
+ // discriminator value 0x3L=0x3L for class OFBsnGentableEntryStatsReplyVer13
+ return OFBsnGentableEntryStatsReplyVer13.READER.readFrom(bb);
+ case 0x7:
+ // discriminator value 0x7L=0x7L for class OFBsnGentableStatsReplyVer13
+ return OFBsnGentableStatsReplyVer13.READER.readFrom(bb);
+ case 0xe:
+ // discriminator value 0xeL=0xeL for class OFBsnImageDescStatsReplyVer13
+ return OFBsnImageDescStatsReplyVer13.READER.readFrom(bb);
+ case 0x1:
+ // discriminator value 0x1L=0x1L for class OFBsnLacpStatsReplyVer13
+ return OFBsnLacpStatsReplyVer13.READER.readFrom(bb);
+ case 0x8:
+ // discriminator value 0x8L=0x8L for class OFBsnPortCounterStatsReplyVer13
+ return OFBsnPortCounterStatsReplyVer13.READER.readFrom(bb);
+ case 0x6:
+ // discriminator value 0x6L=0x6L for class OFBsnSwitchPipelineStatsReplyVer13
+ return OFBsnSwitchPipelineStatsReplyVer13.READER.readFrom(bb);
+ case 0xb:
+ // discriminator value 0xbL=0xbL for class OFBsnTableChecksumStatsReplyVer13
+ return OFBsnTableChecksumStatsReplyVer13.READER.readFrom(bb);
+ case 0x9:
+ // discriminator value 0x9L=0x9L for class OFBsnVlanCounterStatsReplyVer13
+ return OFBsnVlanCounterStatsReplyVer13.READER.readFrom(bb);
+ case 0xf:
+ // discriminator value 0xfL=0xfL for class OFBsnVrfCounterStatsReplyVer13
+ return OFBsnVrfCounterStatsReplyVer13.READER.readFrom(bb);
+ default:
+ throw new OFParseError("Unknown value for discriminator subtype of class OFBsnStatsReplyVer13: " + subtype);
+ }
+ }
+ }
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnStatsRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnStatsRequestVer13.java
new file mode 100644
index 0000000..47aad4c
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnStatsRequestVer13.java
@@ -0,0 +1,118 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_virtual_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.jboss.netty.buffer.ChannelBuffer;
+
+abstract class OFBsnStatsRequestVer13 {
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 24;
+
+
+ public final static OFBsnStatsRequestVer13.Reader READER = new Reader();
+
+ static class Reader implements OFMessageReader<OFBsnStatsRequest<?>> {
+ @Override
+ public OFBsnStatsRequest<?> readFrom(ChannelBuffer bb) throws OFParseError {
+ if(bb.readableBytes() < MINIMUM_LENGTH)
+ return null;
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 18
+ byte type = bb.readByte();
+ if(type != (byte) 0x12)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REQUEST(18), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ U32.f(bb.readInt());
+ // fixed value property statsType == 65535
+ short statsType = bb.readShort();
+ if(statsType != (short) 0xffff)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.EXPERIMENTER(65535), got="+statsType);
+ OFStatsRequestFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ int subtype = bb.readInt();
+ bb.readerIndex(start);
+ switch(subtype) {
+ case 0xd:
+ // discriminator value 0xdL=0xdL for class OFBsnDebugCounterDescStatsRequestVer13
+ return OFBsnDebugCounterDescStatsRequestVer13.READER.readFrom(bb);
+ case 0xc:
+ // discriminator value 0xcL=0xcL for class OFBsnDebugCounterStatsRequestVer13
+ return OFBsnDebugCounterStatsRequestVer13.READER.readFrom(bb);
+ case 0xa:
+ // discriminator value 0xaL=0xaL for class OFBsnFlowChecksumBucketStatsRequestVer13
+ return OFBsnFlowChecksumBucketStatsRequestVer13.READER.readFrom(bb);
+ case 0x5:
+ // discriminator value 0x5L=0x5L for class OFBsnGentableBucketStatsRequestVer13
+ return OFBsnGentableBucketStatsRequestVer13.READER.readFrom(bb);
+ case 0x4:
+ // discriminator value 0x4L=0x4L for class OFBsnGentableDescStatsRequestVer13
+ return OFBsnGentableDescStatsRequestVer13.READER.readFrom(bb);
+ case 0x2:
+ // discriminator value 0x2L=0x2L for class OFBsnGentableEntryDescStatsRequestVer13
+ return OFBsnGentableEntryDescStatsRequestVer13.READER.readFrom(bb);
+ case 0x3:
+ // discriminator value 0x3L=0x3L for class OFBsnGentableEntryStatsRequestVer13
+ return OFBsnGentableEntryStatsRequestVer13.READER.readFrom(bb);
+ case 0x7:
+ // discriminator value 0x7L=0x7L for class OFBsnGentableStatsRequestVer13
+ return OFBsnGentableStatsRequestVer13.READER.readFrom(bb);
+ case 0xe:
+ // discriminator value 0xeL=0xeL for class OFBsnImageDescStatsRequestVer13
+ return OFBsnImageDescStatsRequestVer13.READER.readFrom(bb);
+ case 0x1:
+ // discriminator value 0x1L=0x1L for class OFBsnLacpStatsRequestVer13
+ return OFBsnLacpStatsRequestVer13.READER.readFrom(bb);
+ case 0x8:
+ // discriminator value 0x8L=0x8L for class OFBsnPortCounterStatsRequestVer13
+ return OFBsnPortCounterStatsRequestVer13.READER.readFrom(bb);
+ case 0x6:
+ // discriminator value 0x6L=0x6L for class OFBsnSwitchPipelineStatsRequestVer13
+ return OFBsnSwitchPipelineStatsRequestVer13.READER.readFrom(bb);
+ case 0xb:
+ // discriminator value 0xbL=0xbL for class OFBsnTableChecksumStatsRequestVer13
+ return OFBsnTableChecksumStatsRequestVer13.READER.readFrom(bb);
+ case 0x9:
+ // discriminator value 0x9L=0x9L for class OFBsnVlanCounterStatsRequestVer13
+ return OFBsnVlanCounterStatsRequestVer13.READER.readFrom(bb);
+ case 0xf:
+ // discriminator value 0xfL=0xfL for class OFBsnVrfCounterStatsRequestVer13
+ return OFBsnVrfCounterStatsRequestVer13.READER.readFrom(bb);
+ default:
+ throw new OFParseError("Unknown value for discriminator subtype of class OFBsnStatsRequestVer13: " + subtype);
+ }
+ }
+ }
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnSwitchPipelineStatsEntryVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnSwitchPipelineStatsEntryVer13.java
new file mode 100644
index 0000000..753708b
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnSwitchPipelineStatsEntryVer13.java
@@ -0,0 +1,229 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnSwitchPipelineStatsEntryVer13 implements OFBsnSwitchPipelineStatsEntry {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnSwitchPipelineStatsEntryVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 256;
+
+ private final static String DEFAULT_PIPELINE = "";
+
+ // OF message fields
+ private final String pipeline;
+//
+ // Immutable default instance
+ final static OFBsnSwitchPipelineStatsEntryVer13 DEFAULT = new OFBsnSwitchPipelineStatsEntryVer13(
+ DEFAULT_PIPELINE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnSwitchPipelineStatsEntryVer13(String pipeline) {
+ this.pipeline = pipeline;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public String getPipeline() {
+ return pipeline;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFBsnSwitchPipelineStatsEntry.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnSwitchPipelineStatsEntry.Builder {
+ final OFBsnSwitchPipelineStatsEntryVer13 parentMessage;
+
+ // OF message fields
+ private boolean pipelineSet;
+ private String pipeline;
+
+ BuilderWithParent(OFBsnSwitchPipelineStatsEntryVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public String getPipeline() {
+ return pipeline;
+ }
+
+ @Override
+ public OFBsnSwitchPipelineStatsEntry.Builder setPipeline(String pipeline) {
+ this.pipeline = pipeline;
+ this.pipelineSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFBsnSwitchPipelineStatsEntry build() {
+ String pipeline = this.pipelineSet ? this.pipeline : parentMessage.pipeline;
+ if(pipeline == null)
+ throw new NullPointerException("Property pipeline must not be null");
+
+ //
+ return new OFBsnSwitchPipelineStatsEntryVer13(
+ pipeline
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnSwitchPipelineStatsEntry.Builder {
+ // OF message fields
+ private boolean pipelineSet;
+ private String pipeline;
+
+ @Override
+ public String getPipeline() {
+ return pipeline;
+ }
+
+ @Override
+ public OFBsnSwitchPipelineStatsEntry.Builder setPipeline(String pipeline) {
+ this.pipeline = pipeline;
+ this.pipelineSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFBsnSwitchPipelineStatsEntry build() {
+ String pipeline = this.pipelineSet ? this.pipeline : DEFAULT_PIPELINE;
+ if(pipeline == null)
+ throw new NullPointerException("Property pipeline must not be null");
+
+
+ return new OFBsnSwitchPipelineStatsEntryVer13(
+ pipeline
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnSwitchPipelineStatsEntry> {
+ @Override
+ public OFBsnSwitchPipelineStatsEntry readFrom(ChannelBuffer bb) throws OFParseError {
+ String pipeline = ChannelUtils.readFixedLengthString(bb, 256);
+
+ OFBsnSwitchPipelineStatsEntryVer13 bsnSwitchPipelineStatsEntryVer13 = new OFBsnSwitchPipelineStatsEntryVer13(
+ pipeline
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnSwitchPipelineStatsEntryVer13);
+ return bsnSwitchPipelineStatsEntryVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnSwitchPipelineStatsEntryVer13Funnel FUNNEL = new OFBsnSwitchPipelineStatsEntryVer13Funnel();
+ static class OFBsnSwitchPipelineStatsEntryVer13Funnel implements Funnel<OFBsnSwitchPipelineStatsEntryVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnSwitchPipelineStatsEntryVer13 message, PrimitiveSink sink) {
+ sink.putUnencodedChars(message.pipeline);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnSwitchPipelineStatsEntryVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnSwitchPipelineStatsEntryVer13 message) {
+ ChannelUtils.writeFixedLengthString(bb, message.pipeline, 256);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnSwitchPipelineStatsEntryVer13(");
+ b.append("pipeline=").append(pipeline);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnSwitchPipelineStatsEntryVer13 other = (OFBsnSwitchPipelineStatsEntryVer13) obj;
+
+ if (pipeline == null) {
+ if (other.pipeline != null)
+ return false;
+ } else if (!pipeline.equals(other.pipeline))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((pipeline == null) ? 0 : pipeline.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnSwitchPipelineStatsReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnSwitchPipelineStatsReplyVer13.java
new file mode 100644
index 0000000..1d852d5
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnSwitchPipelineStatsReplyVer13.java
@@ -0,0 +1,458 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnSwitchPipelineStatsReplyVer13 implements OFBsnSwitchPipelineStatsReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnSwitchPipelineStatsReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 24;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsReplyFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsReplyFlags>of();
+ private final static List<OFBsnSwitchPipelineStatsEntry> DEFAULT_ENTRIES = ImmutableList.<OFBsnSwitchPipelineStatsEntry>of();
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsReplyFlags> flags;
+ private final List<OFBsnSwitchPipelineStatsEntry> entries;
+//
+ // Immutable default instance
+ final static OFBsnSwitchPipelineStatsReplyVer13 DEFAULT = new OFBsnSwitchPipelineStatsReplyVer13(
+ DEFAULT_XID, DEFAULT_FLAGS, DEFAULT_ENTRIES
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnSwitchPipelineStatsReplyVer13(long xid, Set<OFStatsReplyFlags> flags, List<OFBsnSwitchPipelineStatsEntry> entries) {
+ this.xid = xid;
+ this.flags = flags;
+ this.entries = entries;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x6L;
+ }
+
+ @Override
+ public List<OFBsnSwitchPipelineStatsEntry> getEntries() {
+ return entries;
+ }
+
+
+
+ public OFBsnSwitchPipelineStatsReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnSwitchPipelineStatsReply.Builder {
+ final OFBsnSwitchPipelineStatsReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean entriesSet;
+ private List<OFBsnSwitchPipelineStatsEntry> entries;
+
+ BuilderWithParent(OFBsnSwitchPipelineStatsReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnSwitchPipelineStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnSwitchPipelineStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x6L;
+ }
+
+ @Override
+ public List<OFBsnSwitchPipelineStatsEntry> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFBsnSwitchPipelineStatsReply.Builder setEntries(List<OFBsnSwitchPipelineStatsEntry> entries) {
+ this.entries = entries;
+ this.entriesSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnSwitchPipelineStatsReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ List<OFBsnSwitchPipelineStatsEntry> entries = this.entriesSet ? this.entries : parentMessage.entries;
+ if(entries == null)
+ throw new NullPointerException("Property entries must not be null");
+
+ //
+ return new OFBsnSwitchPipelineStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnSwitchPipelineStatsReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean entriesSet;
+ private List<OFBsnSwitchPipelineStatsEntry> entries;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnSwitchPipelineStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnSwitchPipelineStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x6L;
+ }
+
+ @Override
+ public List<OFBsnSwitchPipelineStatsEntry> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFBsnSwitchPipelineStatsReply.Builder setEntries(List<OFBsnSwitchPipelineStatsEntry> entries) {
+ this.entries = entries;
+ this.entriesSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnSwitchPipelineStatsReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ List<OFBsnSwitchPipelineStatsEntry> entries = this.entriesSet ? this.entries : DEFAULT_ENTRIES;
+ if(entries == null)
+ throw new NullPointerException("Property entries must not be null");
+
+
+ return new OFBsnSwitchPipelineStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnSwitchPipelineStatsReply> {
+ @Override
+ public OFBsnSwitchPipelineStatsReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 19
+ byte type = bb.readByte();
+ if(type != (byte) 0x13)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REPLY(19), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 65535
+ short statsType = bb.readShort();
+ if(statsType != (short) 0xffff)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.EXPERIMENTER(65535), got="+statsType);
+ Set<OFStatsReplyFlags> flags = OFStatsReplyFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x6L
+ int subtype = bb.readInt();
+ if(subtype != 0x6)
+ throw new OFParseError("Wrong subtype: Expected=0x6L(0x6L), got="+subtype);
+ List<OFBsnSwitchPipelineStatsEntry> entries = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFBsnSwitchPipelineStatsEntryVer13.READER);
+
+ OFBsnSwitchPipelineStatsReplyVer13 bsnSwitchPipelineStatsReplyVer13 = new OFBsnSwitchPipelineStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnSwitchPipelineStatsReplyVer13);
+ return bsnSwitchPipelineStatsReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnSwitchPipelineStatsReplyVer13Funnel FUNNEL = new OFBsnSwitchPipelineStatsReplyVer13Funnel();
+ static class OFBsnSwitchPipelineStatsReplyVer13Funnel implements Funnel<OFBsnSwitchPipelineStatsReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnSwitchPipelineStatsReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 19
+ sink.putByte((byte) 0x13);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property statsType = 65535
+ sink.putShort((short) 0xffff);
+ OFStatsReplyFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x6L
+ sink.putInt(0x6);
+ FunnelUtils.putList(message.entries, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnSwitchPipelineStatsReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnSwitchPipelineStatsReplyVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 19
+ bb.writeByte((byte) 0x13);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 65535
+ bb.writeShort((short) 0xffff);
+ OFStatsReplyFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x6L
+ bb.writeInt(0x6);
+ ChannelUtils.writeList(bb, message.entries);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnSwitchPipelineStatsReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("entries=").append(entries);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnSwitchPipelineStatsReplyVer13 other = (OFBsnSwitchPipelineStatsReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if (entries == null) {
+ if (other.entries != null)
+ return false;
+ } else if (!entries.equals(other.entries))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * result + ((entries == null) ? 0 : entries.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnSwitchPipelineStatsRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnSwitchPipelineStatsRequestVer13.java
new file mode 100644
index 0000000..f84e7c0
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnSwitchPipelineStatsRequestVer13.java
@@ -0,0 +1,397 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnSwitchPipelineStatsRequestVer13 implements OFBsnSwitchPipelineStatsRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnSwitchPipelineStatsRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 24;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsRequestFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsRequestFlags>of();
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsRequestFlags> flags;
+//
+ // Immutable default instance
+ final static OFBsnSwitchPipelineStatsRequestVer13 DEFAULT = new OFBsnSwitchPipelineStatsRequestVer13(
+ DEFAULT_XID, DEFAULT_FLAGS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnSwitchPipelineStatsRequestVer13(long xid, Set<OFStatsRequestFlags> flags) {
+ this.xid = xid;
+ this.flags = flags;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x6L;
+ }
+
+
+
+ public OFBsnSwitchPipelineStatsRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnSwitchPipelineStatsRequest.Builder {
+ final OFBsnSwitchPipelineStatsRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+
+ BuilderWithParent(OFBsnSwitchPipelineStatsRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnSwitchPipelineStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnSwitchPipelineStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x6L;
+ }
+
+
+
+ @Override
+ public OFBsnSwitchPipelineStatsRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+
+ //
+ return new OFBsnSwitchPipelineStatsRequestVer13(
+ xid,
+ flags
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnSwitchPipelineStatsRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnSwitchPipelineStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnSwitchPipelineStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x6L;
+ }
+
+//
+ @Override
+ public OFBsnSwitchPipelineStatsRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+
+
+ return new OFBsnSwitchPipelineStatsRequestVer13(
+ xid,
+ flags
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnSwitchPipelineStatsRequest> {
+ @Override
+ public OFBsnSwitchPipelineStatsRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 18
+ byte type = bb.readByte();
+ if(type != (byte) 0x12)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REQUEST(18), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 24)
+ throw new OFParseError("Wrong length: Expected=24(24), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 65535
+ short statsType = bb.readShort();
+ if(statsType != (short) 0xffff)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.EXPERIMENTER(65535), got="+statsType);
+ Set<OFStatsRequestFlags> flags = OFStatsRequestFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x6L
+ int subtype = bb.readInt();
+ if(subtype != 0x6)
+ throw new OFParseError("Wrong subtype: Expected=0x6L(0x6L), got="+subtype);
+
+ OFBsnSwitchPipelineStatsRequestVer13 bsnSwitchPipelineStatsRequestVer13 = new OFBsnSwitchPipelineStatsRequestVer13(
+ xid,
+ flags
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnSwitchPipelineStatsRequestVer13);
+ return bsnSwitchPipelineStatsRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnSwitchPipelineStatsRequestVer13Funnel FUNNEL = new OFBsnSwitchPipelineStatsRequestVer13Funnel();
+ static class OFBsnSwitchPipelineStatsRequestVer13Funnel implements Funnel<OFBsnSwitchPipelineStatsRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnSwitchPipelineStatsRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 18
+ sink.putByte((byte) 0x12);
+ // fixed value property length = 24
+ sink.putShort((short) 0x18);
+ sink.putLong(message.xid);
+ // fixed value property statsType = 65535
+ sink.putShort((short) 0xffff);
+ OFStatsRequestFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x6L
+ sink.putInt(0x6);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnSwitchPipelineStatsRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnSwitchPipelineStatsRequestVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 18
+ bb.writeByte((byte) 0x12);
+ // fixed value property length = 24
+ bb.writeShort((short) 0x18);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 65535
+ bb.writeShort((short) 0xffff);
+ OFStatsRequestFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x6L
+ bb.writeInt(0x6);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnSwitchPipelineStatsRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnSwitchPipelineStatsRequestVer13 other = (OFBsnSwitchPipelineStatsRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTableChecksumStatsEntryVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTableChecksumStatsEntryVer13.java
new file mode 100644
index 0000000..275cf10
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTableChecksumStatsEntryVer13.java
@@ -0,0 +1,283 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnTableChecksumStatsEntryVer13 implements OFBsnTableChecksumStatsEntry {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnTableChecksumStatsEntryVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 9;
+
+ private final static TableId DEFAULT_TABLE_ID = TableId.ALL;
+ private final static U64 DEFAULT_CHECKSUM = U64.ZERO;
+
+ // OF message fields
+ private final TableId tableId;
+ private final U64 checksum;
+//
+ // Immutable default instance
+ final static OFBsnTableChecksumStatsEntryVer13 DEFAULT = new OFBsnTableChecksumStatsEntryVer13(
+ DEFAULT_TABLE_ID, DEFAULT_CHECKSUM
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnTableChecksumStatsEntryVer13(TableId tableId, U64 checksum) {
+ this.tableId = tableId;
+ this.checksum = checksum;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public U64 getChecksum() {
+ return checksum;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFBsnTableChecksumStatsEntry.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnTableChecksumStatsEntry.Builder {
+ final OFBsnTableChecksumStatsEntryVer13 parentMessage;
+
+ // OF message fields
+ private boolean tableIdSet;
+ private TableId tableId;
+ private boolean checksumSet;
+ private U64 checksum;
+
+ BuilderWithParent(OFBsnTableChecksumStatsEntryVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFBsnTableChecksumStatsEntry.Builder setTableId(TableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+ @Override
+ public U64 getChecksum() {
+ return checksum;
+ }
+
+ @Override
+ public OFBsnTableChecksumStatsEntry.Builder setChecksum(U64 checksum) {
+ this.checksum = checksum;
+ this.checksumSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFBsnTableChecksumStatsEntry build() {
+ TableId tableId = this.tableIdSet ? this.tableId : parentMessage.tableId;
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+ U64 checksum = this.checksumSet ? this.checksum : parentMessage.checksum;
+ if(checksum == null)
+ throw new NullPointerException("Property checksum must not be null");
+
+ //
+ return new OFBsnTableChecksumStatsEntryVer13(
+ tableId,
+ checksum
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnTableChecksumStatsEntry.Builder {
+ // OF message fields
+ private boolean tableIdSet;
+ private TableId tableId;
+ private boolean checksumSet;
+ private U64 checksum;
+
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFBsnTableChecksumStatsEntry.Builder setTableId(TableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+ @Override
+ public U64 getChecksum() {
+ return checksum;
+ }
+
+ @Override
+ public OFBsnTableChecksumStatsEntry.Builder setChecksum(U64 checksum) {
+ this.checksum = checksum;
+ this.checksumSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFBsnTableChecksumStatsEntry build() {
+ TableId tableId = this.tableIdSet ? this.tableId : DEFAULT_TABLE_ID;
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+ U64 checksum = this.checksumSet ? this.checksum : DEFAULT_CHECKSUM;
+ if(checksum == null)
+ throw new NullPointerException("Property checksum must not be null");
+
+
+ return new OFBsnTableChecksumStatsEntryVer13(
+ tableId,
+ checksum
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnTableChecksumStatsEntry> {
+ @Override
+ public OFBsnTableChecksumStatsEntry readFrom(ChannelBuffer bb) throws OFParseError {
+ TableId tableId = TableId.readByte(bb);
+ U64 checksum = U64.ofRaw(bb.readLong());
+
+ OFBsnTableChecksumStatsEntryVer13 bsnTableChecksumStatsEntryVer13 = new OFBsnTableChecksumStatsEntryVer13(
+ tableId,
+ checksum
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnTableChecksumStatsEntryVer13);
+ return bsnTableChecksumStatsEntryVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnTableChecksumStatsEntryVer13Funnel FUNNEL = new OFBsnTableChecksumStatsEntryVer13Funnel();
+ static class OFBsnTableChecksumStatsEntryVer13Funnel implements Funnel<OFBsnTableChecksumStatsEntryVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnTableChecksumStatsEntryVer13 message, PrimitiveSink sink) {
+ message.tableId.putTo(sink);
+ message.checksum.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnTableChecksumStatsEntryVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnTableChecksumStatsEntryVer13 message) {
+ message.tableId.writeByte(bb);
+ bb.writeLong(message.checksum.getValue());
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnTableChecksumStatsEntryVer13(");
+ b.append("tableId=").append(tableId);
+ b.append(", ");
+ b.append("checksum=").append(checksum);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnTableChecksumStatsEntryVer13 other = (OFBsnTableChecksumStatsEntryVer13) obj;
+
+ if (tableId == null) {
+ if (other.tableId != null)
+ return false;
+ } else if (!tableId.equals(other.tableId))
+ return false;
+ if (checksum == null) {
+ if (other.checksum != null)
+ return false;
+ } else if (!checksum.equals(other.checksum))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((tableId == null) ? 0 : tableId.hashCode());
+ result = prime * result + ((checksum == null) ? 0 : checksum.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTableChecksumStatsReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTableChecksumStatsReplyVer13.java
new file mode 100644
index 0000000..4fd5c00
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTableChecksumStatsReplyVer13.java
@@ -0,0 +1,458 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnTableChecksumStatsReplyVer13 implements OFBsnTableChecksumStatsReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnTableChecksumStatsReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 24;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsReplyFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsReplyFlags>of();
+ private final static List<OFBsnTableChecksumStatsEntry> DEFAULT_ENTRIES = ImmutableList.<OFBsnTableChecksumStatsEntry>of();
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsReplyFlags> flags;
+ private final List<OFBsnTableChecksumStatsEntry> entries;
+//
+ // Immutable default instance
+ final static OFBsnTableChecksumStatsReplyVer13 DEFAULT = new OFBsnTableChecksumStatsReplyVer13(
+ DEFAULT_XID, DEFAULT_FLAGS, DEFAULT_ENTRIES
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnTableChecksumStatsReplyVer13(long xid, Set<OFStatsReplyFlags> flags, List<OFBsnTableChecksumStatsEntry> entries) {
+ this.xid = xid;
+ this.flags = flags;
+ this.entries = entries;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0xbL;
+ }
+
+ @Override
+ public List<OFBsnTableChecksumStatsEntry> getEntries() {
+ return entries;
+ }
+
+
+
+ public OFBsnTableChecksumStatsReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnTableChecksumStatsReply.Builder {
+ final OFBsnTableChecksumStatsReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean entriesSet;
+ private List<OFBsnTableChecksumStatsEntry> entries;
+
+ BuilderWithParent(OFBsnTableChecksumStatsReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnTableChecksumStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnTableChecksumStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0xbL;
+ }
+
+ @Override
+ public List<OFBsnTableChecksumStatsEntry> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFBsnTableChecksumStatsReply.Builder setEntries(List<OFBsnTableChecksumStatsEntry> entries) {
+ this.entries = entries;
+ this.entriesSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnTableChecksumStatsReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ List<OFBsnTableChecksumStatsEntry> entries = this.entriesSet ? this.entries : parentMessage.entries;
+ if(entries == null)
+ throw new NullPointerException("Property entries must not be null");
+
+ //
+ return new OFBsnTableChecksumStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnTableChecksumStatsReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean entriesSet;
+ private List<OFBsnTableChecksumStatsEntry> entries;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnTableChecksumStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnTableChecksumStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0xbL;
+ }
+
+ @Override
+ public List<OFBsnTableChecksumStatsEntry> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFBsnTableChecksumStatsReply.Builder setEntries(List<OFBsnTableChecksumStatsEntry> entries) {
+ this.entries = entries;
+ this.entriesSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnTableChecksumStatsReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ List<OFBsnTableChecksumStatsEntry> entries = this.entriesSet ? this.entries : DEFAULT_ENTRIES;
+ if(entries == null)
+ throw new NullPointerException("Property entries must not be null");
+
+
+ return new OFBsnTableChecksumStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnTableChecksumStatsReply> {
+ @Override
+ public OFBsnTableChecksumStatsReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 19
+ byte type = bb.readByte();
+ if(type != (byte) 0x13)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REPLY(19), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 65535
+ short statsType = bb.readShort();
+ if(statsType != (short) 0xffff)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.EXPERIMENTER(65535), got="+statsType);
+ Set<OFStatsReplyFlags> flags = OFStatsReplyFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0xbL
+ int subtype = bb.readInt();
+ if(subtype != 0xb)
+ throw new OFParseError("Wrong subtype: Expected=0xbL(0xbL), got="+subtype);
+ List<OFBsnTableChecksumStatsEntry> entries = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFBsnTableChecksumStatsEntryVer13.READER);
+
+ OFBsnTableChecksumStatsReplyVer13 bsnTableChecksumStatsReplyVer13 = new OFBsnTableChecksumStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnTableChecksumStatsReplyVer13);
+ return bsnTableChecksumStatsReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnTableChecksumStatsReplyVer13Funnel FUNNEL = new OFBsnTableChecksumStatsReplyVer13Funnel();
+ static class OFBsnTableChecksumStatsReplyVer13Funnel implements Funnel<OFBsnTableChecksumStatsReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnTableChecksumStatsReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 19
+ sink.putByte((byte) 0x13);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property statsType = 65535
+ sink.putShort((short) 0xffff);
+ OFStatsReplyFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0xbL
+ sink.putInt(0xb);
+ FunnelUtils.putList(message.entries, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnTableChecksumStatsReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnTableChecksumStatsReplyVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 19
+ bb.writeByte((byte) 0x13);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 65535
+ bb.writeShort((short) 0xffff);
+ OFStatsReplyFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0xbL
+ bb.writeInt(0xb);
+ ChannelUtils.writeList(bb, message.entries);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnTableChecksumStatsReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("entries=").append(entries);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnTableChecksumStatsReplyVer13 other = (OFBsnTableChecksumStatsReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if (entries == null) {
+ if (other.entries != null)
+ return false;
+ } else if (!entries.equals(other.entries))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * result + ((entries == null) ? 0 : entries.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTableChecksumStatsRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTableChecksumStatsRequestVer13.java
new file mode 100644
index 0000000..57c88c8
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTableChecksumStatsRequestVer13.java
@@ -0,0 +1,397 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnTableChecksumStatsRequestVer13 implements OFBsnTableChecksumStatsRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnTableChecksumStatsRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 24;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsRequestFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsRequestFlags>of();
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsRequestFlags> flags;
+//
+ // Immutable default instance
+ final static OFBsnTableChecksumStatsRequestVer13 DEFAULT = new OFBsnTableChecksumStatsRequestVer13(
+ DEFAULT_XID, DEFAULT_FLAGS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnTableChecksumStatsRequestVer13(long xid, Set<OFStatsRequestFlags> flags) {
+ this.xid = xid;
+ this.flags = flags;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0xbL;
+ }
+
+
+
+ public OFBsnTableChecksumStatsRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnTableChecksumStatsRequest.Builder {
+ final OFBsnTableChecksumStatsRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+
+ BuilderWithParent(OFBsnTableChecksumStatsRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnTableChecksumStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnTableChecksumStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0xbL;
+ }
+
+
+
+ @Override
+ public OFBsnTableChecksumStatsRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+
+ //
+ return new OFBsnTableChecksumStatsRequestVer13(
+ xid,
+ flags
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnTableChecksumStatsRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnTableChecksumStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnTableChecksumStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0xbL;
+ }
+
+//
+ @Override
+ public OFBsnTableChecksumStatsRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+
+
+ return new OFBsnTableChecksumStatsRequestVer13(
+ xid,
+ flags
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnTableChecksumStatsRequest> {
+ @Override
+ public OFBsnTableChecksumStatsRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 18
+ byte type = bb.readByte();
+ if(type != (byte) 0x12)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REQUEST(18), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 24)
+ throw new OFParseError("Wrong length: Expected=24(24), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 65535
+ short statsType = bb.readShort();
+ if(statsType != (short) 0xffff)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.EXPERIMENTER(65535), got="+statsType);
+ Set<OFStatsRequestFlags> flags = OFStatsRequestFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0xbL
+ int subtype = bb.readInt();
+ if(subtype != 0xb)
+ throw new OFParseError("Wrong subtype: Expected=0xbL(0xbL), got="+subtype);
+
+ OFBsnTableChecksumStatsRequestVer13 bsnTableChecksumStatsRequestVer13 = new OFBsnTableChecksumStatsRequestVer13(
+ xid,
+ flags
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnTableChecksumStatsRequestVer13);
+ return bsnTableChecksumStatsRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnTableChecksumStatsRequestVer13Funnel FUNNEL = new OFBsnTableChecksumStatsRequestVer13Funnel();
+ static class OFBsnTableChecksumStatsRequestVer13Funnel implements Funnel<OFBsnTableChecksumStatsRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnTableChecksumStatsRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 18
+ sink.putByte((byte) 0x12);
+ // fixed value property length = 24
+ sink.putShort((short) 0x18);
+ sink.putLong(message.xid);
+ // fixed value property statsType = 65535
+ sink.putShort((short) 0xffff);
+ OFStatsRequestFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0xbL
+ sink.putInt(0xb);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnTableChecksumStatsRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnTableChecksumStatsRequestVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 18
+ bb.writeByte((byte) 0x12);
+ // fixed value property length = 24
+ bb.writeShort((short) 0x18);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 65535
+ bb.writeShort((short) 0xffff);
+ OFStatsRequestFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0xbL
+ bb.writeInt(0xb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnTableChecksumStatsRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnTableChecksumStatsRequestVer13 other = (OFBsnTableChecksumStatsRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTableSetBucketsSizeVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTableSetBucketsSizeVer13.java
new file mode 100644
index 0000000..b14a473
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTableSetBucketsSizeVer13.java
@@ -0,0 +1,425 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import java.util.Set;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnTableSetBucketsSizeVer13 implements OFBsnTableSetBucketsSize {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnTableSetBucketsSizeVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 24;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static TableId DEFAULT_TABLE_ID = TableId.ALL;
+ private final static long DEFAULT_BUCKETS_SIZE = 0x0L;
+
+ // OF message fields
+ private final long xid;
+ private final TableId tableId;
+ private final long bucketsSize;
+//
+ // Immutable default instance
+ final static OFBsnTableSetBucketsSizeVer13 DEFAULT = new OFBsnTableSetBucketsSizeVer13(
+ DEFAULT_XID, DEFAULT_TABLE_ID, DEFAULT_BUCKETS_SIZE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnTableSetBucketsSizeVer13(long xid, TableId tableId, long bucketsSize) {
+ this.xid = xid;
+ this.tableId = tableId;
+ this.bucketsSize = bucketsSize;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x3dL;
+ }
+
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public long getBucketsSize() {
+ return bucketsSize;
+ }
+
+
+
+ public OFBsnTableSetBucketsSize.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnTableSetBucketsSize.Builder {
+ final OFBsnTableSetBucketsSizeVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean tableIdSet;
+ private TableId tableId;
+ private boolean bucketsSizeSet;
+ private long bucketsSize;
+
+ BuilderWithParent(OFBsnTableSetBucketsSizeVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnTableSetBucketsSize.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x3dL;
+ }
+
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFBsnTableSetBucketsSize.Builder setTableId(TableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+ @Override
+ public long getBucketsSize() {
+ return bucketsSize;
+ }
+
+ @Override
+ public OFBsnTableSetBucketsSize.Builder setBucketsSize(long bucketsSize) {
+ this.bucketsSize = bucketsSize;
+ this.bucketsSizeSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnTableSetBucketsSize build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ TableId tableId = this.tableIdSet ? this.tableId : parentMessage.tableId;
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+ long bucketsSize = this.bucketsSizeSet ? this.bucketsSize : parentMessage.bucketsSize;
+
+ //
+ return new OFBsnTableSetBucketsSizeVer13(
+ xid,
+ tableId,
+ bucketsSize
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnTableSetBucketsSize.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean tableIdSet;
+ private TableId tableId;
+ private boolean bucketsSizeSet;
+ private long bucketsSize;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnTableSetBucketsSize.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x3dL;
+ }
+
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFBsnTableSetBucketsSize.Builder setTableId(TableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+ @Override
+ public long getBucketsSize() {
+ return bucketsSize;
+ }
+
+ @Override
+ public OFBsnTableSetBucketsSize.Builder setBucketsSize(long bucketsSize) {
+ this.bucketsSize = bucketsSize;
+ this.bucketsSizeSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnTableSetBucketsSize build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ TableId tableId = this.tableIdSet ? this.tableId : DEFAULT_TABLE_ID;
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+ long bucketsSize = this.bucketsSizeSet ? this.bucketsSize : DEFAULT_BUCKETS_SIZE;
+
+
+ return new OFBsnTableSetBucketsSizeVer13(
+ xid,
+ tableId,
+ bucketsSize
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnTableSetBucketsSize> {
+ @Override
+ public OFBsnTableSetBucketsSize readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 4
+ byte type = bb.readByte();
+ if(type != (byte) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 24)
+ throw new OFParseError("Wrong length: Expected=24(24), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x3dL
+ int subtype = bb.readInt();
+ if(subtype != 0x3d)
+ throw new OFParseError("Wrong subtype: Expected=0x3dL(0x3dL), got="+subtype);
+ // pad: 1 bytes
+ bb.skipBytes(1);
+ TableId tableId = TableId.readByte(bb);
+ // pad: 2 bytes
+ bb.skipBytes(2);
+ long bucketsSize = U32.f(bb.readInt());
+
+ OFBsnTableSetBucketsSizeVer13 bsnTableSetBucketsSizeVer13 = new OFBsnTableSetBucketsSizeVer13(
+ xid,
+ tableId,
+ bucketsSize
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnTableSetBucketsSizeVer13);
+ return bsnTableSetBucketsSizeVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnTableSetBucketsSizeVer13Funnel FUNNEL = new OFBsnTableSetBucketsSizeVer13Funnel();
+ static class OFBsnTableSetBucketsSizeVer13Funnel implements Funnel<OFBsnTableSetBucketsSizeVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnTableSetBucketsSizeVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property length = 24
+ sink.putShort((short) 0x18);
+ sink.putLong(message.xid);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x3dL
+ sink.putInt(0x3d);
+ // skip pad (1 bytes)
+ message.tableId.putTo(sink);
+ // skip pad (2 bytes)
+ sink.putLong(message.bucketsSize);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnTableSetBucketsSizeVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnTableSetBucketsSizeVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property length = 24
+ bb.writeShort((short) 0x18);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x3dL
+ bb.writeInt(0x3d);
+ // pad: 1 bytes
+ bb.writeZero(1);
+ message.tableId.writeByte(bb);
+ // pad: 2 bytes
+ bb.writeZero(2);
+ bb.writeInt(U32.t(message.bucketsSize));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnTableSetBucketsSizeVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("tableId=").append(tableId);
+ b.append(", ");
+ b.append("bucketsSize=").append(bucketsSize);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnTableSetBucketsSizeVer13 other = (OFBsnTableSetBucketsSizeVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (tableId == null) {
+ if (other.tableId != null)
+ return false;
+ } else if (!tableId.equals(other.tableId))
+ return false;
+ if( bucketsSize != other.bucketsSize)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((tableId == null) ? 0 : tableId.hashCode());
+ result = prime * (int) (bucketsSize ^ (bucketsSize >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTcpFlagSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTcpFlagSerializerVer13.java
new file mode 100644
index 0000000..2b222b1
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTcpFlagSerializerVer13.java
@@ -0,0 +1,126 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_set_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFBsnTcpFlag;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import java.util.EnumSet;
+import java.util.Collections;
+
+
+public class OFBsnTcpFlagSerializerVer13 {
+
+ public final static short BSN_TCP_FLAG_FIN_VAL = (short) 0x1;
+ public final static short BSN_TCP_FLAG_SYN_VAL = (short) 0x2;
+ public final static short BSN_TCP_FLAG_RST_VAL = (short) 0x4;
+ public final static short BSN_TCP_FLAG_PSH_VAL = (short) 0x8;
+ public final static short BSN_TCP_FLAG_ACK_VAL = (short) 0x10;
+ public final static short BSN_TCP_FLAG_URG_VAL = (short) 0x20;
+ public final static short BSN_TCP_FLAG_ECE_VAL = (short) 0x40;
+ public final static short BSN_TCP_FLAG_CWR_VAL = (short) 0x80;
+ public final static short BSN_TCP_FLAG_NS_VAL = (short) 0x100;
+
+ public static Set<OFBsnTcpFlag> readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readShort());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, Set<OFBsnTcpFlag> set) {
+ bb.writeShort(toWireValue(set));
+ }
+
+ public static void putTo(Set<OFBsnTcpFlag> set, PrimitiveSink sink) {
+ sink.putShort(toWireValue(set));
+ }
+
+
+ public static Set<OFBsnTcpFlag> ofWireValue(short val) {
+ EnumSet<OFBsnTcpFlag> set = EnumSet.noneOf(OFBsnTcpFlag.class);
+
+ if((val & BSN_TCP_FLAG_FIN_VAL) != 0)
+ set.add(OFBsnTcpFlag.BSN_TCP_FLAG_FIN);
+ if((val & BSN_TCP_FLAG_SYN_VAL) != 0)
+ set.add(OFBsnTcpFlag.BSN_TCP_FLAG_SYN);
+ if((val & BSN_TCP_FLAG_RST_VAL) != 0)
+ set.add(OFBsnTcpFlag.BSN_TCP_FLAG_RST);
+ if((val & BSN_TCP_FLAG_PSH_VAL) != 0)
+ set.add(OFBsnTcpFlag.BSN_TCP_FLAG_PSH);
+ if((val & BSN_TCP_FLAG_ACK_VAL) != 0)
+ set.add(OFBsnTcpFlag.BSN_TCP_FLAG_ACK);
+ if((val & BSN_TCP_FLAG_URG_VAL) != 0)
+ set.add(OFBsnTcpFlag.BSN_TCP_FLAG_URG);
+ if((val & BSN_TCP_FLAG_ECE_VAL) != 0)
+ set.add(OFBsnTcpFlag.BSN_TCP_FLAG_ECE);
+ if((val & BSN_TCP_FLAG_CWR_VAL) != 0)
+ set.add(OFBsnTcpFlag.BSN_TCP_FLAG_CWR);
+ if((val & BSN_TCP_FLAG_NS_VAL) != 0)
+ set.add(OFBsnTcpFlag.BSN_TCP_FLAG_NS);
+ return Collections.unmodifiableSet(set);
+ }
+
+ public static short toWireValue(Set<OFBsnTcpFlag> set) {
+ short wireValue = 0;
+
+ for(OFBsnTcpFlag e: set) {
+ switch(e) {
+ case BSN_TCP_FLAG_FIN:
+ wireValue |= BSN_TCP_FLAG_FIN_VAL;
+ break;
+ case BSN_TCP_FLAG_SYN:
+ wireValue |= BSN_TCP_FLAG_SYN_VAL;
+ break;
+ case BSN_TCP_FLAG_RST:
+ wireValue |= BSN_TCP_FLAG_RST_VAL;
+ break;
+ case BSN_TCP_FLAG_PSH:
+ wireValue |= BSN_TCP_FLAG_PSH_VAL;
+ break;
+ case BSN_TCP_FLAG_ACK:
+ wireValue |= BSN_TCP_FLAG_ACK_VAL;
+ break;
+ case BSN_TCP_FLAG_URG:
+ wireValue |= BSN_TCP_FLAG_URG_VAL;
+ break;
+ case BSN_TCP_FLAG_ECE:
+ wireValue |= BSN_TCP_FLAG_ECE_VAL;
+ break;
+ case BSN_TCP_FLAG_CWR:
+ wireValue |= BSN_TCP_FLAG_CWR_VAL;
+ break;
+ case BSN_TCP_FLAG_NS:
+ wireValue |= BSN_TCP_FLAG_NS_VAL;
+ break;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFBsnTcpFlag in version 1.3: " + e);
+ }
+ }
+ return wireValue;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTimeReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTimeReplyVer13.java
new file mode 100644
index 0000000..4a7f57b
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTimeReplyVer13.java
@@ -0,0 +1,368 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnTimeReplyVer13 implements OFBsnTimeReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnTimeReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 24;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static U64 DEFAULT_TIME_MS = U64.ZERO;
+
+ // OF message fields
+ private final long xid;
+ private final U64 timeMs;
+//
+ // Immutable default instance
+ final static OFBsnTimeReplyVer13 DEFAULT = new OFBsnTimeReplyVer13(
+ DEFAULT_XID, DEFAULT_TIME_MS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnTimeReplyVer13(long xid, U64 timeMs) {
+ this.xid = xid;
+ this.timeMs = timeMs;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x2dL;
+ }
+
+ @Override
+ public U64 getTimeMs() {
+ return timeMs;
+ }
+
+
+
+ public OFBsnTimeReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnTimeReply.Builder {
+ final OFBsnTimeReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean timeMsSet;
+ private U64 timeMs;
+
+ BuilderWithParent(OFBsnTimeReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnTimeReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x2dL;
+ }
+
+ @Override
+ public U64 getTimeMs() {
+ return timeMs;
+ }
+
+ @Override
+ public OFBsnTimeReply.Builder setTimeMs(U64 timeMs) {
+ this.timeMs = timeMs;
+ this.timeMsSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnTimeReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ U64 timeMs = this.timeMsSet ? this.timeMs : parentMessage.timeMs;
+ if(timeMs == null)
+ throw new NullPointerException("Property timeMs must not be null");
+
+ //
+ return new OFBsnTimeReplyVer13(
+ xid,
+ timeMs
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnTimeReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean timeMsSet;
+ private U64 timeMs;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnTimeReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x2dL;
+ }
+
+ @Override
+ public U64 getTimeMs() {
+ return timeMs;
+ }
+
+ @Override
+ public OFBsnTimeReply.Builder setTimeMs(U64 timeMs) {
+ this.timeMs = timeMs;
+ this.timeMsSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnTimeReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ U64 timeMs = this.timeMsSet ? this.timeMs : DEFAULT_TIME_MS;
+ if(timeMs == null)
+ throw new NullPointerException("Property timeMs must not be null");
+
+
+ return new OFBsnTimeReplyVer13(
+ xid,
+ timeMs
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnTimeReply> {
+ @Override
+ public OFBsnTimeReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 4
+ byte type = bb.readByte();
+ if(type != (byte) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 24)
+ throw new OFParseError("Wrong length: Expected=24(24), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x2dL
+ int subtype = bb.readInt();
+ if(subtype != 0x2d)
+ throw new OFParseError("Wrong subtype: Expected=0x2dL(0x2dL), got="+subtype);
+ U64 timeMs = U64.ofRaw(bb.readLong());
+
+ OFBsnTimeReplyVer13 bsnTimeReplyVer13 = new OFBsnTimeReplyVer13(
+ xid,
+ timeMs
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnTimeReplyVer13);
+ return bsnTimeReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnTimeReplyVer13Funnel FUNNEL = new OFBsnTimeReplyVer13Funnel();
+ static class OFBsnTimeReplyVer13Funnel implements Funnel<OFBsnTimeReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnTimeReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property length = 24
+ sink.putShort((short) 0x18);
+ sink.putLong(message.xid);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x2dL
+ sink.putInt(0x2d);
+ message.timeMs.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnTimeReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnTimeReplyVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property length = 24
+ bb.writeShort((short) 0x18);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x2dL
+ bb.writeInt(0x2d);
+ bb.writeLong(message.timeMs.getValue());
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnTimeReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("timeMs=").append(timeMs);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnTimeReplyVer13 other = (OFBsnTimeReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (timeMs == null) {
+ if (other.timeMs != null)
+ return false;
+ } else if (!timeMs.equals(other.timeMs))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((timeMs == null) ? 0 : timeMs.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTimeRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTimeRequestVer13.java
new file mode 100644
index 0000000..eae56b7
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTimeRequestVer13.java
@@ -0,0 +1,314 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnTimeRequestVer13 implements OFBsnTimeRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnTimeRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 16;
+
+ private final static long DEFAULT_XID = 0x0L;
+
+ // OF message fields
+ private final long xid;
+//
+ // Immutable default instance
+ final static OFBsnTimeRequestVer13 DEFAULT = new OFBsnTimeRequestVer13(
+ DEFAULT_XID
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnTimeRequestVer13(long xid) {
+ this.xid = xid;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x2cL;
+ }
+
+
+
+ public OFBsnTimeRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnTimeRequest.Builder {
+ final OFBsnTimeRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+
+ BuilderWithParent(OFBsnTimeRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnTimeRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x2cL;
+ }
+
+
+
+ @Override
+ public OFBsnTimeRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+
+ //
+ return new OFBsnTimeRequestVer13(
+ xid
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnTimeRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnTimeRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x2cL;
+ }
+
+//
+ @Override
+ public OFBsnTimeRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+
+
+ return new OFBsnTimeRequestVer13(
+ xid
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnTimeRequest> {
+ @Override
+ public OFBsnTimeRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 4
+ byte type = bb.readByte();
+ if(type != (byte) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 16)
+ throw new OFParseError("Wrong length: Expected=16(16), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x2cL
+ int subtype = bb.readInt();
+ if(subtype != 0x2c)
+ throw new OFParseError("Wrong subtype: Expected=0x2cL(0x2cL), got="+subtype);
+
+ OFBsnTimeRequestVer13 bsnTimeRequestVer13 = new OFBsnTimeRequestVer13(
+ xid
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnTimeRequestVer13);
+ return bsnTimeRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnTimeRequestVer13Funnel FUNNEL = new OFBsnTimeRequestVer13Funnel();
+ static class OFBsnTimeRequestVer13Funnel implements Funnel<OFBsnTimeRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnTimeRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property length = 16
+ sink.putShort((short) 0x10);
+ sink.putLong(message.xid);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x2cL
+ sink.putInt(0x2c);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnTimeRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnTimeRequestVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property length = 16
+ bb.writeShort((short) 0x10);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x2cL
+ bb.writeInt(0x2c);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnTimeRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnTimeRequestVer13 other = (OFBsnTimeRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvBroadcastQueryTimeoutVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvBroadcastQueryTimeoutVer13.java
new file mode 100644
index 0000000..ba18e22
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvBroadcastQueryTimeoutVer13.java
@@ -0,0 +1,260 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnTlvBroadcastQueryTimeoutVer13 implements OFBsnTlvBroadcastQueryTimeout {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnTlvBroadcastQueryTimeoutVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static long DEFAULT_VALUE = 0x0L;
+
+ // OF message fields
+ private final long value;
+//
+ // Immutable default instance
+ final static OFBsnTlvBroadcastQueryTimeoutVer13 DEFAULT = new OFBsnTlvBroadcastQueryTimeoutVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnTlvBroadcastQueryTimeoutVer13(long value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public int getType() {
+ return 0xa;
+ }
+
+ @Override
+ public long getValue() {
+ return value;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFBsnTlvBroadcastQueryTimeout.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnTlvBroadcastQueryTimeout.Builder {
+ final OFBsnTlvBroadcastQueryTimeoutVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private long value;
+
+ BuilderWithParent(OFBsnTlvBroadcastQueryTimeoutVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public int getType() {
+ return 0xa;
+ }
+
+ @Override
+ public long getValue() {
+ return value;
+ }
+
+ @Override
+ public OFBsnTlvBroadcastQueryTimeout.Builder setValue(long value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFBsnTlvBroadcastQueryTimeout build() {
+ long value = this.valueSet ? this.value : parentMessage.value;
+
+ //
+ return new OFBsnTlvBroadcastQueryTimeoutVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnTlvBroadcastQueryTimeout.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private long value;
+
+ @Override
+ public int getType() {
+ return 0xa;
+ }
+
+ @Override
+ public long getValue() {
+ return value;
+ }
+
+ @Override
+ public OFBsnTlvBroadcastQueryTimeout.Builder setValue(long value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFBsnTlvBroadcastQueryTimeout build() {
+ long value = this.valueSet ? this.value : DEFAULT_VALUE;
+
+
+ return new OFBsnTlvBroadcastQueryTimeoutVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnTlvBroadcastQueryTimeout> {
+ @Override
+ public OFBsnTlvBroadcastQueryTimeout readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 0xa
+ short type = bb.readShort();
+ if(type != (short) 0xa)
+ throw new OFParseError("Wrong type: Expected=0xa(0xa), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 8)
+ throw new OFParseError("Wrong length: Expected=8(8), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long value = U32.f(bb.readInt());
+
+ OFBsnTlvBroadcastQueryTimeoutVer13 bsnTlvBroadcastQueryTimeoutVer13 = new OFBsnTlvBroadcastQueryTimeoutVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnTlvBroadcastQueryTimeoutVer13);
+ return bsnTlvBroadcastQueryTimeoutVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnTlvBroadcastQueryTimeoutVer13Funnel FUNNEL = new OFBsnTlvBroadcastQueryTimeoutVer13Funnel();
+ static class OFBsnTlvBroadcastQueryTimeoutVer13Funnel implements Funnel<OFBsnTlvBroadcastQueryTimeoutVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnTlvBroadcastQueryTimeoutVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 0xa
+ sink.putShort((short) 0xa);
+ // fixed value property length = 8
+ sink.putShort((short) 0x8);
+ sink.putLong(message.value);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnTlvBroadcastQueryTimeoutVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnTlvBroadcastQueryTimeoutVer13 message) {
+ // fixed value property type = 0xa
+ bb.writeShort((short) 0xa);
+ // fixed value property length = 8
+ bb.writeShort((short) 0x8);
+ bb.writeInt(U32.t(message.value));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnTlvBroadcastQueryTimeoutVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnTlvBroadcastQueryTimeoutVer13 other = (OFBsnTlvBroadcastQueryTimeoutVer13) obj;
+
+ if( value != other.value)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (value ^ (value >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvCircuitIdVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvCircuitIdVer13.java
new file mode 100644
index 0000000..73a3fb4
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvCircuitIdVer13.java
@@ -0,0 +1,270 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+import java.util.Arrays;
+
+class OFBsnTlvCircuitIdVer13 implements OFBsnTlvCircuitId {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnTlvCircuitIdVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 4;
+
+ private final static byte[] DEFAULT_VALUE = new byte[0];
+
+ // OF message fields
+ private final byte[] value;
+//
+ // Immutable default instance
+ final static OFBsnTlvCircuitIdVer13 DEFAULT = new OFBsnTlvCircuitIdVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnTlvCircuitIdVer13(byte[] value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public int getType() {
+ return 0xe;
+ }
+
+ @Override
+ public byte[] getValue() {
+ return value;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFBsnTlvCircuitId.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnTlvCircuitId.Builder {
+ final OFBsnTlvCircuitIdVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private byte[] value;
+
+ BuilderWithParent(OFBsnTlvCircuitIdVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public int getType() {
+ return 0xe;
+ }
+
+ @Override
+ public byte[] getValue() {
+ return value;
+ }
+
+ @Override
+ public OFBsnTlvCircuitId.Builder setValue(byte[] value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFBsnTlvCircuitId build() {
+ byte[] value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFBsnTlvCircuitIdVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnTlvCircuitId.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private byte[] value;
+
+ @Override
+ public int getType() {
+ return 0xe;
+ }
+
+ @Override
+ public byte[] getValue() {
+ return value;
+ }
+
+ @Override
+ public OFBsnTlvCircuitId.Builder setValue(byte[] value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFBsnTlvCircuitId build() {
+ byte[] value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFBsnTlvCircuitIdVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnTlvCircuitId> {
+ @Override
+ public OFBsnTlvCircuitId readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 0xe
+ short type = bb.readShort();
+ if(type != (short) 0xe)
+ throw new OFParseError("Wrong type: Expected=0xe(0xe), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ byte[] value = ChannelUtils.readBytes(bb, length - (bb.readerIndex() - start));
+
+ OFBsnTlvCircuitIdVer13 bsnTlvCircuitIdVer13 = new OFBsnTlvCircuitIdVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnTlvCircuitIdVer13);
+ return bsnTlvCircuitIdVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnTlvCircuitIdVer13Funnel FUNNEL = new OFBsnTlvCircuitIdVer13Funnel();
+ static class OFBsnTlvCircuitIdVer13Funnel implements Funnel<OFBsnTlvCircuitIdVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnTlvCircuitIdVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 0xe
+ sink.putShort((short) 0xe);
+ // FIXME: skip funnel of length
+ sink.putBytes(message.value);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnTlvCircuitIdVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnTlvCircuitIdVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property type = 0xe
+ bb.writeShort((short) 0xe);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeBytes(message.value);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnTlvCircuitIdVer13(");
+ b.append("value=").append(Arrays.toString(value));
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnTlvCircuitIdVer13 other = (OFBsnTlvCircuitIdVer13) obj;
+
+ if (!Arrays.equals(value, other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + Arrays.hashCode(value);
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvCrcEnabledVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvCrcEnabledVer13.java
new file mode 100644
index 0000000..357fd67
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvCrcEnabledVer13.java
@@ -0,0 +1,260 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnTlvCrcEnabledVer13 implements OFBsnTlvCrcEnabled {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnTlvCrcEnabledVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 5;
+
+ private final static short DEFAULT_VALUE = (short) 0x0;
+
+ // OF message fields
+ private final short value;
+//
+ // Immutable default instance
+ final static OFBsnTlvCrcEnabledVer13 DEFAULT = new OFBsnTlvCrcEnabledVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnTlvCrcEnabledVer13(short value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public int getType() {
+ return 0x16;
+ }
+
+ @Override
+ public short getValue() {
+ return value;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFBsnTlvCrcEnabled.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnTlvCrcEnabled.Builder {
+ final OFBsnTlvCrcEnabledVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private short value;
+
+ BuilderWithParent(OFBsnTlvCrcEnabledVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public int getType() {
+ return 0x16;
+ }
+
+ @Override
+ public short getValue() {
+ return value;
+ }
+
+ @Override
+ public OFBsnTlvCrcEnabled.Builder setValue(short value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFBsnTlvCrcEnabled build() {
+ short value = this.valueSet ? this.value : parentMessage.value;
+
+ //
+ return new OFBsnTlvCrcEnabledVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnTlvCrcEnabled.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private short value;
+
+ @Override
+ public int getType() {
+ return 0x16;
+ }
+
+ @Override
+ public short getValue() {
+ return value;
+ }
+
+ @Override
+ public OFBsnTlvCrcEnabled.Builder setValue(short value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFBsnTlvCrcEnabled build() {
+ short value = this.valueSet ? this.value : DEFAULT_VALUE;
+
+
+ return new OFBsnTlvCrcEnabledVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnTlvCrcEnabled> {
+ @Override
+ public OFBsnTlvCrcEnabled readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 0x16
+ short type = bb.readShort();
+ if(type != (short) 0x16)
+ throw new OFParseError("Wrong type: Expected=0x16(0x16), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 5)
+ throw new OFParseError("Wrong length: Expected=5(5), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ short value = U8.f(bb.readByte());
+
+ OFBsnTlvCrcEnabledVer13 bsnTlvCrcEnabledVer13 = new OFBsnTlvCrcEnabledVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnTlvCrcEnabledVer13);
+ return bsnTlvCrcEnabledVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnTlvCrcEnabledVer13Funnel FUNNEL = new OFBsnTlvCrcEnabledVer13Funnel();
+ static class OFBsnTlvCrcEnabledVer13Funnel implements Funnel<OFBsnTlvCrcEnabledVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnTlvCrcEnabledVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 0x16
+ sink.putShort((short) 0x16);
+ // fixed value property length = 5
+ sink.putShort((short) 0x5);
+ sink.putShort(message.value);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnTlvCrcEnabledVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnTlvCrcEnabledVer13 message) {
+ // fixed value property type = 0x16
+ bb.writeShort((short) 0x16);
+ // fixed value property length = 5
+ bb.writeShort((short) 0x5);
+ bb.writeByte(U8.t(message.value));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnTlvCrcEnabledVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnTlvCrcEnabledVer13 other = (OFBsnTlvCrcEnabledVer13) obj;
+
+ if( value != other.value)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + value;
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvIdleNotificationVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvIdleNotificationVer13.java
new file mode 100644
index 0000000..75ce07f
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvIdleNotificationVer13.java
@@ -0,0 +1,156 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnTlvIdleNotificationVer13 implements OFBsnTlvIdleNotification {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnTlvIdleNotificationVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 4;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFBsnTlvIdleNotificationVer13 DEFAULT = new OFBsnTlvIdleNotificationVer13(
+
+ );
+
+ final static OFBsnTlvIdleNotificationVer13 INSTANCE = new OFBsnTlvIdleNotificationVer13();
+ // private empty constructor - use shared instance!
+ private OFBsnTlvIdleNotificationVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public int getType() {
+ return 0x7;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFBsnTlvIdleNotification.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFBsnTlvIdleNotificationVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnTlvIdleNotification> {
+ @Override
+ public OFBsnTlvIdleNotification readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 0x7
+ short type = bb.readShort();
+ if(type != (short) 0x7)
+ throw new OFParseError("Wrong type: Expected=0x7(0x7), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 4)
+ throw new OFParseError("Wrong length: Expected=4(4), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnTlvIdleNotificationVer13Funnel FUNNEL = new OFBsnTlvIdleNotificationVer13Funnel();
+ static class OFBsnTlvIdleNotificationVer13Funnel implements Funnel<OFBsnTlvIdleNotificationVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnTlvIdleNotificationVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 0x7
+ sink.putShort((short) 0x7);
+ // fixed value property length = 4
+ sink.putShort((short) 0x4);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnTlvIdleNotificationVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnTlvIdleNotificationVer13 message) {
+ // fixed value property type = 0x7
+ bb.writeShort((short) 0x7);
+ // fixed value property length = 4
+ bb.writeShort((short) 0x4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnTlvIdleNotificationVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvIdleTimeVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvIdleTimeVer13.java
new file mode 100644
index 0000000..11b4312
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvIdleTimeVer13.java
@@ -0,0 +1,267 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnTlvIdleTimeVer13 implements OFBsnTlvIdleTime {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnTlvIdleTimeVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 12;
+
+ private final static U64 DEFAULT_VALUE = U64.ZERO;
+
+ // OF message fields
+ private final U64 value;
+//
+ // Immutable default instance
+ final static OFBsnTlvIdleTimeVer13 DEFAULT = new OFBsnTlvIdleTimeVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnTlvIdleTimeVer13(U64 value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public int getType() {
+ return 0x5;
+ }
+
+ @Override
+ public U64 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFBsnTlvIdleTime.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnTlvIdleTime.Builder {
+ final OFBsnTlvIdleTimeVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private U64 value;
+
+ BuilderWithParent(OFBsnTlvIdleTimeVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public int getType() {
+ return 0x5;
+ }
+
+ @Override
+ public U64 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFBsnTlvIdleTime.Builder setValue(U64 value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFBsnTlvIdleTime build() {
+ U64 value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFBsnTlvIdleTimeVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnTlvIdleTime.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private U64 value;
+
+ @Override
+ public int getType() {
+ return 0x5;
+ }
+
+ @Override
+ public U64 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFBsnTlvIdleTime.Builder setValue(U64 value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFBsnTlvIdleTime build() {
+ U64 value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFBsnTlvIdleTimeVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnTlvIdleTime> {
+ @Override
+ public OFBsnTlvIdleTime readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 0x5
+ short type = bb.readShort();
+ if(type != (short) 0x5)
+ throw new OFParseError("Wrong type: Expected=0x5(0x5), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 12)
+ throw new OFParseError("Wrong length: Expected=12(12), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ U64 value = U64.ofRaw(bb.readLong());
+
+ OFBsnTlvIdleTimeVer13 bsnTlvIdleTimeVer13 = new OFBsnTlvIdleTimeVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnTlvIdleTimeVer13);
+ return bsnTlvIdleTimeVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnTlvIdleTimeVer13Funnel FUNNEL = new OFBsnTlvIdleTimeVer13Funnel();
+ static class OFBsnTlvIdleTimeVer13Funnel implements Funnel<OFBsnTlvIdleTimeVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnTlvIdleTimeVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 0x5
+ sink.putShort((short) 0x5);
+ // fixed value property length = 12
+ sink.putShort((short) 0xc);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnTlvIdleTimeVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnTlvIdleTimeVer13 message) {
+ // fixed value property type = 0x5
+ bb.writeShort((short) 0x5);
+ // fixed value property length = 12
+ bb.writeShort((short) 0xc);
+ bb.writeLong(message.value.getValue());
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnTlvIdleTimeVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnTlvIdleTimeVer13 other = (OFBsnTlvIdleTimeVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvIdleTimeoutVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvIdleTimeoutVer13.java
new file mode 100644
index 0000000..c958c11
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvIdleTimeoutVer13.java
@@ -0,0 +1,260 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnTlvIdleTimeoutVer13 implements OFBsnTlvIdleTimeout {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnTlvIdleTimeoutVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static long DEFAULT_VALUE = 0x0L;
+
+ // OF message fields
+ private final long value;
+//
+ // Immutable default instance
+ final static OFBsnTlvIdleTimeoutVer13 DEFAULT = new OFBsnTlvIdleTimeoutVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnTlvIdleTimeoutVer13(long value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public int getType() {
+ return 0x8;
+ }
+
+ @Override
+ public long getValue() {
+ return value;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFBsnTlvIdleTimeout.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnTlvIdleTimeout.Builder {
+ final OFBsnTlvIdleTimeoutVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private long value;
+
+ BuilderWithParent(OFBsnTlvIdleTimeoutVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public int getType() {
+ return 0x8;
+ }
+
+ @Override
+ public long getValue() {
+ return value;
+ }
+
+ @Override
+ public OFBsnTlvIdleTimeout.Builder setValue(long value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFBsnTlvIdleTimeout build() {
+ long value = this.valueSet ? this.value : parentMessage.value;
+
+ //
+ return new OFBsnTlvIdleTimeoutVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnTlvIdleTimeout.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private long value;
+
+ @Override
+ public int getType() {
+ return 0x8;
+ }
+
+ @Override
+ public long getValue() {
+ return value;
+ }
+
+ @Override
+ public OFBsnTlvIdleTimeout.Builder setValue(long value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFBsnTlvIdleTimeout build() {
+ long value = this.valueSet ? this.value : DEFAULT_VALUE;
+
+
+ return new OFBsnTlvIdleTimeoutVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnTlvIdleTimeout> {
+ @Override
+ public OFBsnTlvIdleTimeout readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 0x8
+ short type = bb.readShort();
+ if(type != (short) 0x8)
+ throw new OFParseError("Wrong type: Expected=0x8(0x8), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 8)
+ throw new OFParseError("Wrong length: Expected=8(8), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long value = U32.f(bb.readInt());
+
+ OFBsnTlvIdleTimeoutVer13 bsnTlvIdleTimeoutVer13 = new OFBsnTlvIdleTimeoutVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnTlvIdleTimeoutVer13);
+ return bsnTlvIdleTimeoutVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnTlvIdleTimeoutVer13Funnel FUNNEL = new OFBsnTlvIdleTimeoutVer13Funnel();
+ static class OFBsnTlvIdleTimeoutVer13Funnel implements Funnel<OFBsnTlvIdleTimeoutVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnTlvIdleTimeoutVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 0x8
+ sink.putShort((short) 0x8);
+ // fixed value property length = 8
+ sink.putShort((short) 0x8);
+ sink.putLong(message.value);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnTlvIdleTimeoutVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnTlvIdleTimeoutVer13 message) {
+ // fixed value property type = 0x8
+ bb.writeShort((short) 0x8);
+ // fixed value property length = 8
+ bb.writeShort((short) 0x8);
+ bb.writeInt(U32.t(message.value));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnTlvIdleTimeoutVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnTlvIdleTimeoutVer13 other = (OFBsnTlvIdleTimeoutVer13) obj;
+
+ if( value != other.value)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (value ^ (value >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvIpv4Ver13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvIpv4Ver13.java
new file mode 100644
index 0000000..4deb9e0
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvIpv4Ver13.java
@@ -0,0 +1,267 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnTlvIpv4Ver13 implements OFBsnTlvIpv4 {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnTlvIpv4Ver13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static IPv4Address DEFAULT_VALUE = IPv4Address.NONE;
+
+ // OF message fields
+ private final IPv4Address value;
+//
+ // Immutable default instance
+ final static OFBsnTlvIpv4Ver13 DEFAULT = new OFBsnTlvIpv4Ver13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnTlvIpv4Ver13(IPv4Address value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public int getType() {
+ return 0x4;
+ }
+
+ @Override
+ public IPv4Address getValue() {
+ return value;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFBsnTlvIpv4.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnTlvIpv4.Builder {
+ final OFBsnTlvIpv4Ver13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private IPv4Address value;
+
+ BuilderWithParent(OFBsnTlvIpv4Ver13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public int getType() {
+ return 0x4;
+ }
+
+ @Override
+ public IPv4Address getValue() {
+ return value;
+ }
+
+ @Override
+ public OFBsnTlvIpv4.Builder setValue(IPv4Address value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFBsnTlvIpv4 build() {
+ IPv4Address value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFBsnTlvIpv4Ver13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnTlvIpv4.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private IPv4Address value;
+
+ @Override
+ public int getType() {
+ return 0x4;
+ }
+
+ @Override
+ public IPv4Address getValue() {
+ return value;
+ }
+
+ @Override
+ public OFBsnTlvIpv4.Builder setValue(IPv4Address value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFBsnTlvIpv4 build() {
+ IPv4Address value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFBsnTlvIpv4Ver13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnTlvIpv4> {
+ @Override
+ public OFBsnTlvIpv4 readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 0x4
+ short type = bb.readShort();
+ if(type != (short) 0x4)
+ throw new OFParseError("Wrong type: Expected=0x4(0x4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 8)
+ throw new OFParseError("Wrong length: Expected=8(8), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ IPv4Address value = IPv4Address.read4Bytes(bb);
+
+ OFBsnTlvIpv4Ver13 bsnTlvIpv4Ver13 = new OFBsnTlvIpv4Ver13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnTlvIpv4Ver13);
+ return bsnTlvIpv4Ver13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnTlvIpv4Ver13Funnel FUNNEL = new OFBsnTlvIpv4Ver13Funnel();
+ static class OFBsnTlvIpv4Ver13Funnel implements Funnel<OFBsnTlvIpv4Ver13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnTlvIpv4Ver13 message, PrimitiveSink sink) {
+ // fixed value property type = 0x4
+ sink.putShort((short) 0x4);
+ // fixed value property length = 8
+ sink.putShort((short) 0x8);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnTlvIpv4Ver13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnTlvIpv4Ver13 message) {
+ // fixed value property type = 0x4
+ bb.writeShort((short) 0x4);
+ // fixed value property length = 8
+ bb.writeShort((short) 0x8);
+ message.value.write4Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnTlvIpv4Ver13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnTlvIpv4Ver13 other = (OFBsnTlvIpv4Ver13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvMacVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvMacVer13.java
new file mode 100644
index 0000000..3c383ab
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvMacVer13.java
@@ -0,0 +1,267 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnTlvMacVer13 implements OFBsnTlvMac {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnTlvMacVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 10;
+
+ private final static MacAddress DEFAULT_VALUE = MacAddress.NONE;
+
+ // OF message fields
+ private final MacAddress value;
+//
+ // Immutable default instance
+ final static OFBsnTlvMacVer13 DEFAULT = new OFBsnTlvMacVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnTlvMacVer13(MacAddress value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public int getType() {
+ return 0x1;
+ }
+
+ @Override
+ public MacAddress getValue() {
+ return value;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFBsnTlvMac.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnTlvMac.Builder {
+ final OFBsnTlvMacVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private MacAddress value;
+
+ BuilderWithParent(OFBsnTlvMacVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public int getType() {
+ return 0x1;
+ }
+
+ @Override
+ public MacAddress getValue() {
+ return value;
+ }
+
+ @Override
+ public OFBsnTlvMac.Builder setValue(MacAddress value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFBsnTlvMac build() {
+ MacAddress value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFBsnTlvMacVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnTlvMac.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private MacAddress value;
+
+ @Override
+ public int getType() {
+ return 0x1;
+ }
+
+ @Override
+ public MacAddress getValue() {
+ return value;
+ }
+
+ @Override
+ public OFBsnTlvMac.Builder setValue(MacAddress value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFBsnTlvMac build() {
+ MacAddress value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFBsnTlvMacVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnTlvMac> {
+ @Override
+ public OFBsnTlvMac readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 0x1
+ short type = bb.readShort();
+ if(type != (short) 0x1)
+ throw new OFParseError("Wrong type: Expected=0x1(0x1), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 10)
+ throw new OFParseError("Wrong length: Expected=10(10), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ MacAddress value = MacAddress.read6Bytes(bb);
+
+ OFBsnTlvMacVer13 bsnTlvMacVer13 = new OFBsnTlvMacVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnTlvMacVer13);
+ return bsnTlvMacVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnTlvMacVer13Funnel FUNNEL = new OFBsnTlvMacVer13Funnel();
+ static class OFBsnTlvMacVer13Funnel implements Funnel<OFBsnTlvMacVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnTlvMacVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 0x1
+ sink.putShort((short) 0x1);
+ // fixed value property length = 10
+ sink.putShort((short) 0xa);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnTlvMacVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnTlvMacVer13 message) {
+ // fixed value property type = 0x1
+ bb.writeShort((short) 0x1);
+ // fixed value property length = 10
+ bb.writeShort((short) 0xa);
+ message.value.write6Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnTlvMacVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnTlvMacVer13 other = (OFBsnTlvMacVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvMissPacketsVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvMissPacketsVer13.java
new file mode 100644
index 0000000..e014663
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvMissPacketsVer13.java
@@ -0,0 +1,267 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnTlvMissPacketsVer13 implements OFBsnTlvMissPackets {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnTlvMissPacketsVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 12;
+
+ private final static U64 DEFAULT_VALUE = U64.ZERO;
+
+ // OF message fields
+ private final U64 value;
+//
+ // Immutable default instance
+ final static OFBsnTlvMissPacketsVer13 DEFAULT = new OFBsnTlvMissPacketsVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnTlvMissPacketsVer13(U64 value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public int getType() {
+ return 0xd;
+ }
+
+ @Override
+ public U64 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFBsnTlvMissPackets.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnTlvMissPackets.Builder {
+ final OFBsnTlvMissPacketsVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private U64 value;
+
+ BuilderWithParent(OFBsnTlvMissPacketsVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public int getType() {
+ return 0xd;
+ }
+
+ @Override
+ public U64 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFBsnTlvMissPackets.Builder setValue(U64 value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFBsnTlvMissPackets build() {
+ U64 value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFBsnTlvMissPacketsVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnTlvMissPackets.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private U64 value;
+
+ @Override
+ public int getType() {
+ return 0xd;
+ }
+
+ @Override
+ public U64 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFBsnTlvMissPackets.Builder setValue(U64 value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFBsnTlvMissPackets build() {
+ U64 value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFBsnTlvMissPacketsVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnTlvMissPackets> {
+ @Override
+ public OFBsnTlvMissPackets readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 0xd
+ short type = bb.readShort();
+ if(type != (short) 0xd)
+ throw new OFParseError("Wrong type: Expected=0xd(0xd), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 12)
+ throw new OFParseError("Wrong length: Expected=12(12), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ U64 value = U64.ofRaw(bb.readLong());
+
+ OFBsnTlvMissPacketsVer13 bsnTlvMissPacketsVer13 = new OFBsnTlvMissPacketsVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnTlvMissPacketsVer13);
+ return bsnTlvMissPacketsVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnTlvMissPacketsVer13Funnel FUNNEL = new OFBsnTlvMissPacketsVer13Funnel();
+ static class OFBsnTlvMissPacketsVer13Funnel implements Funnel<OFBsnTlvMissPacketsVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnTlvMissPacketsVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 0xd
+ sink.putShort((short) 0xd);
+ // fixed value property length = 12
+ sink.putShort((short) 0xc);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnTlvMissPacketsVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnTlvMissPacketsVer13 message) {
+ // fixed value property type = 0xd
+ bb.writeShort((short) 0xd);
+ // fixed value property length = 12
+ bb.writeShort((short) 0xc);
+ bb.writeLong(message.value.getValue());
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnTlvMissPacketsVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnTlvMissPacketsVer13 other = (OFBsnTlvMissPacketsVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvPortVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvPortVer13.java
new file mode 100644
index 0000000..76cb109
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvPortVer13.java
@@ -0,0 +1,267 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnTlvPortVer13 implements OFBsnTlvPort {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnTlvPortVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static OFPort DEFAULT_VALUE = OFPort.ANY;
+
+ // OF message fields
+ private final OFPort value;
+//
+ // Immutable default instance
+ final static OFBsnTlvPortVer13 DEFAULT = new OFBsnTlvPortVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnTlvPortVer13(OFPort value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public int getType() {
+ return 0x0;
+ }
+
+ @Override
+ public OFPort getValue() {
+ return value;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFBsnTlvPort.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnTlvPort.Builder {
+ final OFBsnTlvPortVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private OFPort value;
+
+ BuilderWithParent(OFBsnTlvPortVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public int getType() {
+ return 0x0;
+ }
+
+ @Override
+ public OFPort getValue() {
+ return value;
+ }
+
+ @Override
+ public OFBsnTlvPort.Builder setValue(OFPort value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFBsnTlvPort build() {
+ OFPort value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFBsnTlvPortVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnTlvPort.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private OFPort value;
+
+ @Override
+ public int getType() {
+ return 0x0;
+ }
+
+ @Override
+ public OFPort getValue() {
+ return value;
+ }
+
+ @Override
+ public OFBsnTlvPort.Builder setValue(OFPort value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFBsnTlvPort build() {
+ OFPort value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFBsnTlvPortVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnTlvPort> {
+ @Override
+ public OFBsnTlvPort readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 0x0
+ short type = bb.readShort();
+ if(type != (short) 0x0)
+ throw new OFParseError("Wrong type: Expected=0x0(0x0), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 8)
+ throw new OFParseError("Wrong length: Expected=8(8), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ OFPort value = OFPort.read4Bytes(bb);
+
+ OFBsnTlvPortVer13 bsnTlvPortVer13 = new OFBsnTlvPortVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnTlvPortVer13);
+ return bsnTlvPortVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnTlvPortVer13Funnel FUNNEL = new OFBsnTlvPortVer13Funnel();
+ static class OFBsnTlvPortVer13Funnel implements Funnel<OFBsnTlvPortVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnTlvPortVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 0x0
+ sink.putShort((short) 0x0);
+ // fixed value property length = 8
+ sink.putShort((short) 0x8);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnTlvPortVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnTlvPortVer13 message) {
+ // fixed value property type = 0x0
+ bb.writeShort((short) 0x0);
+ // fixed value property length = 8
+ bb.writeShort((short) 0x8);
+ message.value.write4Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnTlvPortVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnTlvPortVer13 other = (OFBsnTlvPortVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvQueueIdVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvQueueIdVer13.java
new file mode 100644
index 0000000..c398747
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvQueueIdVer13.java
@@ -0,0 +1,260 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnTlvQueueIdVer13 implements OFBsnTlvQueueId {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnTlvQueueIdVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static long DEFAULT_VALUE = 0x0L;
+
+ // OF message fields
+ private final long value;
+//
+ // Immutable default instance
+ final static OFBsnTlvQueueIdVer13 DEFAULT = new OFBsnTlvQueueIdVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnTlvQueueIdVer13(long value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public int getType() {
+ return 0x14;
+ }
+
+ @Override
+ public long getValue() {
+ return value;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFBsnTlvQueueId.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnTlvQueueId.Builder {
+ final OFBsnTlvQueueIdVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private long value;
+
+ BuilderWithParent(OFBsnTlvQueueIdVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public int getType() {
+ return 0x14;
+ }
+
+ @Override
+ public long getValue() {
+ return value;
+ }
+
+ @Override
+ public OFBsnTlvQueueId.Builder setValue(long value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFBsnTlvQueueId build() {
+ long value = this.valueSet ? this.value : parentMessage.value;
+
+ //
+ return new OFBsnTlvQueueIdVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnTlvQueueId.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private long value;
+
+ @Override
+ public int getType() {
+ return 0x14;
+ }
+
+ @Override
+ public long getValue() {
+ return value;
+ }
+
+ @Override
+ public OFBsnTlvQueueId.Builder setValue(long value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFBsnTlvQueueId build() {
+ long value = this.valueSet ? this.value : DEFAULT_VALUE;
+
+
+ return new OFBsnTlvQueueIdVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnTlvQueueId> {
+ @Override
+ public OFBsnTlvQueueId readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 0x14
+ short type = bb.readShort();
+ if(type != (short) 0x14)
+ throw new OFParseError("Wrong type: Expected=0x14(0x14), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 8)
+ throw new OFParseError("Wrong length: Expected=8(8), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long value = U32.f(bb.readInt());
+
+ OFBsnTlvQueueIdVer13 bsnTlvQueueIdVer13 = new OFBsnTlvQueueIdVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnTlvQueueIdVer13);
+ return bsnTlvQueueIdVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnTlvQueueIdVer13Funnel FUNNEL = new OFBsnTlvQueueIdVer13Funnel();
+ static class OFBsnTlvQueueIdVer13Funnel implements Funnel<OFBsnTlvQueueIdVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnTlvQueueIdVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 0x14
+ sink.putShort((short) 0x14);
+ // fixed value property length = 8
+ sink.putShort((short) 0x8);
+ sink.putLong(message.value);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnTlvQueueIdVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnTlvQueueIdVer13 message) {
+ // fixed value property type = 0x14
+ bb.writeShort((short) 0x14);
+ // fixed value property length = 8
+ bb.writeShort((short) 0x8);
+ bb.writeInt(U32.t(message.value));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnTlvQueueIdVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnTlvQueueIdVer13 other = (OFBsnTlvQueueIdVer13) obj;
+
+ if( value != other.value)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (value ^ (value >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvQueueWeightVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvQueueWeightVer13.java
new file mode 100644
index 0000000..8661e1d
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvQueueWeightVer13.java
@@ -0,0 +1,260 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnTlvQueueWeightVer13 implements OFBsnTlvQueueWeight {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnTlvQueueWeightVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static long DEFAULT_VALUE = 0x0L;
+
+ // OF message fields
+ private final long value;
+//
+ // Immutable default instance
+ final static OFBsnTlvQueueWeightVer13 DEFAULT = new OFBsnTlvQueueWeightVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnTlvQueueWeightVer13(long value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public int getType() {
+ return 0x15;
+ }
+
+ @Override
+ public long getValue() {
+ return value;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFBsnTlvQueueWeight.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnTlvQueueWeight.Builder {
+ final OFBsnTlvQueueWeightVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private long value;
+
+ BuilderWithParent(OFBsnTlvQueueWeightVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public int getType() {
+ return 0x15;
+ }
+
+ @Override
+ public long getValue() {
+ return value;
+ }
+
+ @Override
+ public OFBsnTlvQueueWeight.Builder setValue(long value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFBsnTlvQueueWeight build() {
+ long value = this.valueSet ? this.value : parentMessage.value;
+
+ //
+ return new OFBsnTlvQueueWeightVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnTlvQueueWeight.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private long value;
+
+ @Override
+ public int getType() {
+ return 0x15;
+ }
+
+ @Override
+ public long getValue() {
+ return value;
+ }
+
+ @Override
+ public OFBsnTlvQueueWeight.Builder setValue(long value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFBsnTlvQueueWeight build() {
+ long value = this.valueSet ? this.value : DEFAULT_VALUE;
+
+
+ return new OFBsnTlvQueueWeightVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnTlvQueueWeight> {
+ @Override
+ public OFBsnTlvQueueWeight readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 0x15
+ short type = bb.readShort();
+ if(type != (short) 0x15)
+ throw new OFParseError("Wrong type: Expected=0x15(0x15), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 8)
+ throw new OFParseError("Wrong length: Expected=8(8), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long value = U32.f(bb.readInt());
+
+ OFBsnTlvQueueWeightVer13 bsnTlvQueueWeightVer13 = new OFBsnTlvQueueWeightVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnTlvQueueWeightVer13);
+ return bsnTlvQueueWeightVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnTlvQueueWeightVer13Funnel FUNNEL = new OFBsnTlvQueueWeightVer13Funnel();
+ static class OFBsnTlvQueueWeightVer13Funnel implements Funnel<OFBsnTlvQueueWeightVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnTlvQueueWeightVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 0x15
+ sink.putShort((short) 0x15);
+ // fixed value property length = 8
+ sink.putShort((short) 0x8);
+ sink.putLong(message.value);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnTlvQueueWeightVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnTlvQueueWeightVer13 message) {
+ // fixed value property type = 0x15
+ bb.writeShort((short) 0x15);
+ // fixed value property length = 8
+ bb.writeShort((short) 0x8);
+ bb.writeInt(U32.t(message.value));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnTlvQueueWeightVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnTlvQueueWeightVer13 other = (OFBsnTlvQueueWeightVer13) obj;
+
+ if( value != other.value)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (value ^ (value >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvReplyPacketsVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvReplyPacketsVer13.java
new file mode 100644
index 0000000..dabb3f1
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvReplyPacketsVer13.java
@@ -0,0 +1,267 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnTlvReplyPacketsVer13 implements OFBsnTlvReplyPackets {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnTlvReplyPacketsVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 12;
+
+ private final static U64 DEFAULT_VALUE = U64.ZERO;
+
+ // OF message fields
+ private final U64 value;
+//
+ // Immutable default instance
+ final static OFBsnTlvReplyPacketsVer13 DEFAULT = new OFBsnTlvReplyPacketsVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnTlvReplyPacketsVer13(U64 value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public int getType() {
+ return 0xc;
+ }
+
+ @Override
+ public U64 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFBsnTlvReplyPackets.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnTlvReplyPackets.Builder {
+ final OFBsnTlvReplyPacketsVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private U64 value;
+
+ BuilderWithParent(OFBsnTlvReplyPacketsVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public int getType() {
+ return 0xc;
+ }
+
+ @Override
+ public U64 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFBsnTlvReplyPackets.Builder setValue(U64 value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFBsnTlvReplyPackets build() {
+ U64 value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFBsnTlvReplyPacketsVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnTlvReplyPackets.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private U64 value;
+
+ @Override
+ public int getType() {
+ return 0xc;
+ }
+
+ @Override
+ public U64 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFBsnTlvReplyPackets.Builder setValue(U64 value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFBsnTlvReplyPackets build() {
+ U64 value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFBsnTlvReplyPacketsVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnTlvReplyPackets> {
+ @Override
+ public OFBsnTlvReplyPackets readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 0xc
+ short type = bb.readShort();
+ if(type != (short) 0xc)
+ throw new OFParseError("Wrong type: Expected=0xc(0xc), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 12)
+ throw new OFParseError("Wrong length: Expected=12(12), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ U64 value = U64.ofRaw(bb.readLong());
+
+ OFBsnTlvReplyPacketsVer13 bsnTlvReplyPacketsVer13 = new OFBsnTlvReplyPacketsVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnTlvReplyPacketsVer13);
+ return bsnTlvReplyPacketsVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnTlvReplyPacketsVer13Funnel FUNNEL = new OFBsnTlvReplyPacketsVer13Funnel();
+ static class OFBsnTlvReplyPacketsVer13Funnel implements Funnel<OFBsnTlvReplyPacketsVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnTlvReplyPacketsVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 0xc
+ sink.putShort((short) 0xc);
+ // fixed value property length = 12
+ sink.putShort((short) 0xc);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnTlvReplyPacketsVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnTlvReplyPacketsVer13 message) {
+ // fixed value property type = 0xc
+ bb.writeShort((short) 0xc);
+ // fixed value property length = 12
+ bb.writeShort((short) 0xc);
+ bb.writeLong(message.value.getValue());
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnTlvReplyPacketsVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnTlvReplyPacketsVer13 other = (OFBsnTlvReplyPacketsVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvRequestPacketsVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvRequestPacketsVer13.java
new file mode 100644
index 0000000..40f2709
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvRequestPacketsVer13.java
@@ -0,0 +1,267 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnTlvRequestPacketsVer13 implements OFBsnTlvRequestPackets {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnTlvRequestPacketsVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 12;
+
+ private final static U64 DEFAULT_VALUE = U64.ZERO;
+
+ // OF message fields
+ private final U64 value;
+//
+ // Immutable default instance
+ final static OFBsnTlvRequestPacketsVer13 DEFAULT = new OFBsnTlvRequestPacketsVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnTlvRequestPacketsVer13(U64 value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public int getType() {
+ return 0xb;
+ }
+
+ @Override
+ public U64 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFBsnTlvRequestPackets.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnTlvRequestPackets.Builder {
+ final OFBsnTlvRequestPacketsVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private U64 value;
+
+ BuilderWithParent(OFBsnTlvRequestPacketsVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public int getType() {
+ return 0xb;
+ }
+
+ @Override
+ public U64 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFBsnTlvRequestPackets.Builder setValue(U64 value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFBsnTlvRequestPackets build() {
+ U64 value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFBsnTlvRequestPacketsVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnTlvRequestPackets.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private U64 value;
+
+ @Override
+ public int getType() {
+ return 0xb;
+ }
+
+ @Override
+ public U64 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFBsnTlvRequestPackets.Builder setValue(U64 value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFBsnTlvRequestPackets build() {
+ U64 value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFBsnTlvRequestPacketsVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnTlvRequestPackets> {
+ @Override
+ public OFBsnTlvRequestPackets readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 0xb
+ short type = bb.readShort();
+ if(type != (short) 0xb)
+ throw new OFParseError("Wrong type: Expected=0xb(0xb), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 12)
+ throw new OFParseError("Wrong length: Expected=12(12), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ U64 value = U64.ofRaw(bb.readLong());
+
+ OFBsnTlvRequestPacketsVer13 bsnTlvRequestPacketsVer13 = new OFBsnTlvRequestPacketsVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnTlvRequestPacketsVer13);
+ return bsnTlvRequestPacketsVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnTlvRequestPacketsVer13Funnel FUNNEL = new OFBsnTlvRequestPacketsVer13Funnel();
+ static class OFBsnTlvRequestPacketsVer13Funnel implements Funnel<OFBsnTlvRequestPacketsVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnTlvRequestPacketsVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 0xb
+ sink.putShort((short) 0xb);
+ // fixed value property length = 12
+ sink.putShort((short) 0xc);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnTlvRequestPacketsVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnTlvRequestPacketsVer13 message) {
+ // fixed value property type = 0xb
+ bb.writeShort((short) 0xb);
+ // fixed value property length = 12
+ bb.writeShort((short) 0xc);
+ bb.writeLong(message.value.getValue());
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnTlvRequestPacketsVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnTlvRequestPacketsVer13 other = (OFBsnTlvRequestPacketsVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvRxPacketsVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvRxPacketsVer13.java
new file mode 100644
index 0000000..c8d4998
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvRxPacketsVer13.java
@@ -0,0 +1,267 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnTlvRxPacketsVer13 implements OFBsnTlvRxPackets {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnTlvRxPacketsVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 12;
+
+ private final static U64 DEFAULT_VALUE = U64.ZERO;
+
+ // OF message fields
+ private final U64 value;
+//
+ // Immutable default instance
+ final static OFBsnTlvRxPacketsVer13 DEFAULT = new OFBsnTlvRxPacketsVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnTlvRxPacketsVer13(U64 value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public int getType() {
+ return 0x2;
+ }
+
+ @Override
+ public U64 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFBsnTlvRxPackets.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnTlvRxPackets.Builder {
+ final OFBsnTlvRxPacketsVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private U64 value;
+
+ BuilderWithParent(OFBsnTlvRxPacketsVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public int getType() {
+ return 0x2;
+ }
+
+ @Override
+ public U64 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFBsnTlvRxPackets.Builder setValue(U64 value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFBsnTlvRxPackets build() {
+ U64 value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFBsnTlvRxPacketsVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnTlvRxPackets.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private U64 value;
+
+ @Override
+ public int getType() {
+ return 0x2;
+ }
+
+ @Override
+ public U64 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFBsnTlvRxPackets.Builder setValue(U64 value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFBsnTlvRxPackets build() {
+ U64 value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFBsnTlvRxPacketsVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnTlvRxPackets> {
+ @Override
+ public OFBsnTlvRxPackets readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 0x2
+ short type = bb.readShort();
+ if(type != (short) 0x2)
+ throw new OFParseError("Wrong type: Expected=0x2(0x2), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 12)
+ throw new OFParseError("Wrong length: Expected=12(12), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ U64 value = U64.ofRaw(bb.readLong());
+
+ OFBsnTlvRxPacketsVer13 bsnTlvRxPacketsVer13 = new OFBsnTlvRxPacketsVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnTlvRxPacketsVer13);
+ return bsnTlvRxPacketsVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnTlvRxPacketsVer13Funnel FUNNEL = new OFBsnTlvRxPacketsVer13Funnel();
+ static class OFBsnTlvRxPacketsVer13Funnel implements Funnel<OFBsnTlvRxPacketsVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnTlvRxPacketsVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 0x2
+ sink.putShort((short) 0x2);
+ // fixed value property length = 12
+ sink.putShort((short) 0xc);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnTlvRxPacketsVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnTlvRxPacketsVer13 message) {
+ // fixed value property type = 0x2
+ bb.writeShort((short) 0x2);
+ // fixed value property length = 12
+ bb.writeShort((short) 0xc);
+ bb.writeLong(message.value.getValue());
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnTlvRxPacketsVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnTlvRxPacketsVer13 other = (OFBsnTlvRxPacketsVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvTxPacketsVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvTxPacketsVer13.java
new file mode 100644
index 0000000..8f687aa
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvTxPacketsVer13.java
@@ -0,0 +1,267 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnTlvTxPacketsVer13 implements OFBsnTlvTxPackets {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnTlvTxPacketsVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 12;
+
+ private final static U64 DEFAULT_VALUE = U64.ZERO;
+
+ // OF message fields
+ private final U64 value;
+//
+ // Immutable default instance
+ final static OFBsnTlvTxPacketsVer13 DEFAULT = new OFBsnTlvTxPacketsVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnTlvTxPacketsVer13(U64 value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public int getType() {
+ return 0x3;
+ }
+
+ @Override
+ public U64 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFBsnTlvTxPackets.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnTlvTxPackets.Builder {
+ final OFBsnTlvTxPacketsVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private U64 value;
+
+ BuilderWithParent(OFBsnTlvTxPacketsVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public int getType() {
+ return 0x3;
+ }
+
+ @Override
+ public U64 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFBsnTlvTxPackets.Builder setValue(U64 value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFBsnTlvTxPackets build() {
+ U64 value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFBsnTlvTxPacketsVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnTlvTxPackets.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private U64 value;
+
+ @Override
+ public int getType() {
+ return 0x3;
+ }
+
+ @Override
+ public U64 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFBsnTlvTxPackets.Builder setValue(U64 value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFBsnTlvTxPackets build() {
+ U64 value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFBsnTlvTxPacketsVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnTlvTxPackets> {
+ @Override
+ public OFBsnTlvTxPackets readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 0x3
+ short type = bb.readShort();
+ if(type != (short) 0x3)
+ throw new OFParseError("Wrong type: Expected=0x3(0x3), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 12)
+ throw new OFParseError("Wrong length: Expected=12(12), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ U64 value = U64.ofRaw(bb.readLong());
+
+ OFBsnTlvTxPacketsVer13 bsnTlvTxPacketsVer13 = new OFBsnTlvTxPacketsVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnTlvTxPacketsVer13);
+ return bsnTlvTxPacketsVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnTlvTxPacketsVer13Funnel FUNNEL = new OFBsnTlvTxPacketsVer13Funnel();
+ static class OFBsnTlvTxPacketsVer13Funnel implements Funnel<OFBsnTlvTxPacketsVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnTlvTxPacketsVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 0x3
+ sink.putShort((short) 0x3);
+ // fixed value property length = 12
+ sink.putShort((short) 0xc);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnTlvTxPacketsVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnTlvTxPacketsVer13 message) {
+ // fixed value property type = 0x3
+ bb.writeShort((short) 0x3);
+ // fixed value property length = 12
+ bb.writeShort((short) 0xc);
+ bb.writeLong(message.value.getValue());
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnTlvTxPacketsVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnTlvTxPacketsVer13 other = (OFBsnTlvTxPacketsVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvUdfAnchorVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvUdfAnchorVer13.java
new file mode 100644
index 0000000..358310e
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvUdfAnchorVer13.java
@@ -0,0 +1,263 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnTlvUdfAnchorVer13 implements OFBsnTlvUdfAnchor {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnTlvUdfAnchorVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 6;
+
+
+ // OF message fields
+ private final OFBsnUdfAnchor value;
+//
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnTlvUdfAnchorVer13(OFBsnUdfAnchor value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public int getType() {
+ return 0x10;
+ }
+
+ @Override
+ public OFBsnUdfAnchor getValue() {
+ return value;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFBsnTlvUdfAnchor.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnTlvUdfAnchor.Builder {
+ final OFBsnTlvUdfAnchorVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private OFBsnUdfAnchor value;
+
+ BuilderWithParent(OFBsnTlvUdfAnchorVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public int getType() {
+ return 0x10;
+ }
+
+ @Override
+ public OFBsnUdfAnchor getValue() {
+ return value;
+ }
+
+ @Override
+ public OFBsnTlvUdfAnchor.Builder setValue(OFBsnUdfAnchor value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFBsnTlvUdfAnchor build() {
+ OFBsnUdfAnchor value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFBsnTlvUdfAnchorVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnTlvUdfAnchor.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private OFBsnUdfAnchor value;
+
+ @Override
+ public int getType() {
+ return 0x10;
+ }
+
+ @Override
+ public OFBsnUdfAnchor getValue() {
+ return value;
+ }
+
+ @Override
+ public OFBsnTlvUdfAnchor.Builder setValue(OFBsnUdfAnchor value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFBsnTlvUdfAnchor build() {
+ if(!this.valueSet)
+ throw new IllegalStateException("Property value doesn't have default value -- must be set");
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFBsnTlvUdfAnchorVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnTlvUdfAnchor> {
+ @Override
+ public OFBsnTlvUdfAnchor readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 0x10
+ short type = bb.readShort();
+ if(type != (short) 0x10)
+ throw new OFParseError("Wrong type: Expected=0x10(0x10), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 6)
+ throw new OFParseError("Wrong length: Expected=6(6), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ OFBsnUdfAnchor value = OFBsnUdfAnchorSerializerVer13.readFrom(bb);
+
+ OFBsnTlvUdfAnchorVer13 bsnTlvUdfAnchorVer13 = new OFBsnTlvUdfAnchorVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnTlvUdfAnchorVer13);
+ return bsnTlvUdfAnchorVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnTlvUdfAnchorVer13Funnel FUNNEL = new OFBsnTlvUdfAnchorVer13Funnel();
+ static class OFBsnTlvUdfAnchorVer13Funnel implements Funnel<OFBsnTlvUdfAnchorVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnTlvUdfAnchorVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 0x10
+ sink.putShort((short) 0x10);
+ // fixed value property length = 6
+ sink.putShort((short) 0x6);
+ OFBsnUdfAnchorSerializerVer13.putTo(message.value, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnTlvUdfAnchorVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnTlvUdfAnchorVer13 message) {
+ // fixed value property type = 0x10
+ bb.writeShort((short) 0x10);
+ // fixed value property length = 6
+ bb.writeShort((short) 0x6);
+ OFBsnUdfAnchorSerializerVer13.writeTo(bb, message.value);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnTlvUdfAnchorVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnTlvUdfAnchorVer13 other = (OFBsnTlvUdfAnchorVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvUdfIdVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvUdfIdVer13.java
new file mode 100644
index 0000000..3c3ac1e
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvUdfIdVer13.java
@@ -0,0 +1,260 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnTlvUdfIdVer13 implements OFBsnTlvUdfId {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnTlvUdfIdVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 6;
+
+ private final static int DEFAULT_VALUE = 0x0;
+
+ // OF message fields
+ private final int value;
+//
+ // Immutable default instance
+ final static OFBsnTlvUdfIdVer13 DEFAULT = new OFBsnTlvUdfIdVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnTlvUdfIdVer13(int value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public int getType() {
+ return 0xf;
+ }
+
+ @Override
+ public int getValue() {
+ return value;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFBsnTlvUdfId.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnTlvUdfId.Builder {
+ final OFBsnTlvUdfIdVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private int value;
+
+ BuilderWithParent(OFBsnTlvUdfIdVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public int getType() {
+ return 0xf;
+ }
+
+ @Override
+ public int getValue() {
+ return value;
+ }
+
+ @Override
+ public OFBsnTlvUdfId.Builder setValue(int value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFBsnTlvUdfId build() {
+ int value = this.valueSet ? this.value : parentMessage.value;
+
+ //
+ return new OFBsnTlvUdfIdVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnTlvUdfId.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private int value;
+
+ @Override
+ public int getType() {
+ return 0xf;
+ }
+
+ @Override
+ public int getValue() {
+ return value;
+ }
+
+ @Override
+ public OFBsnTlvUdfId.Builder setValue(int value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFBsnTlvUdfId build() {
+ int value = this.valueSet ? this.value : DEFAULT_VALUE;
+
+
+ return new OFBsnTlvUdfIdVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnTlvUdfId> {
+ @Override
+ public OFBsnTlvUdfId readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 0xf
+ short type = bb.readShort();
+ if(type != (short) 0xf)
+ throw new OFParseError("Wrong type: Expected=0xf(0xf), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 6)
+ throw new OFParseError("Wrong length: Expected=6(6), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ int value = U16.f(bb.readShort());
+
+ OFBsnTlvUdfIdVer13 bsnTlvUdfIdVer13 = new OFBsnTlvUdfIdVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnTlvUdfIdVer13);
+ return bsnTlvUdfIdVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnTlvUdfIdVer13Funnel FUNNEL = new OFBsnTlvUdfIdVer13Funnel();
+ static class OFBsnTlvUdfIdVer13Funnel implements Funnel<OFBsnTlvUdfIdVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnTlvUdfIdVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 0xf
+ sink.putShort((short) 0xf);
+ // fixed value property length = 6
+ sink.putShort((short) 0x6);
+ sink.putInt(message.value);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnTlvUdfIdVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnTlvUdfIdVer13 message) {
+ // fixed value property type = 0xf
+ bb.writeShort((short) 0xf);
+ // fixed value property length = 6
+ bb.writeShort((short) 0x6);
+ bb.writeShort(U16.t(message.value));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnTlvUdfIdVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnTlvUdfIdVer13 other = (OFBsnTlvUdfIdVer13) obj;
+
+ if( value != other.value)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + value;
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvUdfLengthVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvUdfLengthVer13.java
new file mode 100644
index 0000000..8da277a
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvUdfLengthVer13.java
@@ -0,0 +1,260 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnTlvUdfLengthVer13 implements OFBsnTlvUdfLength {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnTlvUdfLengthVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 6;
+
+ private final static int DEFAULT_VALUE = 0x0;
+
+ // OF message fields
+ private final int value;
+//
+ // Immutable default instance
+ final static OFBsnTlvUdfLengthVer13 DEFAULT = new OFBsnTlvUdfLengthVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnTlvUdfLengthVer13(int value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public int getType() {
+ return 0x12;
+ }
+
+ @Override
+ public int getValue() {
+ return value;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFBsnTlvUdfLength.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnTlvUdfLength.Builder {
+ final OFBsnTlvUdfLengthVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private int value;
+
+ BuilderWithParent(OFBsnTlvUdfLengthVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public int getType() {
+ return 0x12;
+ }
+
+ @Override
+ public int getValue() {
+ return value;
+ }
+
+ @Override
+ public OFBsnTlvUdfLength.Builder setValue(int value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFBsnTlvUdfLength build() {
+ int value = this.valueSet ? this.value : parentMessage.value;
+
+ //
+ return new OFBsnTlvUdfLengthVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnTlvUdfLength.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private int value;
+
+ @Override
+ public int getType() {
+ return 0x12;
+ }
+
+ @Override
+ public int getValue() {
+ return value;
+ }
+
+ @Override
+ public OFBsnTlvUdfLength.Builder setValue(int value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFBsnTlvUdfLength build() {
+ int value = this.valueSet ? this.value : DEFAULT_VALUE;
+
+
+ return new OFBsnTlvUdfLengthVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnTlvUdfLength> {
+ @Override
+ public OFBsnTlvUdfLength readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 0x12
+ short type = bb.readShort();
+ if(type != (short) 0x12)
+ throw new OFParseError("Wrong type: Expected=0x12(0x12), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 6)
+ throw new OFParseError("Wrong length: Expected=6(6), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ int value = U16.f(bb.readShort());
+
+ OFBsnTlvUdfLengthVer13 bsnTlvUdfLengthVer13 = new OFBsnTlvUdfLengthVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnTlvUdfLengthVer13);
+ return bsnTlvUdfLengthVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnTlvUdfLengthVer13Funnel FUNNEL = new OFBsnTlvUdfLengthVer13Funnel();
+ static class OFBsnTlvUdfLengthVer13Funnel implements Funnel<OFBsnTlvUdfLengthVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnTlvUdfLengthVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 0x12
+ sink.putShort((short) 0x12);
+ // fixed value property length = 6
+ sink.putShort((short) 0x6);
+ sink.putInt(message.value);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnTlvUdfLengthVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnTlvUdfLengthVer13 message) {
+ // fixed value property type = 0x12
+ bb.writeShort((short) 0x12);
+ // fixed value property length = 6
+ bb.writeShort((short) 0x6);
+ bb.writeShort(U16.t(message.value));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnTlvUdfLengthVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnTlvUdfLengthVer13 other = (OFBsnTlvUdfLengthVer13) obj;
+
+ if( value != other.value)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + value;
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvUdfOffsetVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvUdfOffsetVer13.java
new file mode 100644
index 0000000..bc13ef9
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvUdfOffsetVer13.java
@@ -0,0 +1,260 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnTlvUdfOffsetVer13 implements OFBsnTlvUdfOffset {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnTlvUdfOffsetVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 6;
+
+ private final static int DEFAULT_VALUE = 0x0;
+
+ // OF message fields
+ private final int value;
+//
+ // Immutable default instance
+ final static OFBsnTlvUdfOffsetVer13 DEFAULT = new OFBsnTlvUdfOffsetVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnTlvUdfOffsetVer13(int value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public int getType() {
+ return 0x11;
+ }
+
+ @Override
+ public int getValue() {
+ return value;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFBsnTlvUdfOffset.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnTlvUdfOffset.Builder {
+ final OFBsnTlvUdfOffsetVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private int value;
+
+ BuilderWithParent(OFBsnTlvUdfOffsetVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public int getType() {
+ return 0x11;
+ }
+
+ @Override
+ public int getValue() {
+ return value;
+ }
+
+ @Override
+ public OFBsnTlvUdfOffset.Builder setValue(int value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFBsnTlvUdfOffset build() {
+ int value = this.valueSet ? this.value : parentMessage.value;
+
+ //
+ return new OFBsnTlvUdfOffsetVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnTlvUdfOffset.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private int value;
+
+ @Override
+ public int getType() {
+ return 0x11;
+ }
+
+ @Override
+ public int getValue() {
+ return value;
+ }
+
+ @Override
+ public OFBsnTlvUdfOffset.Builder setValue(int value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFBsnTlvUdfOffset build() {
+ int value = this.valueSet ? this.value : DEFAULT_VALUE;
+
+
+ return new OFBsnTlvUdfOffsetVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnTlvUdfOffset> {
+ @Override
+ public OFBsnTlvUdfOffset readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 0x11
+ short type = bb.readShort();
+ if(type != (short) 0x11)
+ throw new OFParseError("Wrong type: Expected=0x11(0x11), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 6)
+ throw new OFParseError("Wrong length: Expected=6(6), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ int value = U16.f(bb.readShort());
+
+ OFBsnTlvUdfOffsetVer13 bsnTlvUdfOffsetVer13 = new OFBsnTlvUdfOffsetVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnTlvUdfOffsetVer13);
+ return bsnTlvUdfOffsetVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnTlvUdfOffsetVer13Funnel FUNNEL = new OFBsnTlvUdfOffsetVer13Funnel();
+ static class OFBsnTlvUdfOffsetVer13Funnel implements Funnel<OFBsnTlvUdfOffsetVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnTlvUdfOffsetVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 0x11
+ sink.putShort((short) 0x11);
+ // fixed value property length = 6
+ sink.putShort((short) 0x6);
+ sink.putInt(message.value);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnTlvUdfOffsetVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnTlvUdfOffsetVer13 message) {
+ // fixed value property type = 0x11
+ bb.writeShort((short) 0x11);
+ // fixed value property length = 6
+ bb.writeShort((short) 0x6);
+ bb.writeShort(U16.t(message.value));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnTlvUdfOffsetVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnTlvUdfOffsetVer13 other = (OFBsnTlvUdfOffsetVer13) obj;
+
+ if( value != other.value)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + value;
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvUnicastQueryTimeoutVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvUnicastQueryTimeoutVer13.java
new file mode 100644
index 0000000..a769b25
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvUnicastQueryTimeoutVer13.java
@@ -0,0 +1,260 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnTlvUnicastQueryTimeoutVer13 implements OFBsnTlvUnicastQueryTimeout {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnTlvUnicastQueryTimeoutVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static long DEFAULT_VALUE = 0x0L;
+
+ // OF message fields
+ private final long value;
+//
+ // Immutable default instance
+ final static OFBsnTlvUnicastQueryTimeoutVer13 DEFAULT = new OFBsnTlvUnicastQueryTimeoutVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnTlvUnicastQueryTimeoutVer13(long value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public int getType() {
+ return 0x9;
+ }
+
+ @Override
+ public long getValue() {
+ return value;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFBsnTlvUnicastQueryTimeout.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnTlvUnicastQueryTimeout.Builder {
+ final OFBsnTlvUnicastQueryTimeoutVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private long value;
+
+ BuilderWithParent(OFBsnTlvUnicastQueryTimeoutVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public int getType() {
+ return 0x9;
+ }
+
+ @Override
+ public long getValue() {
+ return value;
+ }
+
+ @Override
+ public OFBsnTlvUnicastQueryTimeout.Builder setValue(long value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFBsnTlvUnicastQueryTimeout build() {
+ long value = this.valueSet ? this.value : parentMessage.value;
+
+ //
+ return new OFBsnTlvUnicastQueryTimeoutVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnTlvUnicastQueryTimeout.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private long value;
+
+ @Override
+ public int getType() {
+ return 0x9;
+ }
+
+ @Override
+ public long getValue() {
+ return value;
+ }
+
+ @Override
+ public OFBsnTlvUnicastQueryTimeout.Builder setValue(long value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFBsnTlvUnicastQueryTimeout build() {
+ long value = this.valueSet ? this.value : DEFAULT_VALUE;
+
+
+ return new OFBsnTlvUnicastQueryTimeoutVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnTlvUnicastQueryTimeout> {
+ @Override
+ public OFBsnTlvUnicastQueryTimeout readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 0x9
+ short type = bb.readShort();
+ if(type != (short) 0x9)
+ throw new OFParseError("Wrong type: Expected=0x9(0x9), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 8)
+ throw new OFParseError("Wrong length: Expected=8(8), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long value = U32.f(bb.readInt());
+
+ OFBsnTlvUnicastQueryTimeoutVer13 bsnTlvUnicastQueryTimeoutVer13 = new OFBsnTlvUnicastQueryTimeoutVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnTlvUnicastQueryTimeoutVer13);
+ return bsnTlvUnicastQueryTimeoutVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnTlvUnicastQueryTimeoutVer13Funnel FUNNEL = new OFBsnTlvUnicastQueryTimeoutVer13Funnel();
+ static class OFBsnTlvUnicastQueryTimeoutVer13Funnel implements Funnel<OFBsnTlvUnicastQueryTimeoutVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnTlvUnicastQueryTimeoutVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 0x9
+ sink.putShort((short) 0x9);
+ // fixed value property length = 8
+ sink.putShort((short) 0x8);
+ sink.putLong(message.value);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnTlvUnicastQueryTimeoutVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnTlvUnicastQueryTimeoutVer13 message) {
+ // fixed value property type = 0x9
+ bb.writeShort((short) 0x9);
+ // fixed value property length = 8
+ bb.writeShort((short) 0x8);
+ bb.writeInt(U32.t(message.value));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnTlvUnicastQueryTimeoutVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnTlvUnicastQueryTimeoutVer13 other = (OFBsnTlvUnicastQueryTimeoutVer13) obj;
+
+ if( value != other.value)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (value ^ (value >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvVer13.java
new file mode 100644
index 0000000..0601c93
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvVer13.java
@@ -0,0 +1,119 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_virtual_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.jboss.netty.buffer.ChannelBuffer;
+
+abstract class OFBsnTlvVer13 {
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 4;
+
+
+ public final static OFBsnTlvVer13.Reader READER = new Reader();
+
+ static class Reader implements OFMessageReader<OFBsnTlv> {
+ @Override
+ public OFBsnTlv readFrom(ChannelBuffer bb) throws OFParseError {
+ if(bb.readableBytes() < MINIMUM_LENGTH)
+ return null;
+ int start = bb.readerIndex();
+ short type = bb.readShort();
+ bb.readerIndex(start);
+ switch(type) {
+ case (short) 0xa:
+ // discriminator value 0xa=0xa for class OFBsnTlvBroadcastQueryTimeoutVer13
+ return OFBsnTlvBroadcastQueryTimeoutVer13.READER.readFrom(bb);
+ case (short) 0xe:
+ // discriminator value 0xe=0xe for class OFBsnTlvCircuitIdVer13
+ return OFBsnTlvCircuitIdVer13.READER.readFrom(bb);
+ case (short) 0x16:
+ // discriminator value 0x16=0x16 for class OFBsnTlvCrcEnabledVer13
+ return OFBsnTlvCrcEnabledVer13.READER.readFrom(bb);
+ case (short) 0x7:
+ // discriminator value 0x7=0x7 for class OFBsnTlvIdleNotificationVer13
+ return OFBsnTlvIdleNotificationVer13.READER.readFrom(bb);
+ case (short) 0x5:
+ // discriminator value 0x5=0x5 for class OFBsnTlvIdleTimeVer13
+ return OFBsnTlvIdleTimeVer13.READER.readFrom(bb);
+ case (short) 0x8:
+ // discriminator value 0x8=0x8 for class OFBsnTlvIdleTimeoutVer13
+ return OFBsnTlvIdleTimeoutVer13.READER.readFrom(bb);
+ case (short) 0x4:
+ // discriminator value 0x4=0x4 for class OFBsnTlvIpv4Ver13
+ return OFBsnTlvIpv4Ver13.READER.readFrom(bb);
+ case (short) 0x1:
+ // discriminator value 0x1=0x1 for class OFBsnTlvMacVer13
+ return OFBsnTlvMacVer13.READER.readFrom(bb);
+ case (short) 0xd:
+ // discriminator value 0xd=0xd for class OFBsnTlvMissPacketsVer13
+ return OFBsnTlvMissPacketsVer13.READER.readFrom(bb);
+ case (short) 0x0:
+ // discriminator value 0x0=0x0 for class OFBsnTlvPortVer13
+ return OFBsnTlvPortVer13.READER.readFrom(bb);
+ case (short) 0x14:
+ // discriminator value 0x14=0x14 for class OFBsnTlvQueueIdVer13
+ return OFBsnTlvQueueIdVer13.READER.readFrom(bb);
+ case (short) 0x15:
+ // discriminator value 0x15=0x15 for class OFBsnTlvQueueWeightVer13
+ return OFBsnTlvQueueWeightVer13.READER.readFrom(bb);
+ case (short) 0xc:
+ // discriminator value 0xc=0xc for class OFBsnTlvReplyPacketsVer13
+ return OFBsnTlvReplyPacketsVer13.READER.readFrom(bb);
+ case (short) 0xb:
+ // discriminator value 0xb=0xb for class OFBsnTlvRequestPacketsVer13
+ return OFBsnTlvRequestPacketsVer13.READER.readFrom(bb);
+ case (short) 0x2:
+ // discriminator value 0x2=0x2 for class OFBsnTlvRxPacketsVer13
+ return OFBsnTlvRxPacketsVer13.READER.readFrom(bb);
+ case (short) 0x3:
+ // discriminator value 0x3=0x3 for class OFBsnTlvTxPacketsVer13
+ return OFBsnTlvTxPacketsVer13.READER.readFrom(bb);
+ case (short) 0x10:
+ // discriminator value 0x10=0x10 for class OFBsnTlvUdfAnchorVer13
+ return OFBsnTlvUdfAnchorVer13.READER.readFrom(bb);
+ case (short) 0xf:
+ // discriminator value 0xf=0xf for class OFBsnTlvUdfIdVer13
+ return OFBsnTlvUdfIdVer13.READER.readFrom(bb);
+ case (short) 0x12:
+ // discriminator value 0x12=0x12 for class OFBsnTlvUdfLengthVer13
+ return OFBsnTlvUdfLengthVer13.READER.readFrom(bb);
+ case (short) 0x11:
+ // discriminator value 0x11=0x11 for class OFBsnTlvUdfOffsetVer13
+ return OFBsnTlvUdfOffsetVer13.READER.readFrom(bb);
+ case (short) 0x9:
+ // discriminator value 0x9=0x9 for class OFBsnTlvUnicastQueryTimeoutVer13
+ return OFBsnTlvUnicastQueryTimeoutVer13.READER.readFrom(bb);
+ case (short) 0x6:
+ // discriminator value 0x6=0x6 for class OFBsnTlvVlanVidVer13
+ return OFBsnTlvVlanVidVer13.READER.readFrom(bb);
+ case (short) 0x13:
+ // discriminator value 0x13=0x13 for class OFBsnTlvVrfVer13
+ return OFBsnTlvVrfVer13.READER.readFrom(bb);
+ default:
+ throw new OFParseError("Unknown value for discriminator type of class OFBsnTlvVer13: " + type);
+ }
+ }
+ }
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvVlanVidVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvVlanVidVer13.java
new file mode 100644
index 0000000..1c58c00
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvVlanVidVer13.java
@@ -0,0 +1,267 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnTlvVlanVidVer13 implements OFBsnTlvVlanVid {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnTlvVlanVidVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 6;
+
+ private final static VlanVid DEFAULT_VALUE = VlanVid.ZERO;
+
+ // OF message fields
+ private final VlanVid value;
+//
+ // Immutable default instance
+ final static OFBsnTlvVlanVidVer13 DEFAULT = new OFBsnTlvVlanVidVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnTlvVlanVidVer13(VlanVid value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public int getType() {
+ return 0x6;
+ }
+
+ @Override
+ public VlanVid getValue() {
+ return value;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFBsnTlvVlanVid.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnTlvVlanVid.Builder {
+ final OFBsnTlvVlanVidVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private VlanVid value;
+
+ BuilderWithParent(OFBsnTlvVlanVidVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public int getType() {
+ return 0x6;
+ }
+
+ @Override
+ public VlanVid getValue() {
+ return value;
+ }
+
+ @Override
+ public OFBsnTlvVlanVid.Builder setValue(VlanVid value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFBsnTlvVlanVid build() {
+ VlanVid value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFBsnTlvVlanVidVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnTlvVlanVid.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private VlanVid value;
+
+ @Override
+ public int getType() {
+ return 0x6;
+ }
+
+ @Override
+ public VlanVid getValue() {
+ return value;
+ }
+
+ @Override
+ public OFBsnTlvVlanVid.Builder setValue(VlanVid value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFBsnTlvVlanVid build() {
+ VlanVid value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFBsnTlvVlanVidVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnTlvVlanVid> {
+ @Override
+ public OFBsnTlvVlanVid readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 0x6
+ short type = bb.readShort();
+ if(type != (short) 0x6)
+ throw new OFParseError("Wrong type: Expected=0x6(0x6), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 6)
+ throw new OFParseError("Wrong length: Expected=6(6), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ VlanVid value = VlanVid.read2Bytes(bb);
+
+ OFBsnTlvVlanVidVer13 bsnTlvVlanVidVer13 = new OFBsnTlvVlanVidVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnTlvVlanVidVer13);
+ return bsnTlvVlanVidVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnTlvVlanVidVer13Funnel FUNNEL = new OFBsnTlvVlanVidVer13Funnel();
+ static class OFBsnTlvVlanVidVer13Funnel implements Funnel<OFBsnTlvVlanVidVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnTlvVlanVidVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 0x6
+ sink.putShort((short) 0x6);
+ // fixed value property length = 6
+ sink.putShort((short) 0x6);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnTlvVlanVidVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnTlvVlanVidVer13 message) {
+ // fixed value property type = 0x6
+ bb.writeShort((short) 0x6);
+ // fixed value property length = 6
+ bb.writeShort((short) 0x6);
+ message.value.write2Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnTlvVlanVidVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnTlvVlanVidVer13 other = (OFBsnTlvVlanVidVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvVrfVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvVrfVer13.java
new file mode 100644
index 0000000..a8b6988
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvVrfVer13.java
@@ -0,0 +1,260 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnTlvVrfVer13 implements OFBsnTlvVrf {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnTlvVrfVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static long DEFAULT_VALUE = 0x0L;
+
+ // OF message fields
+ private final long value;
+//
+ // Immutable default instance
+ final static OFBsnTlvVrfVer13 DEFAULT = new OFBsnTlvVrfVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnTlvVrfVer13(long value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public int getType() {
+ return 0x13;
+ }
+
+ @Override
+ public long getValue() {
+ return value;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFBsnTlvVrf.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnTlvVrf.Builder {
+ final OFBsnTlvVrfVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private long value;
+
+ BuilderWithParent(OFBsnTlvVrfVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public int getType() {
+ return 0x13;
+ }
+
+ @Override
+ public long getValue() {
+ return value;
+ }
+
+ @Override
+ public OFBsnTlvVrf.Builder setValue(long value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFBsnTlvVrf build() {
+ long value = this.valueSet ? this.value : parentMessage.value;
+
+ //
+ return new OFBsnTlvVrfVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnTlvVrf.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private long value;
+
+ @Override
+ public int getType() {
+ return 0x13;
+ }
+
+ @Override
+ public long getValue() {
+ return value;
+ }
+
+ @Override
+ public OFBsnTlvVrf.Builder setValue(long value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFBsnTlvVrf build() {
+ long value = this.valueSet ? this.value : DEFAULT_VALUE;
+
+
+ return new OFBsnTlvVrfVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnTlvVrf> {
+ @Override
+ public OFBsnTlvVrf readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 0x13
+ short type = bb.readShort();
+ if(type != (short) 0x13)
+ throw new OFParseError("Wrong type: Expected=0x13(0x13), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 8)
+ throw new OFParseError("Wrong length: Expected=8(8), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long value = U32.f(bb.readInt());
+
+ OFBsnTlvVrfVer13 bsnTlvVrfVer13 = new OFBsnTlvVrfVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnTlvVrfVer13);
+ return bsnTlvVrfVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnTlvVrfVer13Funnel FUNNEL = new OFBsnTlvVrfVer13Funnel();
+ static class OFBsnTlvVrfVer13Funnel implements Funnel<OFBsnTlvVrfVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnTlvVrfVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 0x13
+ sink.putShort((short) 0x13);
+ // fixed value property length = 8
+ sink.putShort((short) 0x8);
+ sink.putLong(message.value);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnTlvVrfVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnTlvVrfVer13 message) {
+ // fixed value property type = 0x13
+ bb.writeShort((short) 0x13);
+ // fixed value property length = 8
+ bb.writeShort((short) 0x8);
+ bb.writeInt(U32.t(message.value));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnTlvVrfVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnTlvVrfVer13 other = (OFBsnTlvVrfVer13) obj;
+
+ if( value != other.value)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (value ^ (value >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvsVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvsVer13.java
new file mode 100644
index 0000000..10b01bc
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvsVer13.java
@@ -0,0 +1,244 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_factory_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+
+
+public class OFBsnTlvsVer13 implements OFBsnTlvs {
+ public final static OFBsnTlvsVer13 INSTANCE = new OFBsnTlvsVer13();
+
+
+
+
+ public OFBsnTlvBroadcastQueryTimeout.Builder buildBroadcastQueryTimeout() {
+ return new OFBsnTlvBroadcastQueryTimeoutVer13.Builder();
+ }
+ public OFBsnTlvBroadcastQueryTimeout broadcastQueryTimeout(long value) {
+ return new OFBsnTlvBroadcastQueryTimeoutVer13(
+ value
+ );
+ }
+
+ public OFBsnTlvCircuitId.Builder buildCircuitId() {
+ return new OFBsnTlvCircuitIdVer13.Builder();
+ }
+ public OFBsnTlvCircuitId circuitId(byte[] value) {
+ return new OFBsnTlvCircuitIdVer13(
+ value
+ );
+ }
+
+ public OFBsnTlvCrcEnabled.Builder buildCrcEnabled() {
+ return new OFBsnTlvCrcEnabledVer13.Builder();
+ }
+ public OFBsnTlvCrcEnabled crcEnabled(short value) {
+ return new OFBsnTlvCrcEnabledVer13(
+ value
+ );
+ }
+
+ public OFBsnTlvIdleNotification idleNotification() {
+ return OFBsnTlvIdleNotificationVer13.INSTANCE;
+ }
+
+ public OFBsnTlvIdleTime.Builder buildIdleTime() {
+ return new OFBsnTlvIdleTimeVer13.Builder();
+ }
+ public OFBsnTlvIdleTime idleTime(U64 value) {
+ return new OFBsnTlvIdleTimeVer13(
+ value
+ );
+ }
+
+ public OFBsnTlvIdleTimeout.Builder buildIdleTimeout() {
+ return new OFBsnTlvIdleTimeoutVer13.Builder();
+ }
+ public OFBsnTlvIdleTimeout idleTimeout(long value) {
+ return new OFBsnTlvIdleTimeoutVer13(
+ value
+ );
+ }
+
+ public OFBsnTlvIpv4.Builder buildIpv4() {
+ return new OFBsnTlvIpv4Ver13.Builder();
+ }
+ public OFBsnTlvIpv4 ipv4(IPv4Address value) {
+ return new OFBsnTlvIpv4Ver13(
+ value
+ );
+ }
+
+ public OFBsnTlvMac.Builder buildMac() {
+ return new OFBsnTlvMacVer13.Builder();
+ }
+ public OFBsnTlvMac mac(MacAddress value) {
+ return new OFBsnTlvMacVer13(
+ value
+ );
+ }
+
+ public OFBsnTlvMissPackets.Builder buildMissPackets() {
+ return new OFBsnTlvMissPacketsVer13.Builder();
+ }
+ public OFBsnTlvMissPackets missPackets(U64 value) {
+ return new OFBsnTlvMissPacketsVer13(
+ value
+ );
+ }
+
+ public OFBsnTlvPort.Builder buildPort() {
+ return new OFBsnTlvPortVer13.Builder();
+ }
+ public OFBsnTlvPort port(OFPort value) {
+ return new OFBsnTlvPortVer13(
+ value
+ );
+ }
+
+ public OFBsnTlvQueueId.Builder buildQueueId() {
+ return new OFBsnTlvQueueIdVer13.Builder();
+ }
+ public OFBsnTlvQueueId queueId(long value) {
+ return new OFBsnTlvQueueIdVer13(
+ value
+ );
+ }
+
+ public OFBsnTlvQueueWeight.Builder buildQueueWeight() {
+ return new OFBsnTlvQueueWeightVer13.Builder();
+ }
+ public OFBsnTlvQueueWeight queueWeight(long value) {
+ return new OFBsnTlvQueueWeightVer13(
+ value
+ );
+ }
+
+ public OFBsnTlvReplyPackets.Builder buildReplyPackets() {
+ return new OFBsnTlvReplyPacketsVer13.Builder();
+ }
+ public OFBsnTlvReplyPackets replyPackets(U64 value) {
+ return new OFBsnTlvReplyPacketsVer13(
+ value
+ );
+ }
+
+ public OFBsnTlvRequestPackets.Builder buildRequestPackets() {
+ return new OFBsnTlvRequestPacketsVer13.Builder();
+ }
+ public OFBsnTlvRequestPackets requestPackets(U64 value) {
+ return new OFBsnTlvRequestPacketsVer13(
+ value
+ );
+ }
+
+ public OFBsnTlvRxPackets.Builder buildRxPackets() {
+ return new OFBsnTlvRxPacketsVer13.Builder();
+ }
+ public OFBsnTlvRxPackets rxPackets(U64 value) {
+ return new OFBsnTlvRxPacketsVer13(
+ value
+ );
+ }
+
+ public OFBsnTlvTxPackets.Builder buildTxPackets() {
+ return new OFBsnTlvTxPacketsVer13.Builder();
+ }
+ public OFBsnTlvTxPackets txPackets(U64 value) {
+ return new OFBsnTlvTxPacketsVer13(
+ value
+ );
+ }
+
+ public OFBsnTlvUdfAnchor.Builder buildUdfAnchor() {
+ return new OFBsnTlvUdfAnchorVer13.Builder();
+ }
+ public OFBsnTlvUdfAnchor udfAnchor(OFBsnUdfAnchor value) {
+ return new OFBsnTlvUdfAnchorVer13(
+ value
+ );
+ }
+
+ public OFBsnTlvUdfId.Builder buildUdfId() {
+ return new OFBsnTlvUdfIdVer13.Builder();
+ }
+ public OFBsnTlvUdfId udfId(int value) {
+ return new OFBsnTlvUdfIdVer13(
+ value
+ );
+ }
+
+ public OFBsnTlvUdfLength.Builder buildUdfLength() {
+ return new OFBsnTlvUdfLengthVer13.Builder();
+ }
+ public OFBsnTlvUdfLength udfLength(int value) {
+ return new OFBsnTlvUdfLengthVer13(
+ value
+ );
+ }
+
+ public OFBsnTlvUdfOffset.Builder buildUdfOffset() {
+ return new OFBsnTlvUdfOffsetVer13.Builder();
+ }
+ public OFBsnTlvUdfOffset udfOffset(int value) {
+ return new OFBsnTlvUdfOffsetVer13(
+ value
+ );
+ }
+
+ public OFBsnTlvUnicastQueryTimeout.Builder buildUnicastQueryTimeout() {
+ return new OFBsnTlvUnicastQueryTimeoutVer13.Builder();
+ }
+ public OFBsnTlvUnicastQueryTimeout unicastQueryTimeout(long value) {
+ return new OFBsnTlvUnicastQueryTimeoutVer13(
+ value
+ );
+ }
+
+ public OFBsnTlvVlanVid.Builder buildVlanVid() {
+ return new OFBsnTlvVlanVidVer13.Builder();
+ }
+ public OFBsnTlvVlanVid vlanVid(VlanVid value) {
+ return new OFBsnTlvVlanVidVer13(
+ value
+ );
+ }
+
+ public OFBsnTlvVrf.Builder buildVrf() {
+ return new OFBsnTlvVrfVer13.Builder();
+ }
+ public OFBsnTlvVrf vrf(long value) {
+ return new OFBsnTlvVrfVer13(
+ value
+ );
+ }
+
+ public OFMessageReader<OFBsnTlv> getReader() {
+ return OFBsnTlvVer13.READER;
+ }
+
+
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnUdfAnchorSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnUdfAnchorSerializerVer13.java
new file mode 100644
index 0000000..646a16c
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnUdfAnchorSerializerVer13.java
@@ -0,0 +1,79 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFBsnUdfAnchor;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+
+public class OFBsnUdfAnchorSerializerVer13 {
+
+ public final static short BSN_UDF_ANCHOR_PACKET_START_VAL = (short) 0x0;
+ public final static short BSN_UDF_ANCHOR_L3_HEADER_START_VAL = (short) 0x1;
+ public final static short BSN_UDF_ANCHOR_L4_HEADER_START_VAL = (short) 0x2;
+
+ public static OFBsnUdfAnchor readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readShort());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, OFBsnUdfAnchor e) {
+ bb.writeShort(toWireValue(e));
+ }
+
+ public static void putTo(OFBsnUdfAnchor e, PrimitiveSink sink) {
+ sink.putShort(toWireValue(e));
+ }
+
+ public static OFBsnUdfAnchor ofWireValue(short val) {
+ switch(val) {
+ case BSN_UDF_ANCHOR_PACKET_START_VAL:
+ return OFBsnUdfAnchor.BSN_UDF_ANCHOR_PACKET_START;
+ case BSN_UDF_ANCHOR_L3_HEADER_START_VAL:
+ return OFBsnUdfAnchor.BSN_UDF_ANCHOR_L3_HEADER_START;
+ case BSN_UDF_ANCHOR_L4_HEADER_START_VAL:
+ return OFBsnUdfAnchor.BSN_UDF_ANCHOR_L4_HEADER_START;
+ default:
+ throw new IllegalArgumentException("Illegal wire value for type OFBsnUdfAnchor in version 1.3: " + val);
+ }
+ }
+
+
+ public static short toWireValue(OFBsnUdfAnchor e) {
+ switch(e) {
+ case BSN_UDF_ANCHOR_PACKET_START:
+ return BSN_UDF_ANCHOR_PACKET_START_VAL;
+ case BSN_UDF_ANCHOR_L3_HEADER_START:
+ return BSN_UDF_ANCHOR_L3_HEADER_START_VAL;
+ case BSN_UDF_ANCHOR_L4_HEADER_START:
+ return BSN_UDF_ANCHOR_L4_HEADER_START_VAL;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFBsnUdfAnchor in version 1.3: " + e);
+ }
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVirtualPortCreateReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVirtualPortCreateReplyVer13.java
new file mode 100644
index 0000000..63cb3fe
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVirtualPortCreateReplyVer13.java
@@ -0,0 +1,408 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnVirtualPortCreateReplyVer13 implements OFBsnVirtualPortCreateReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnVirtualPortCreateReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 24;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static long DEFAULT_STATUS = 0x0L;
+ private final static long DEFAULT_VPORT_NO = 0x0L;
+
+ // OF message fields
+ private final long xid;
+ private final long status;
+ private final long vportNo;
+//
+ // Immutable default instance
+ final static OFBsnVirtualPortCreateReplyVer13 DEFAULT = new OFBsnVirtualPortCreateReplyVer13(
+ DEFAULT_XID, DEFAULT_STATUS, DEFAULT_VPORT_NO
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnVirtualPortCreateReplyVer13(long xid, long status, long vportNo) {
+ this.xid = xid;
+ this.status = status;
+ this.vportNo = vportNo;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x10L;
+ }
+
+ @Override
+ public long getStatus() {
+ return status;
+ }
+
+ @Override
+ public long getVportNo() {
+ return vportNo;
+ }
+
+
+
+ public OFBsnVirtualPortCreateReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnVirtualPortCreateReply.Builder {
+ final OFBsnVirtualPortCreateReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean statusSet;
+ private long status;
+ private boolean vportNoSet;
+ private long vportNo;
+
+ BuilderWithParent(OFBsnVirtualPortCreateReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnVirtualPortCreateReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x10L;
+ }
+
+ @Override
+ public long getStatus() {
+ return status;
+ }
+
+ @Override
+ public OFBsnVirtualPortCreateReply.Builder setStatus(long status) {
+ this.status = status;
+ this.statusSet = true;
+ return this;
+ }
+ @Override
+ public long getVportNo() {
+ return vportNo;
+ }
+
+ @Override
+ public OFBsnVirtualPortCreateReply.Builder setVportNo(long vportNo) {
+ this.vportNo = vportNo;
+ this.vportNoSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnVirtualPortCreateReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ long status = this.statusSet ? this.status : parentMessage.status;
+ long vportNo = this.vportNoSet ? this.vportNo : parentMessage.vportNo;
+
+ //
+ return new OFBsnVirtualPortCreateReplyVer13(
+ xid,
+ status,
+ vportNo
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnVirtualPortCreateReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean statusSet;
+ private long status;
+ private boolean vportNoSet;
+ private long vportNo;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnVirtualPortCreateReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x10L;
+ }
+
+ @Override
+ public long getStatus() {
+ return status;
+ }
+
+ @Override
+ public OFBsnVirtualPortCreateReply.Builder setStatus(long status) {
+ this.status = status;
+ this.statusSet = true;
+ return this;
+ }
+ @Override
+ public long getVportNo() {
+ return vportNo;
+ }
+
+ @Override
+ public OFBsnVirtualPortCreateReply.Builder setVportNo(long vportNo) {
+ this.vportNo = vportNo;
+ this.vportNoSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnVirtualPortCreateReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ long status = this.statusSet ? this.status : DEFAULT_STATUS;
+ long vportNo = this.vportNoSet ? this.vportNo : DEFAULT_VPORT_NO;
+
+
+ return new OFBsnVirtualPortCreateReplyVer13(
+ xid,
+ status,
+ vportNo
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnVirtualPortCreateReply> {
+ @Override
+ public OFBsnVirtualPortCreateReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 4
+ byte type = bb.readByte();
+ if(type != (byte) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 24)
+ throw new OFParseError("Wrong length: Expected=24(24), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x10L
+ int subtype = bb.readInt();
+ if(subtype != 0x10)
+ throw new OFParseError("Wrong subtype: Expected=0x10L(0x10L), got="+subtype);
+ long status = U32.f(bb.readInt());
+ long vportNo = U32.f(bb.readInt());
+
+ OFBsnVirtualPortCreateReplyVer13 bsnVirtualPortCreateReplyVer13 = new OFBsnVirtualPortCreateReplyVer13(
+ xid,
+ status,
+ vportNo
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnVirtualPortCreateReplyVer13);
+ return bsnVirtualPortCreateReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnVirtualPortCreateReplyVer13Funnel FUNNEL = new OFBsnVirtualPortCreateReplyVer13Funnel();
+ static class OFBsnVirtualPortCreateReplyVer13Funnel implements Funnel<OFBsnVirtualPortCreateReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnVirtualPortCreateReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property length = 24
+ sink.putShort((short) 0x18);
+ sink.putLong(message.xid);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x10L
+ sink.putInt(0x10);
+ sink.putLong(message.status);
+ sink.putLong(message.vportNo);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnVirtualPortCreateReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnVirtualPortCreateReplyVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property length = 24
+ bb.writeShort((short) 0x18);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x10L
+ bb.writeInt(0x10);
+ bb.writeInt(U32.t(message.status));
+ bb.writeInt(U32.t(message.vportNo));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnVirtualPortCreateReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("status=").append(status);
+ b.append(", ");
+ b.append("vportNo=").append(vportNo);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnVirtualPortCreateReplyVer13 other = (OFBsnVirtualPortCreateReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if( status != other.status)
+ return false;
+ if( vportNo != other.vportNo)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * (int) (status ^ (status >>> 32));
+ result = prime * (int) (vportNo ^ (vportNo >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVirtualPortCreateRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVirtualPortCreateRequestVer13.java
new file mode 100644
index 0000000..6700e71
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVirtualPortCreateRequestVer13.java
@@ -0,0 +1,369 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnVirtualPortCreateRequestVer13 implements OFBsnVirtualPortCreateRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnVirtualPortCreateRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 20;
+
+ private final static long DEFAULT_XID = 0x0L;
+
+ // OF message fields
+ private final long xid;
+ private final OFBsnVport vport;
+//
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnVirtualPortCreateRequestVer13(long xid, OFBsnVport vport) {
+ this.xid = xid;
+ this.vport = vport;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0xfL;
+ }
+
+ @Override
+ public OFBsnVport getVport() {
+ return vport;
+ }
+
+
+
+ public OFBsnVirtualPortCreateRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnVirtualPortCreateRequest.Builder {
+ final OFBsnVirtualPortCreateRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean vportSet;
+ private OFBsnVport vport;
+
+ BuilderWithParent(OFBsnVirtualPortCreateRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnVirtualPortCreateRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0xfL;
+ }
+
+ @Override
+ public OFBsnVport getVport() {
+ return vport;
+ }
+
+ @Override
+ public OFBsnVirtualPortCreateRequest.Builder setVport(OFBsnVport vport) {
+ this.vport = vport;
+ this.vportSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnVirtualPortCreateRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ OFBsnVport vport = this.vportSet ? this.vport : parentMessage.vport;
+ if(vport == null)
+ throw new NullPointerException("Property vport must not be null");
+
+ //
+ return new OFBsnVirtualPortCreateRequestVer13(
+ xid,
+ vport
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnVirtualPortCreateRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean vportSet;
+ private OFBsnVport vport;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnVirtualPortCreateRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0xfL;
+ }
+
+ @Override
+ public OFBsnVport getVport() {
+ return vport;
+ }
+
+ @Override
+ public OFBsnVirtualPortCreateRequest.Builder setVport(OFBsnVport vport) {
+ this.vport = vport;
+ this.vportSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnVirtualPortCreateRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ if(!this.vportSet)
+ throw new IllegalStateException("Property vport doesn't have default value -- must be set");
+ if(vport == null)
+ throw new NullPointerException("Property vport must not be null");
+
+
+ return new OFBsnVirtualPortCreateRequestVer13(
+ xid,
+ vport
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnVirtualPortCreateRequest> {
+ @Override
+ public OFBsnVirtualPortCreateRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 4
+ byte type = bb.readByte();
+ if(type != (byte) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0xfL
+ int subtype = bb.readInt();
+ if(subtype != 0xf)
+ throw new OFParseError("Wrong subtype: Expected=0xfL(0xfL), got="+subtype);
+ OFBsnVport vport = OFBsnVportVer13.READER.readFrom(bb);
+
+ OFBsnVirtualPortCreateRequestVer13 bsnVirtualPortCreateRequestVer13 = new OFBsnVirtualPortCreateRequestVer13(
+ xid,
+ vport
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnVirtualPortCreateRequestVer13);
+ return bsnVirtualPortCreateRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnVirtualPortCreateRequestVer13Funnel FUNNEL = new OFBsnVirtualPortCreateRequestVer13Funnel();
+ static class OFBsnVirtualPortCreateRequestVer13Funnel implements Funnel<OFBsnVirtualPortCreateRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnVirtualPortCreateRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 4
+ sink.putByte((byte) 0x4);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0xfL
+ sink.putInt(0xf);
+ message.vport.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnVirtualPortCreateRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnVirtualPortCreateRequestVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 4
+ bb.writeByte((byte) 0x4);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0xfL
+ bb.writeInt(0xf);
+ message.vport.writeTo(bb);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnVirtualPortCreateRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("vport=").append(vport);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnVirtualPortCreateRequestVer13 other = (OFBsnVirtualPortCreateRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (vport == null) {
+ if (other.vport != null)
+ return false;
+ } else if (!vport.equals(other.vport))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((vport == null) ? 0 : vport.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVirtualPortRemoveReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVirtualPortRemoveReplyVer13.java
new file mode 100644
index 0000000..4cf13ca
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVirtualPortRemoveReplyVer13.java
@@ -0,0 +1,361 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnVirtualPortRemoveReplyVer13 implements OFBsnVirtualPortRemoveReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnVirtualPortRemoveReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 20;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static long DEFAULT_STATUS = 0x0L;
+
+ // OF message fields
+ private final long xid;
+ private final long status;
+//
+ // Immutable default instance
+ final static OFBsnVirtualPortRemoveReplyVer13 DEFAULT = new OFBsnVirtualPortRemoveReplyVer13(
+ DEFAULT_XID, DEFAULT_STATUS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnVirtualPortRemoveReplyVer13(long xid, long status) {
+ this.xid = xid;
+ this.status = status;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x1aL;
+ }
+
+ @Override
+ public long getStatus() {
+ return status;
+ }
+
+
+
+ public OFBsnVirtualPortRemoveReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnVirtualPortRemoveReply.Builder {
+ final OFBsnVirtualPortRemoveReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean statusSet;
+ private long status;
+
+ BuilderWithParent(OFBsnVirtualPortRemoveReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnVirtualPortRemoveReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x1aL;
+ }
+
+ @Override
+ public long getStatus() {
+ return status;
+ }
+
+ @Override
+ public OFBsnVirtualPortRemoveReply.Builder setStatus(long status) {
+ this.status = status;
+ this.statusSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnVirtualPortRemoveReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ long status = this.statusSet ? this.status : parentMessage.status;
+
+ //
+ return new OFBsnVirtualPortRemoveReplyVer13(
+ xid,
+ status
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnVirtualPortRemoveReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean statusSet;
+ private long status;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnVirtualPortRemoveReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x1aL;
+ }
+
+ @Override
+ public long getStatus() {
+ return status;
+ }
+
+ @Override
+ public OFBsnVirtualPortRemoveReply.Builder setStatus(long status) {
+ this.status = status;
+ this.statusSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnVirtualPortRemoveReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ long status = this.statusSet ? this.status : DEFAULT_STATUS;
+
+
+ return new OFBsnVirtualPortRemoveReplyVer13(
+ xid,
+ status
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnVirtualPortRemoveReply> {
+ @Override
+ public OFBsnVirtualPortRemoveReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 4
+ byte type = bb.readByte();
+ if(type != (byte) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 20)
+ throw new OFParseError("Wrong length: Expected=20(20), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x1aL
+ int subtype = bb.readInt();
+ if(subtype != 0x1a)
+ throw new OFParseError("Wrong subtype: Expected=0x1aL(0x1aL), got="+subtype);
+ long status = U32.f(bb.readInt());
+
+ OFBsnVirtualPortRemoveReplyVer13 bsnVirtualPortRemoveReplyVer13 = new OFBsnVirtualPortRemoveReplyVer13(
+ xid,
+ status
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnVirtualPortRemoveReplyVer13);
+ return bsnVirtualPortRemoveReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnVirtualPortRemoveReplyVer13Funnel FUNNEL = new OFBsnVirtualPortRemoveReplyVer13Funnel();
+ static class OFBsnVirtualPortRemoveReplyVer13Funnel implements Funnel<OFBsnVirtualPortRemoveReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnVirtualPortRemoveReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property length = 20
+ sink.putShort((short) 0x14);
+ sink.putLong(message.xid);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x1aL
+ sink.putInt(0x1a);
+ sink.putLong(message.status);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnVirtualPortRemoveReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnVirtualPortRemoveReplyVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property length = 20
+ bb.writeShort((short) 0x14);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x1aL
+ bb.writeInt(0x1a);
+ bb.writeInt(U32.t(message.status));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnVirtualPortRemoveReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("status=").append(status);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnVirtualPortRemoveReplyVer13 other = (OFBsnVirtualPortRemoveReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if( status != other.status)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * (int) (status ^ (status >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVirtualPortRemoveRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVirtualPortRemoveRequestVer13.java
new file mode 100644
index 0000000..503d758
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVirtualPortRemoveRequestVer13.java
@@ -0,0 +1,361 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnVirtualPortRemoveRequestVer13 implements OFBsnVirtualPortRemoveRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnVirtualPortRemoveRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 20;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static long DEFAULT_VPORT_NO = 0x0L;
+
+ // OF message fields
+ private final long xid;
+ private final long vportNo;
+//
+ // Immutable default instance
+ final static OFBsnVirtualPortRemoveRequestVer13 DEFAULT = new OFBsnVirtualPortRemoveRequestVer13(
+ DEFAULT_XID, DEFAULT_VPORT_NO
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnVirtualPortRemoveRequestVer13(long xid, long vportNo) {
+ this.xid = xid;
+ this.vportNo = vportNo;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x11L;
+ }
+
+ @Override
+ public long getVportNo() {
+ return vportNo;
+ }
+
+
+
+ public OFBsnVirtualPortRemoveRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnVirtualPortRemoveRequest.Builder {
+ final OFBsnVirtualPortRemoveRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean vportNoSet;
+ private long vportNo;
+
+ BuilderWithParent(OFBsnVirtualPortRemoveRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnVirtualPortRemoveRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x11L;
+ }
+
+ @Override
+ public long getVportNo() {
+ return vportNo;
+ }
+
+ @Override
+ public OFBsnVirtualPortRemoveRequest.Builder setVportNo(long vportNo) {
+ this.vportNo = vportNo;
+ this.vportNoSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnVirtualPortRemoveRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ long vportNo = this.vportNoSet ? this.vportNo : parentMessage.vportNo;
+
+ //
+ return new OFBsnVirtualPortRemoveRequestVer13(
+ xid,
+ vportNo
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnVirtualPortRemoveRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean vportNoSet;
+ private long vportNo;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnVirtualPortRemoveRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x11L;
+ }
+
+ @Override
+ public long getVportNo() {
+ return vportNo;
+ }
+
+ @Override
+ public OFBsnVirtualPortRemoveRequest.Builder setVportNo(long vportNo) {
+ this.vportNo = vportNo;
+ this.vportNoSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnVirtualPortRemoveRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ long vportNo = this.vportNoSet ? this.vportNo : DEFAULT_VPORT_NO;
+
+
+ return new OFBsnVirtualPortRemoveRequestVer13(
+ xid,
+ vportNo
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnVirtualPortRemoveRequest> {
+ @Override
+ public OFBsnVirtualPortRemoveRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 4
+ byte type = bb.readByte();
+ if(type != (byte) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 20)
+ throw new OFParseError("Wrong length: Expected=20(20), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x11L
+ int subtype = bb.readInt();
+ if(subtype != 0x11)
+ throw new OFParseError("Wrong subtype: Expected=0x11L(0x11L), got="+subtype);
+ long vportNo = U32.f(bb.readInt());
+
+ OFBsnVirtualPortRemoveRequestVer13 bsnVirtualPortRemoveRequestVer13 = new OFBsnVirtualPortRemoveRequestVer13(
+ xid,
+ vportNo
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnVirtualPortRemoveRequestVer13);
+ return bsnVirtualPortRemoveRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnVirtualPortRemoveRequestVer13Funnel FUNNEL = new OFBsnVirtualPortRemoveRequestVer13Funnel();
+ static class OFBsnVirtualPortRemoveRequestVer13Funnel implements Funnel<OFBsnVirtualPortRemoveRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnVirtualPortRemoveRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property length = 20
+ sink.putShort((short) 0x14);
+ sink.putLong(message.xid);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x11L
+ sink.putInt(0x11);
+ sink.putLong(message.vportNo);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnVirtualPortRemoveRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnVirtualPortRemoveRequestVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property length = 20
+ bb.writeShort((short) 0x14);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x11L
+ bb.writeInt(0x11);
+ bb.writeInt(U32.t(message.vportNo));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnVirtualPortRemoveRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("vportNo=").append(vportNo);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnVirtualPortRemoveRequestVer13 other = (OFBsnVirtualPortRemoveRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if( vportNo != other.vportNo)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * (int) (vportNo ^ (vportNo >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVlanCounterConstantsSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVlanCounterConstantsSerializerVer13.java
new file mode 100644
index 0000000..d793b0f
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVlanCounterConstantsSerializerVer13.java
@@ -0,0 +1,69 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFBsnVlanCounterConstants;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+
+public class OFBsnVlanCounterConstantsSerializerVer13 {
+
+ public final static short BSN_VLAN_ALL_VAL = (short) 0xffff;
+
+ public static OFBsnVlanCounterConstants readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(U8.f(bb.readByte()));
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, OFBsnVlanCounterConstants e) {
+ bb.writeByte(U8.t(toWireValue(e)));
+ }
+
+ public static void putTo(OFBsnVlanCounterConstants e, PrimitiveSink sink) {
+ sink.putShort(toWireValue(e));
+ }
+
+ public static OFBsnVlanCounterConstants ofWireValue(short val) {
+ switch(val) {
+ case BSN_VLAN_ALL_VAL:
+ return OFBsnVlanCounterConstants.BSN_VLAN_ALL;
+ default:
+ throw new IllegalArgumentException("Illegal wire value for type OFBsnVlanCounterConstants in version 1.3: " + val);
+ }
+ }
+
+
+ public static short toWireValue(OFBsnVlanCounterConstants e) {
+ switch(e) {
+ case BSN_VLAN_ALL:
+ return BSN_VLAN_ALL_VAL;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFBsnVlanCounterConstants in version 1.3: " + e);
+ }
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVlanCounterStatsEntryVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVlanCounterStatsEntryVer13.java
new file mode 100644
index 0000000..1adf599
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVlanCounterStatsEntryVer13.java
@@ -0,0 +1,303 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnVlanCounterStatsEntryVer13 implements OFBsnVlanCounterStatsEntry {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnVlanCounterStatsEntryVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 8;
+
+ private final static int DEFAULT_VLAN_VID = 0x0;
+ private final static List<U64> DEFAULT_VALUES = ImmutableList.<U64>of();
+
+ // OF message fields
+ private final int vlanVid;
+ private final List<U64> values;
+//
+ // Immutable default instance
+ final static OFBsnVlanCounterStatsEntryVer13 DEFAULT = new OFBsnVlanCounterStatsEntryVer13(
+ DEFAULT_VLAN_VID, DEFAULT_VALUES
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnVlanCounterStatsEntryVer13(int vlanVid, List<U64> values) {
+ this.vlanVid = vlanVid;
+ this.values = values;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public int getVlanVid() {
+ return vlanVid;
+ }
+
+ @Override
+ public List<U64> getValues() {
+ return values;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFBsnVlanCounterStatsEntry.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnVlanCounterStatsEntry.Builder {
+ final OFBsnVlanCounterStatsEntryVer13 parentMessage;
+
+ // OF message fields
+ private boolean vlanVidSet;
+ private int vlanVid;
+ private boolean valuesSet;
+ private List<U64> values;
+
+ BuilderWithParent(OFBsnVlanCounterStatsEntryVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public int getVlanVid() {
+ return vlanVid;
+ }
+
+ @Override
+ public OFBsnVlanCounterStatsEntry.Builder setVlanVid(int vlanVid) {
+ this.vlanVid = vlanVid;
+ this.vlanVidSet = true;
+ return this;
+ }
+ @Override
+ public List<U64> getValues() {
+ return values;
+ }
+
+ @Override
+ public OFBsnVlanCounterStatsEntry.Builder setValues(List<U64> values) {
+ this.values = values;
+ this.valuesSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFBsnVlanCounterStatsEntry build() {
+ int vlanVid = this.vlanVidSet ? this.vlanVid : parentMessage.vlanVid;
+ List<U64> values = this.valuesSet ? this.values : parentMessage.values;
+ if(values == null)
+ throw new NullPointerException("Property values must not be null");
+
+ //
+ return new OFBsnVlanCounterStatsEntryVer13(
+ vlanVid,
+ values
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnVlanCounterStatsEntry.Builder {
+ // OF message fields
+ private boolean vlanVidSet;
+ private int vlanVid;
+ private boolean valuesSet;
+ private List<U64> values;
+
+ @Override
+ public int getVlanVid() {
+ return vlanVid;
+ }
+
+ @Override
+ public OFBsnVlanCounterStatsEntry.Builder setVlanVid(int vlanVid) {
+ this.vlanVid = vlanVid;
+ this.vlanVidSet = true;
+ return this;
+ }
+ @Override
+ public List<U64> getValues() {
+ return values;
+ }
+
+ @Override
+ public OFBsnVlanCounterStatsEntry.Builder setValues(List<U64> values) {
+ this.values = values;
+ this.valuesSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFBsnVlanCounterStatsEntry build() {
+ int vlanVid = this.vlanVidSet ? this.vlanVid : DEFAULT_VLAN_VID;
+ List<U64> values = this.valuesSet ? this.values : DEFAULT_VALUES;
+ if(values == null)
+ throw new NullPointerException("Property values must not be null");
+
+
+ return new OFBsnVlanCounterStatsEntryVer13(
+ vlanVid,
+ values
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnVlanCounterStatsEntry> {
+ @Override
+ public OFBsnVlanCounterStatsEntry readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ int vlanVid = U16.f(bb.readShort());
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ List<U64> values = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), U64.READER);
+
+ OFBsnVlanCounterStatsEntryVer13 bsnVlanCounterStatsEntryVer13 = new OFBsnVlanCounterStatsEntryVer13(
+ vlanVid,
+ values
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnVlanCounterStatsEntryVer13);
+ return bsnVlanCounterStatsEntryVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnVlanCounterStatsEntryVer13Funnel FUNNEL = new OFBsnVlanCounterStatsEntryVer13Funnel();
+ static class OFBsnVlanCounterStatsEntryVer13Funnel implements Funnel<OFBsnVlanCounterStatsEntryVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnVlanCounterStatsEntryVer13 message, PrimitiveSink sink) {
+ // FIXME: skip funnel of length
+ sink.putInt(message.vlanVid);
+ // skip pad (4 bytes)
+ FunnelUtils.putList(message.values, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnVlanCounterStatsEntryVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnVlanCounterStatsEntryVer13 message) {
+ int startIndex = bb.writerIndex();
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeShort(U16.t(message.vlanVid));
+ // pad: 4 bytes
+ bb.writeZero(4);
+ ChannelUtils.writeList(bb, message.values);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnVlanCounterStatsEntryVer13(");
+ b.append("vlanVid=").append(vlanVid);
+ b.append(", ");
+ b.append("values=").append(values);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnVlanCounterStatsEntryVer13 other = (OFBsnVlanCounterStatsEntryVer13) obj;
+
+ if( vlanVid != other.vlanVid)
+ return false;
+ if (values == null) {
+ if (other.values != null)
+ return false;
+ } else if (!values.equals(other.values))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + vlanVid;
+ result = prime * result + ((values == null) ? 0 : values.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVlanCounterStatsReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVlanCounterStatsReplyVer13.java
new file mode 100644
index 0000000..e09f083
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVlanCounterStatsReplyVer13.java
@@ -0,0 +1,458 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnVlanCounterStatsReplyVer13 implements OFBsnVlanCounterStatsReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnVlanCounterStatsReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 24;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsReplyFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsReplyFlags>of();
+ private final static List<OFBsnVlanCounterStatsEntry> DEFAULT_ENTRIES = ImmutableList.<OFBsnVlanCounterStatsEntry>of();
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsReplyFlags> flags;
+ private final List<OFBsnVlanCounterStatsEntry> entries;
+//
+ // Immutable default instance
+ final static OFBsnVlanCounterStatsReplyVer13 DEFAULT = new OFBsnVlanCounterStatsReplyVer13(
+ DEFAULT_XID, DEFAULT_FLAGS, DEFAULT_ENTRIES
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnVlanCounterStatsReplyVer13(long xid, Set<OFStatsReplyFlags> flags, List<OFBsnVlanCounterStatsEntry> entries) {
+ this.xid = xid;
+ this.flags = flags;
+ this.entries = entries;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x9L;
+ }
+
+ @Override
+ public List<OFBsnVlanCounterStatsEntry> getEntries() {
+ return entries;
+ }
+
+
+
+ public OFBsnVlanCounterStatsReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnVlanCounterStatsReply.Builder {
+ final OFBsnVlanCounterStatsReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean entriesSet;
+ private List<OFBsnVlanCounterStatsEntry> entries;
+
+ BuilderWithParent(OFBsnVlanCounterStatsReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnVlanCounterStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnVlanCounterStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x9L;
+ }
+
+ @Override
+ public List<OFBsnVlanCounterStatsEntry> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFBsnVlanCounterStatsReply.Builder setEntries(List<OFBsnVlanCounterStatsEntry> entries) {
+ this.entries = entries;
+ this.entriesSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnVlanCounterStatsReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ List<OFBsnVlanCounterStatsEntry> entries = this.entriesSet ? this.entries : parentMessage.entries;
+ if(entries == null)
+ throw new NullPointerException("Property entries must not be null");
+
+ //
+ return new OFBsnVlanCounterStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnVlanCounterStatsReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean entriesSet;
+ private List<OFBsnVlanCounterStatsEntry> entries;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnVlanCounterStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnVlanCounterStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x9L;
+ }
+
+ @Override
+ public List<OFBsnVlanCounterStatsEntry> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFBsnVlanCounterStatsReply.Builder setEntries(List<OFBsnVlanCounterStatsEntry> entries) {
+ this.entries = entries;
+ this.entriesSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnVlanCounterStatsReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ List<OFBsnVlanCounterStatsEntry> entries = this.entriesSet ? this.entries : DEFAULT_ENTRIES;
+ if(entries == null)
+ throw new NullPointerException("Property entries must not be null");
+
+
+ return new OFBsnVlanCounterStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnVlanCounterStatsReply> {
+ @Override
+ public OFBsnVlanCounterStatsReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 19
+ byte type = bb.readByte();
+ if(type != (byte) 0x13)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REPLY(19), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 65535
+ short statsType = bb.readShort();
+ if(statsType != (short) 0xffff)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.EXPERIMENTER(65535), got="+statsType);
+ Set<OFStatsReplyFlags> flags = OFStatsReplyFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x9L
+ int subtype = bb.readInt();
+ if(subtype != 0x9)
+ throw new OFParseError("Wrong subtype: Expected=0x9L(0x9L), got="+subtype);
+ List<OFBsnVlanCounterStatsEntry> entries = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFBsnVlanCounterStatsEntryVer13.READER);
+
+ OFBsnVlanCounterStatsReplyVer13 bsnVlanCounterStatsReplyVer13 = new OFBsnVlanCounterStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnVlanCounterStatsReplyVer13);
+ return bsnVlanCounterStatsReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnVlanCounterStatsReplyVer13Funnel FUNNEL = new OFBsnVlanCounterStatsReplyVer13Funnel();
+ static class OFBsnVlanCounterStatsReplyVer13Funnel implements Funnel<OFBsnVlanCounterStatsReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnVlanCounterStatsReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 19
+ sink.putByte((byte) 0x13);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property statsType = 65535
+ sink.putShort((short) 0xffff);
+ OFStatsReplyFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x9L
+ sink.putInt(0x9);
+ FunnelUtils.putList(message.entries, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnVlanCounterStatsReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnVlanCounterStatsReplyVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 19
+ bb.writeByte((byte) 0x13);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 65535
+ bb.writeShort((short) 0xffff);
+ OFStatsReplyFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x9L
+ bb.writeInt(0x9);
+ ChannelUtils.writeList(bb, message.entries);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnVlanCounterStatsReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("entries=").append(entries);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnVlanCounterStatsReplyVer13 other = (OFBsnVlanCounterStatsReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if (entries == null) {
+ if (other.entries != null)
+ return false;
+ } else if (!entries.equals(other.entries))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * result + ((entries == null) ? 0 : entries.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVlanCounterStatsRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVlanCounterStatsRequestVer13.java
new file mode 100644
index 0000000..228e70b
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVlanCounterStatsRequestVer13.java
@@ -0,0 +1,444 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnVlanCounterStatsRequestVer13 implements OFBsnVlanCounterStatsRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnVlanCounterStatsRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 26;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsRequestFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsRequestFlags>of();
+ private final static int DEFAULT_VLAN_VID = 0x0;
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsRequestFlags> flags;
+ private final int vlanVid;
+//
+ // Immutable default instance
+ final static OFBsnVlanCounterStatsRequestVer13 DEFAULT = new OFBsnVlanCounterStatsRequestVer13(
+ DEFAULT_XID, DEFAULT_FLAGS, DEFAULT_VLAN_VID
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnVlanCounterStatsRequestVer13(long xid, Set<OFStatsRequestFlags> flags, int vlanVid) {
+ this.xid = xid;
+ this.flags = flags;
+ this.vlanVid = vlanVid;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x9L;
+ }
+
+ @Override
+ public int getVlanVid() {
+ return vlanVid;
+ }
+
+
+
+ public OFBsnVlanCounterStatsRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnVlanCounterStatsRequest.Builder {
+ final OFBsnVlanCounterStatsRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+ private boolean vlanVidSet;
+ private int vlanVid;
+
+ BuilderWithParent(OFBsnVlanCounterStatsRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnVlanCounterStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnVlanCounterStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x9L;
+ }
+
+ @Override
+ public int getVlanVid() {
+ return vlanVid;
+ }
+
+ @Override
+ public OFBsnVlanCounterStatsRequest.Builder setVlanVid(int vlanVid) {
+ this.vlanVid = vlanVid;
+ this.vlanVidSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnVlanCounterStatsRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ int vlanVid = this.vlanVidSet ? this.vlanVid : parentMessage.vlanVid;
+
+ //
+ return new OFBsnVlanCounterStatsRequestVer13(
+ xid,
+ flags,
+ vlanVid
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnVlanCounterStatsRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+ private boolean vlanVidSet;
+ private int vlanVid;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnVlanCounterStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnVlanCounterStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x9L;
+ }
+
+ @Override
+ public int getVlanVid() {
+ return vlanVid;
+ }
+
+ @Override
+ public OFBsnVlanCounterStatsRequest.Builder setVlanVid(int vlanVid) {
+ this.vlanVid = vlanVid;
+ this.vlanVidSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnVlanCounterStatsRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ int vlanVid = this.vlanVidSet ? this.vlanVid : DEFAULT_VLAN_VID;
+
+
+ return new OFBsnVlanCounterStatsRequestVer13(
+ xid,
+ flags,
+ vlanVid
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnVlanCounterStatsRequest> {
+ @Override
+ public OFBsnVlanCounterStatsRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 18
+ byte type = bb.readByte();
+ if(type != (byte) 0x12)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REQUEST(18), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 26)
+ throw new OFParseError("Wrong length: Expected=26(26), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 65535
+ short statsType = bb.readShort();
+ if(statsType != (short) 0xffff)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.EXPERIMENTER(65535), got="+statsType);
+ Set<OFStatsRequestFlags> flags = OFStatsRequestFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x9L
+ int subtype = bb.readInt();
+ if(subtype != 0x9)
+ throw new OFParseError("Wrong subtype: Expected=0x9L(0x9L), got="+subtype);
+ int vlanVid = U16.f(bb.readShort());
+
+ OFBsnVlanCounterStatsRequestVer13 bsnVlanCounterStatsRequestVer13 = new OFBsnVlanCounterStatsRequestVer13(
+ xid,
+ flags,
+ vlanVid
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnVlanCounterStatsRequestVer13);
+ return bsnVlanCounterStatsRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnVlanCounterStatsRequestVer13Funnel FUNNEL = new OFBsnVlanCounterStatsRequestVer13Funnel();
+ static class OFBsnVlanCounterStatsRequestVer13Funnel implements Funnel<OFBsnVlanCounterStatsRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnVlanCounterStatsRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 18
+ sink.putByte((byte) 0x12);
+ // fixed value property length = 26
+ sink.putShort((short) 0x1a);
+ sink.putLong(message.xid);
+ // fixed value property statsType = 65535
+ sink.putShort((short) 0xffff);
+ OFStatsRequestFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x9L
+ sink.putInt(0x9);
+ sink.putInt(message.vlanVid);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnVlanCounterStatsRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnVlanCounterStatsRequestVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 18
+ bb.writeByte((byte) 0x12);
+ // fixed value property length = 26
+ bb.writeShort((short) 0x1a);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 65535
+ bb.writeShort((short) 0xffff);
+ OFStatsRequestFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x9L
+ bb.writeInt(0x9);
+ bb.writeShort(U16.t(message.vlanVid));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnVlanCounterStatsRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("vlanVid=").append(vlanVid);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnVlanCounterStatsRequestVer13 other = (OFBsnVlanCounterStatsRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if( vlanVid != other.vlanVid)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * result + vlanVid;
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVlanCounterTSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVlanCounterTSerializerVer13.java
new file mode 100644
index 0000000..81063c7
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVlanCounterTSerializerVer13.java
@@ -0,0 +1,84 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFBsnVlanCounterT;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+
+public class OFBsnVlanCounterTSerializerVer13 {
+
+ public final static byte BSN_VLAN_COUNTER_RX_BYTES_VAL = (byte) 0x0;
+ public final static byte BSN_VLAN_COUNTER_RX_PACKETS_VAL = (byte) 0x1;
+ public final static byte BSN_VLAN_COUNTER_TX_BYTES_VAL = (byte) 0x2;
+ public final static byte BSN_VLAN_COUNTER_TX_PACKETS_VAL = (byte) 0x3;
+
+ public static OFBsnVlanCounterT readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readByte());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, OFBsnVlanCounterT e) {
+ bb.writeByte(toWireValue(e));
+ }
+
+ public static void putTo(OFBsnVlanCounterT e, PrimitiveSink sink) {
+ sink.putByte(toWireValue(e));
+ }
+
+ public static OFBsnVlanCounterT ofWireValue(byte val) {
+ switch(val) {
+ case BSN_VLAN_COUNTER_RX_BYTES_VAL:
+ return OFBsnVlanCounterT.BSN_VLAN_COUNTER_RX_BYTES;
+ case BSN_VLAN_COUNTER_RX_PACKETS_VAL:
+ return OFBsnVlanCounterT.BSN_VLAN_COUNTER_RX_PACKETS;
+ case BSN_VLAN_COUNTER_TX_BYTES_VAL:
+ return OFBsnVlanCounterT.BSN_VLAN_COUNTER_TX_BYTES;
+ case BSN_VLAN_COUNTER_TX_PACKETS_VAL:
+ return OFBsnVlanCounterT.BSN_VLAN_COUNTER_TX_PACKETS;
+ default:
+ throw new IllegalArgumentException("Illegal wire value for type OFBsnVlanCounterT in version 1.3: " + val);
+ }
+ }
+
+
+ public static byte toWireValue(OFBsnVlanCounterT e) {
+ switch(e) {
+ case BSN_VLAN_COUNTER_RX_BYTES:
+ return BSN_VLAN_COUNTER_RX_BYTES_VAL;
+ case BSN_VLAN_COUNTER_RX_PACKETS:
+ return BSN_VLAN_COUNTER_RX_PACKETS_VAL;
+ case BSN_VLAN_COUNTER_TX_BYTES:
+ return BSN_VLAN_COUNTER_TX_BYTES_VAL;
+ case BSN_VLAN_COUNTER_TX_PACKETS:
+ return BSN_VLAN_COUNTER_TX_PACKETS_VAL;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFBsnVlanCounterT in version 1.3: " + e);
+ }
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVportL2GreFlagsSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVportL2GreFlagsSerializerVer13.java
new file mode 100644
index 0000000..0e4330b
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVportL2GreFlagsSerializerVer13.java
@@ -0,0 +1,102 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_set_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFBsnVportL2GreFlags;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import java.util.EnumSet;
+import java.util.Collections;
+
+
+public class OFBsnVportL2GreFlagsSerializerVer13 {
+
+ public final static int BSN_VPORT_L2GRE_LOCAL_MAC_IS_VALID_VAL = 0x1;
+ public final static int BSN_VPORT_L2GRE_DSCP_ASSIGN_VAL = 0x2;
+ public final static int BSN_VPORT_L2GRE_DSCP_COPY_VAL = 0x4;
+ public final static int BSN_VPORT_L2GRE_LOOPBACK_IS_VALID_VAL = 0x8;
+ public final static int BSN_VPORT_L2GRE_RATE_LIMIT_IS_VALID_VAL = 0x10;
+
+ public static Set<OFBsnVportL2GreFlags> readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readInt());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, Set<OFBsnVportL2GreFlags> set) {
+ bb.writeInt(toWireValue(set));
+ }
+
+ public static void putTo(Set<OFBsnVportL2GreFlags> set, PrimitiveSink sink) {
+ sink.putInt(toWireValue(set));
+ }
+
+
+ public static Set<OFBsnVportL2GreFlags> ofWireValue(int val) {
+ EnumSet<OFBsnVportL2GreFlags> set = EnumSet.noneOf(OFBsnVportL2GreFlags.class);
+
+ if((val & BSN_VPORT_L2GRE_LOCAL_MAC_IS_VALID_VAL) != 0)
+ set.add(OFBsnVportL2GreFlags.BSN_VPORT_L2GRE_LOCAL_MAC_IS_VALID);
+ if((val & BSN_VPORT_L2GRE_DSCP_ASSIGN_VAL) != 0)
+ set.add(OFBsnVportL2GreFlags.BSN_VPORT_L2GRE_DSCP_ASSIGN);
+ if((val & BSN_VPORT_L2GRE_DSCP_COPY_VAL) != 0)
+ set.add(OFBsnVportL2GreFlags.BSN_VPORT_L2GRE_DSCP_COPY);
+ if((val & BSN_VPORT_L2GRE_LOOPBACK_IS_VALID_VAL) != 0)
+ set.add(OFBsnVportL2GreFlags.BSN_VPORT_L2GRE_LOOPBACK_IS_VALID);
+ if((val & BSN_VPORT_L2GRE_RATE_LIMIT_IS_VALID_VAL) != 0)
+ set.add(OFBsnVportL2GreFlags.BSN_VPORT_L2GRE_RATE_LIMIT_IS_VALID);
+ return Collections.unmodifiableSet(set);
+ }
+
+ public static int toWireValue(Set<OFBsnVportL2GreFlags> set) {
+ int wireValue = 0;
+
+ for(OFBsnVportL2GreFlags e: set) {
+ switch(e) {
+ case BSN_VPORT_L2GRE_LOCAL_MAC_IS_VALID:
+ wireValue |= BSN_VPORT_L2GRE_LOCAL_MAC_IS_VALID_VAL;
+ break;
+ case BSN_VPORT_L2GRE_DSCP_ASSIGN:
+ wireValue |= BSN_VPORT_L2GRE_DSCP_ASSIGN_VAL;
+ break;
+ case BSN_VPORT_L2GRE_DSCP_COPY:
+ wireValue |= BSN_VPORT_L2GRE_DSCP_COPY_VAL;
+ break;
+ case BSN_VPORT_L2GRE_LOOPBACK_IS_VALID:
+ wireValue |= BSN_VPORT_L2GRE_LOOPBACK_IS_VALID_VAL;
+ break;
+ case BSN_VPORT_L2GRE_RATE_LIMIT_IS_VALID:
+ wireValue |= BSN_VPORT_L2GRE_RATE_LIMIT_IS_VALID_VAL;
+ break;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFBsnVportL2GreFlags in version 1.3: " + e);
+ }
+ }
+ return wireValue;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVportL2GreVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVportL2GreVer13.java
new file mode 100644
index 0000000..f420bdc
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVportL2GreVer13.java
@@ -0,0 +1,839 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnVportL2GreVer13 implements OFBsnVportL2Gre {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnVportL2GreVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 64;
+
+ private final static Set<OFBsnVportL2GreFlags> DEFAULT_FLAGS = ImmutableSet.<OFBsnVportL2GreFlags>of();
+ private final static OFPort DEFAULT_PORT_NO = OFPort.ANY;
+ private final static OFPort DEFAULT_LOOPBACK_PORT_NO = OFPort.ANY;
+ private final static MacAddress DEFAULT_LOCAL_MAC = MacAddress.NONE;
+ private final static MacAddress DEFAULT_NH_MAC = MacAddress.NONE;
+ private final static IPv4Address DEFAULT_SRC_IP = IPv4Address.NONE;
+ private final static IPv4Address DEFAULT_DST_IP = IPv4Address.NONE;
+ private final static short DEFAULT_DSCP = (short) 0x0;
+ private final static short DEFAULT_TTL = (short) 0x0;
+ private final static long DEFAULT_VPN = 0x0L;
+ private final static long DEFAULT_RATE_LIMIT = 0x0L;
+ private final static String DEFAULT_IF_NAME = "";
+
+ // OF message fields
+ private final Set<OFBsnVportL2GreFlags> flags;
+ private final OFPort portNo;
+ private final OFPort loopbackPortNo;
+ private final MacAddress localMac;
+ private final MacAddress nhMac;
+ private final IPv4Address srcIp;
+ private final IPv4Address dstIp;
+ private final short dscp;
+ private final short ttl;
+ private final long vpn;
+ private final long rateLimit;
+ private final String ifName;
+//
+ // Immutable default instance
+ final static OFBsnVportL2GreVer13 DEFAULT = new OFBsnVportL2GreVer13(
+ DEFAULT_FLAGS, DEFAULT_PORT_NO, DEFAULT_LOOPBACK_PORT_NO, DEFAULT_LOCAL_MAC, DEFAULT_NH_MAC, DEFAULT_SRC_IP, DEFAULT_DST_IP, DEFAULT_DSCP, DEFAULT_TTL, DEFAULT_VPN, DEFAULT_RATE_LIMIT, DEFAULT_IF_NAME
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnVportL2GreVer13(Set<OFBsnVportL2GreFlags> flags, OFPort portNo, OFPort loopbackPortNo, MacAddress localMac, MacAddress nhMac, IPv4Address srcIp, IPv4Address dstIp, short dscp, short ttl, long vpn, long rateLimit, String ifName) {
+ this.flags = flags;
+ this.portNo = portNo;
+ this.loopbackPortNo = loopbackPortNo;
+ this.localMac = localMac;
+ this.nhMac = nhMac;
+ this.srcIp = srcIp;
+ this.dstIp = dstIp;
+ this.dscp = dscp;
+ this.ttl = ttl;
+ this.vpn = vpn;
+ this.rateLimit = rateLimit;
+ this.ifName = ifName;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public int getType() {
+ return 0x1;
+ }
+
+ @Override
+ public Set<OFBsnVportL2GreFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public OFPort getLoopbackPortNo() {
+ return loopbackPortNo;
+ }
+
+ @Override
+ public MacAddress getLocalMac() {
+ return localMac;
+ }
+
+ @Override
+ public MacAddress getNhMac() {
+ return nhMac;
+ }
+
+ @Override
+ public IPv4Address getSrcIp() {
+ return srcIp;
+ }
+
+ @Override
+ public IPv4Address getDstIp() {
+ return dstIp;
+ }
+
+ @Override
+ public short getDscp() {
+ return dscp;
+ }
+
+ @Override
+ public short getTtl() {
+ return ttl;
+ }
+
+ @Override
+ public long getVpn() {
+ return vpn;
+ }
+
+ @Override
+ public long getRateLimit() {
+ return rateLimit;
+ }
+
+ @Override
+ public String getIfName() {
+ return ifName;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFBsnVportL2Gre.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnVportL2Gre.Builder {
+ final OFBsnVportL2GreVer13 parentMessage;
+
+ // OF message fields
+ private boolean flagsSet;
+ private Set<OFBsnVportL2GreFlags> flags;
+ private boolean portNoSet;
+ private OFPort portNo;
+ private boolean loopbackPortNoSet;
+ private OFPort loopbackPortNo;
+ private boolean localMacSet;
+ private MacAddress localMac;
+ private boolean nhMacSet;
+ private MacAddress nhMac;
+ private boolean srcIpSet;
+ private IPv4Address srcIp;
+ private boolean dstIpSet;
+ private IPv4Address dstIp;
+ private boolean dscpSet;
+ private short dscp;
+ private boolean ttlSet;
+ private short ttl;
+ private boolean vpnSet;
+ private long vpn;
+ private boolean rateLimitSet;
+ private long rateLimit;
+ private boolean ifNameSet;
+ private String ifName;
+
+ BuilderWithParent(OFBsnVportL2GreVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public int getType() {
+ return 0x1;
+ }
+
+ @Override
+ public Set<OFBsnVportL2GreFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnVportL2Gre.Builder setFlags(Set<OFBsnVportL2GreFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public OFBsnVportL2Gre.Builder setPortNo(OFPort portNo) {
+ this.portNo = portNo;
+ this.portNoSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getLoopbackPortNo() {
+ return loopbackPortNo;
+ }
+
+ @Override
+ public OFBsnVportL2Gre.Builder setLoopbackPortNo(OFPort loopbackPortNo) {
+ this.loopbackPortNo = loopbackPortNo;
+ this.loopbackPortNoSet = true;
+ return this;
+ }
+ @Override
+ public MacAddress getLocalMac() {
+ return localMac;
+ }
+
+ @Override
+ public OFBsnVportL2Gre.Builder setLocalMac(MacAddress localMac) {
+ this.localMac = localMac;
+ this.localMacSet = true;
+ return this;
+ }
+ @Override
+ public MacAddress getNhMac() {
+ return nhMac;
+ }
+
+ @Override
+ public OFBsnVportL2Gre.Builder setNhMac(MacAddress nhMac) {
+ this.nhMac = nhMac;
+ this.nhMacSet = true;
+ return this;
+ }
+ @Override
+ public IPv4Address getSrcIp() {
+ return srcIp;
+ }
+
+ @Override
+ public OFBsnVportL2Gre.Builder setSrcIp(IPv4Address srcIp) {
+ this.srcIp = srcIp;
+ this.srcIpSet = true;
+ return this;
+ }
+ @Override
+ public IPv4Address getDstIp() {
+ return dstIp;
+ }
+
+ @Override
+ public OFBsnVportL2Gre.Builder setDstIp(IPv4Address dstIp) {
+ this.dstIp = dstIp;
+ this.dstIpSet = true;
+ return this;
+ }
+ @Override
+ public short getDscp() {
+ return dscp;
+ }
+
+ @Override
+ public OFBsnVportL2Gre.Builder setDscp(short dscp) {
+ this.dscp = dscp;
+ this.dscpSet = true;
+ return this;
+ }
+ @Override
+ public short getTtl() {
+ return ttl;
+ }
+
+ @Override
+ public OFBsnVportL2Gre.Builder setTtl(short ttl) {
+ this.ttl = ttl;
+ this.ttlSet = true;
+ return this;
+ }
+ @Override
+ public long getVpn() {
+ return vpn;
+ }
+
+ @Override
+ public OFBsnVportL2Gre.Builder setVpn(long vpn) {
+ this.vpn = vpn;
+ this.vpnSet = true;
+ return this;
+ }
+ @Override
+ public long getRateLimit() {
+ return rateLimit;
+ }
+
+ @Override
+ public OFBsnVportL2Gre.Builder setRateLimit(long rateLimit) {
+ this.rateLimit = rateLimit;
+ this.rateLimitSet = true;
+ return this;
+ }
+ @Override
+ public String getIfName() {
+ return ifName;
+ }
+
+ @Override
+ public OFBsnVportL2Gre.Builder setIfName(String ifName) {
+ this.ifName = ifName;
+ this.ifNameSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFBsnVportL2Gre build() {
+ Set<OFBsnVportL2GreFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ OFPort portNo = this.portNoSet ? this.portNo : parentMessage.portNo;
+ if(portNo == null)
+ throw new NullPointerException("Property portNo must not be null");
+ OFPort loopbackPortNo = this.loopbackPortNoSet ? this.loopbackPortNo : parentMessage.loopbackPortNo;
+ if(loopbackPortNo == null)
+ throw new NullPointerException("Property loopbackPortNo must not be null");
+ MacAddress localMac = this.localMacSet ? this.localMac : parentMessage.localMac;
+ if(localMac == null)
+ throw new NullPointerException("Property localMac must not be null");
+ MacAddress nhMac = this.nhMacSet ? this.nhMac : parentMessage.nhMac;
+ if(nhMac == null)
+ throw new NullPointerException("Property nhMac must not be null");
+ IPv4Address srcIp = this.srcIpSet ? this.srcIp : parentMessage.srcIp;
+ if(srcIp == null)
+ throw new NullPointerException("Property srcIp must not be null");
+ IPv4Address dstIp = this.dstIpSet ? this.dstIp : parentMessage.dstIp;
+ if(dstIp == null)
+ throw new NullPointerException("Property dstIp must not be null");
+ short dscp = this.dscpSet ? this.dscp : parentMessage.dscp;
+ short ttl = this.ttlSet ? this.ttl : parentMessage.ttl;
+ long vpn = this.vpnSet ? this.vpn : parentMessage.vpn;
+ long rateLimit = this.rateLimitSet ? this.rateLimit : parentMessage.rateLimit;
+ String ifName = this.ifNameSet ? this.ifName : parentMessage.ifName;
+ if(ifName == null)
+ throw new NullPointerException("Property ifName must not be null");
+
+ //
+ return new OFBsnVportL2GreVer13(
+ flags,
+ portNo,
+ loopbackPortNo,
+ localMac,
+ nhMac,
+ srcIp,
+ dstIp,
+ dscp,
+ ttl,
+ vpn,
+ rateLimit,
+ ifName
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnVportL2Gre.Builder {
+ // OF message fields
+ private boolean flagsSet;
+ private Set<OFBsnVportL2GreFlags> flags;
+ private boolean portNoSet;
+ private OFPort portNo;
+ private boolean loopbackPortNoSet;
+ private OFPort loopbackPortNo;
+ private boolean localMacSet;
+ private MacAddress localMac;
+ private boolean nhMacSet;
+ private MacAddress nhMac;
+ private boolean srcIpSet;
+ private IPv4Address srcIp;
+ private boolean dstIpSet;
+ private IPv4Address dstIp;
+ private boolean dscpSet;
+ private short dscp;
+ private boolean ttlSet;
+ private short ttl;
+ private boolean vpnSet;
+ private long vpn;
+ private boolean rateLimitSet;
+ private long rateLimit;
+ private boolean ifNameSet;
+ private String ifName;
+
+ @Override
+ public int getType() {
+ return 0x1;
+ }
+
+ @Override
+ public Set<OFBsnVportL2GreFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnVportL2Gre.Builder setFlags(Set<OFBsnVportL2GreFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public OFBsnVportL2Gre.Builder setPortNo(OFPort portNo) {
+ this.portNo = portNo;
+ this.portNoSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getLoopbackPortNo() {
+ return loopbackPortNo;
+ }
+
+ @Override
+ public OFBsnVportL2Gre.Builder setLoopbackPortNo(OFPort loopbackPortNo) {
+ this.loopbackPortNo = loopbackPortNo;
+ this.loopbackPortNoSet = true;
+ return this;
+ }
+ @Override
+ public MacAddress getLocalMac() {
+ return localMac;
+ }
+
+ @Override
+ public OFBsnVportL2Gre.Builder setLocalMac(MacAddress localMac) {
+ this.localMac = localMac;
+ this.localMacSet = true;
+ return this;
+ }
+ @Override
+ public MacAddress getNhMac() {
+ return nhMac;
+ }
+
+ @Override
+ public OFBsnVportL2Gre.Builder setNhMac(MacAddress nhMac) {
+ this.nhMac = nhMac;
+ this.nhMacSet = true;
+ return this;
+ }
+ @Override
+ public IPv4Address getSrcIp() {
+ return srcIp;
+ }
+
+ @Override
+ public OFBsnVportL2Gre.Builder setSrcIp(IPv4Address srcIp) {
+ this.srcIp = srcIp;
+ this.srcIpSet = true;
+ return this;
+ }
+ @Override
+ public IPv4Address getDstIp() {
+ return dstIp;
+ }
+
+ @Override
+ public OFBsnVportL2Gre.Builder setDstIp(IPv4Address dstIp) {
+ this.dstIp = dstIp;
+ this.dstIpSet = true;
+ return this;
+ }
+ @Override
+ public short getDscp() {
+ return dscp;
+ }
+
+ @Override
+ public OFBsnVportL2Gre.Builder setDscp(short dscp) {
+ this.dscp = dscp;
+ this.dscpSet = true;
+ return this;
+ }
+ @Override
+ public short getTtl() {
+ return ttl;
+ }
+
+ @Override
+ public OFBsnVportL2Gre.Builder setTtl(short ttl) {
+ this.ttl = ttl;
+ this.ttlSet = true;
+ return this;
+ }
+ @Override
+ public long getVpn() {
+ return vpn;
+ }
+
+ @Override
+ public OFBsnVportL2Gre.Builder setVpn(long vpn) {
+ this.vpn = vpn;
+ this.vpnSet = true;
+ return this;
+ }
+ @Override
+ public long getRateLimit() {
+ return rateLimit;
+ }
+
+ @Override
+ public OFBsnVportL2Gre.Builder setRateLimit(long rateLimit) {
+ this.rateLimit = rateLimit;
+ this.rateLimitSet = true;
+ return this;
+ }
+ @Override
+ public String getIfName() {
+ return ifName;
+ }
+
+ @Override
+ public OFBsnVportL2Gre.Builder setIfName(String ifName) {
+ this.ifName = ifName;
+ this.ifNameSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFBsnVportL2Gre build() {
+ Set<OFBsnVportL2GreFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ OFPort portNo = this.portNoSet ? this.portNo : DEFAULT_PORT_NO;
+ if(portNo == null)
+ throw new NullPointerException("Property portNo must not be null");
+ OFPort loopbackPortNo = this.loopbackPortNoSet ? this.loopbackPortNo : DEFAULT_LOOPBACK_PORT_NO;
+ if(loopbackPortNo == null)
+ throw new NullPointerException("Property loopbackPortNo must not be null");
+ MacAddress localMac = this.localMacSet ? this.localMac : DEFAULT_LOCAL_MAC;
+ if(localMac == null)
+ throw new NullPointerException("Property localMac must not be null");
+ MacAddress nhMac = this.nhMacSet ? this.nhMac : DEFAULT_NH_MAC;
+ if(nhMac == null)
+ throw new NullPointerException("Property nhMac must not be null");
+ IPv4Address srcIp = this.srcIpSet ? this.srcIp : DEFAULT_SRC_IP;
+ if(srcIp == null)
+ throw new NullPointerException("Property srcIp must not be null");
+ IPv4Address dstIp = this.dstIpSet ? this.dstIp : DEFAULT_DST_IP;
+ if(dstIp == null)
+ throw new NullPointerException("Property dstIp must not be null");
+ short dscp = this.dscpSet ? this.dscp : DEFAULT_DSCP;
+ short ttl = this.ttlSet ? this.ttl : DEFAULT_TTL;
+ long vpn = this.vpnSet ? this.vpn : DEFAULT_VPN;
+ long rateLimit = this.rateLimitSet ? this.rateLimit : DEFAULT_RATE_LIMIT;
+ String ifName = this.ifNameSet ? this.ifName : DEFAULT_IF_NAME;
+ if(ifName == null)
+ throw new NullPointerException("Property ifName must not be null");
+
+
+ return new OFBsnVportL2GreVer13(
+ flags,
+ portNo,
+ loopbackPortNo,
+ localMac,
+ nhMac,
+ srcIp,
+ dstIp,
+ dscp,
+ ttl,
+ vpn,
+ rateLimit,
+ ifName
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnVportL2Gre> {
+ @Override
+ public OFBsnVportL2Gre readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 0x1
+ short type = bb.readShort();
+ if(type != (short) 0x1)
+ throw new OFParseError("Wrong type: Expected=0x1(0x1), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 64)
+ throw new OFParseError("Wrong length: Expected=64(64), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ Set<OFBsnVportL2GreFlags> flags = OFBsnVportL2GreFlagsSerializerVer13.readFrom(bb);
+ OFPort portNo = OFPort.read4Bytes(bb);
+ OFPort loopbackPortNo = OFPort.read4Bytes(bb);
+ MacAddress localMac = MacAddress.read6Bytes(bb);
+ MacAddress nhMac = MacAddress.read6Bytes(bb);
+ IPv4Address srcIp = IPv4Address.read4Bytes(bb);
+ IPv4Address dstIp = IPv4Address.read4Bytes(bb);
+ short dscp = U8.f(bb.readByte());
+ short ttl = U8.f(bb.readByte());
+ // pad: 2 bytes
+ bb.skipBytes(2);
+ long vpn = U32.f(bb.readInt());
+ long rateLimit = U32.f(bb.readInt());
+ String ifName = ChannelUtils.readFixedLengthString(bb, 16);
+
+ OFBsnVportL2GreVer13 bsnVportL2GreVer13 = new OFBsnVportL2GreVer13(
+ flags,
+ portNo,
+ loopbackPortNo,
+ localMac,
+ nhMac,
+ srcIp,
+ dstIp,
+ dscp,
+ ttl,
+ vpn,
+ rateLimit,
+ ifName
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnVportL2GreVer13);
+ return bsnVportL2GreVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnVportL2GreVer13Funnel FUNNEL = new OFBsnVportL2GreVer13Funnel();
+ static class OFBsnVportL2GreVer13Funnel implements Funnel<OFBsnVportL2GreVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnVportL2GreVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 0x1
+ sink.putShort((short) 0x1);
+ // fixed value property length = 64
+ sink.putShort((short) 0x40);
+ OFBsnVportL2GreFlagsSerializerVer13.putTo(message.flags, sink);
+ message.portNo.putTo(sink);
+ message.loopbackPortNo.putTo(sink);
+ message.localMac.putTo(sink);
+ message.nhMac.putTo(sink);
+ message.srcIp.putTo(sink);
+ message.dstIp.putTo(sink);
+ sink.putShort(message.dscp);
+ sink.putShort(message.ttl);
+ // skip pad (2 bytes)
+ sink.putLong(message.vpn);
+ sink.putLong(message.rateLimit);
+ sink.putUnencodedChars(message.ifName);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnVportL2GreVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnVportL2GreVer13 message) {
+ // fixed value property type = 0x1
+ bb.writeShort((short) 0x1);
+ // fixed value property length = 64
+ bb.writeShort((short) 0x40);
+ OFBsnVportL2GreFlagsSerializerVer13.writeTo(bb, message.flags);
+ message.portNo.write4Bytes(bb);
+ message.loopbackPortNo.write4Bytes(bb);
+ message.localMac.write6Bytes(bb);
+ message.nhMac.write6Bytes(bb);
+ message.srcIp.write4Bytes(bb);
+ message.dstIp.write4Bytes(bb);
+ bb.writeByte(U8.t(message.dscp));
+ bb.writeByte(U8.t(message.ttl));
+ // pad: 2 bytes
+ bb.writeZero(2);
+ bb.writeInt(U32.t(message.vpn));
+ bb.writeInt(U32.t(message.rateLimit));
+ ChannelUtils.writeFixedLengthString(bb, message.ifName, 16);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnVportL2GreVer13(");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("portNo=").append(portNo);
+ b.append(", ");
+ b.append("loopbackPortNo=").append(loopbackPortNo);
+ b.append(", ");
+ b.append("localMac=").append(localMac);
+ b.append(", ");
+ b.append("nhMac=").append(nhMac);
+ b.append(", ");
+ b.append("srcIp=").append(srcIp);
+ b.append(", ");
+ b.append("dstIp=").append(dstIp);
+ b.append(", ");
+ b.append("dscp=").append(dscp);
+ b.append(", ");
+ b.append("ttl=").append(ttl);
+ b.append(", ");
+ b.append("vpn=").append(vpn);
+ b.append(", ");
+ b.append("rateLimit=").append(rateLimit);
+ b.append(", ");
+ b.append("ifName=").append(ifName);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnVportL2GreVer13 other = (OFBsnVportL2GreVer13) obj;
+
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if (portNo == null) {
+ if (other.portNo != null)
+ return false;
+ } else if (!portNo.equals(other.portNo))
+ return false;
+ if (loopbackPortNo == null) {
+ if (other.loopbackPortNo != null)
+ return false;
+ } else if (!loopbackPortNo.equals(other.loopbackPortNo))
+ return false;
+ if (localMac == null) {
+ if (other.localMac != null)
+ return false;
+ } else if (!localMac.equals(other.localMac))
+ return false;
+ if (nhMac == null) {
+ if (other.nhMac != null)
+ return false;
+ } else if (!nhMac.equals(other.nhMac))
+ return false;
+ if (srcIp == null) {
+ if (other.srcIp != null)
+ return false;
+ } else if (!srcIp.equals(other.srcIp))
+ return false;
+ if (dstIp == null) {
+ if (other.dstIp != null)
+ return false;
+ } else if (!dstIp.equals(other.dstIp))
+ return false;
+ if( dscp != other.dscp)
+ return false;
+ if( ttl != other.ttl)
+ return false;
+ if( vpn != other.vpn)
+ return false;
+ if( rateLimit != other.rateLimit)
+ return false;
+ if (ifName == null) {
+ if (other.ifName != null)
+ return false;
+ } else if (!ifName.equals(other.ifName))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * result + ((portNo == null) ? 0 : portNo.hashCode());
+ result = prime * result + ((loopbackPortNo == null) ? 0 : loopbackPortNo.hashCode());
+ result = prime * result + ((localMac == null) ? 0 : localMac.hashCode());
+ result = prime * result + ((nhMac == null) ? 0 : nhMac.hashCode());
+ result = prime * result + ((srcIp == null) ? 0 : srcIp.hashCode());
+ result = prime * result + ((dstIp == null) ? 0 : dstIp.hashCode());
+ result = prime * result + dscp;
+ result = prime * result + ttl;
+ result = prime * (int) (vpn ^ (vpn >>> 32));
+ result = prime * (int) (rateLimit ^ (rateLimit >>> 32));
+ result = prime * result + ((ifName == null) ? 0 : ifName.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVportQInQUntaggedSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVportQInQUntaggedSerializerVer13.java
new file mode 100644
index 0000000..da359ae
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVportQInQUntaggedSerializerVer13.java
@@ -0,0 +1,69 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFBsnVportQInQUntagged;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+
+public class OFBsnVportQInQUntaggedSerializerVer13 {
+
+ public final static short BSN_VPORT_Q_IN_Q_UNTAGGED_VAL = (short) 0xffff;
+
+ public static OFBsnVportQInQUntagged readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readShort());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, OFBsnVportQInQUntagged e) {
+ bb.writeShort(toWireValue(e));
+ }
+
+ public static void putTo(OFBsnVportQInQUntagged e, PrimitiveSink sink) {
+ sink.putShort(toWireValue(e));
+ }
+
+ public static OFBsnVportQInQUntagged ofWireValue(short val) {
+ switch(val) {
+ case BSN_VPORT_Q_IN_Q_UNTAGGED_VAL:
+ return OFBsnVportQInQUntagged.BSN_VPORT_Q_IN_Q_UNTAGGED;
+ default:
+ throw new IllegalArgumentException("Illegal wire value for type OFBsnVportQInQUntagged in version 1.3: " + val);
+ }
+ }
+
+
+ public static short toWireValue(OFBsnVportQInQUntagged e) {
+ switch(e) {
+ case BSN_VPORT_Q_IN_Q_UNTAGGED:
+ return BSN_VPORT_Q_IN_Q_UNTAGGED_VAL;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFBsnVportQInQUntagged in version 1.3: " + e);
+ }
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVportQInQVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVportQInQVer13.java
new file mode 100644
index 0000000..1aed0b7
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVportQInQVer13.java
@@ -0,0 +1,502 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnVportQInQVer13 implements OFBsnVportQInQ {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnVportQInQVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 32;
+
+ private final static long DEFAULT_PORT_NO = 0x0L;
+ private final static int DEFAULT_INGRESS_TPID = 0x0;
+ private final static int DEFAULT_INGRESS_VLAN_ID = 0x0;
+ private final static int DEFAULT_EGRESS_TPID = 0x0;
+ private final static int DEFAULT_EGRESS_VLAN_ID = 0x0;
+ private final static String DEFAULT_IF_NAME = "";
+
+ // OF message fields
+ private final long portNo;
+ private final int ingressTpid;
+ private final int ingressVlanId;
+ private final int egressTpid;
+ private final int egressVlanId;
+ private final String ifName;
+//
+ // Immutable default instance
+ final static OFBsnVportQInQVer13 DEFAULT = new OFBsnVportQInQVer13(
+ DEFAULT_PORT_NO, DEFAULT_INGRESS_TPID, DEFAULT_INGRESS_VLAN_ID, DEFAULT_EGRESS_TPID, DEFAULT_EGRESS_VLAN_ID, DEFAULT_IF_NAME
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnVportQInQVer13(long portNo, int ingressTpid, int ingressVlanId, int egressTpid, int egressVlanId, String ifName) {
+ this.portNo = portNo;
+ this.ingressTpid = ingressTpid;
+ this.ingressVlanId = ingressVlanId;
+ this.egressTpid = egressTpid;
+ this.egressVlanId = egressVlanId;
+ this.ifName = ifName;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public int getType() {
+ return 0x0;
+ }
+
+ @Override
+ public long getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public int getIngressTpid() {
+ return ingressTpid;
+ }
+
+ @Override
+ public int getIngressVlanId() {
+ return ingressVlanId;
+ }
+
+ @Override
+ public int getEgressTpid() {
+ return egressTpid;
+ }
+
+ @Override
+ public int getEgressVlanId() {
+ return egressVlanId;
+ }
+
+ @Override
+ public String getIfName() {
+ return ifName;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFBsnVportQInQ.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnVportQInQ.Builder {
+ final OFBsnVportQInQVer13 parentMessage;
+
+ // OF message fields
+ private boolean portNoSet;
+ private long portNo;
+ private boolean ingressTpidSet;
+ private int ingressTpid;
+ private boolean ingressVlanIdSet;
+ private int ingressVlanId;
+ private boolean egressTpidSet;
+ private int egressTpid;
+ private boolean egressVlanIdSet;
+ private int egressVlanId;
+ private boolean ifNameSet;
+ private String ifName;
+
+ BuilderWithParent(OFBsnVportQInQVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public int getType() {
+ return 0x0;
+ }
+
+ @Override
+ public long getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public OFBsnVportQInQ.Builder setPortNo(long portNo) {
+ this.portNo = portNo;
+ this.portNoSet = true;
+ return this;
+ }
+ @Override
+ public int getIngressTpid() {
+ return ingressTpid;
+ }
+
+ @Override
+ public OFBsnVportQInQ.Builder setIngressTpid(int ingressTpid) {
+ this.ingressTpid = ingressTpid;
+ this.ingressTpidSet = true;
+ return this;
+ }
+ @Override
+ public int getIngressVlanId() {
+ return ingressVlanId;
+ }
+
+ @Override
+ public OFBsnVportQInQ.Builder setIngressVlanId(int ingressVlanId) {
+ this.ingressVlanId = ingressVlanId;
+ this.ingressVlanIdSet = true;
+ return this;
+ }
+ @Override
+ public int getEgressTpid() {
+ return egressTpid;
+ }
+
+ @Override
+ public OFBsnVportQInQ.Builder setEgressTpid(int egressTpid) {
+ this.egressTpid = egressTpid;
+ this.egressTpidSet = true;
+ return this;
+ }
+ @Override
+ public int getEgressVlanId() {
+ return egressVlanId;
+ }
+
+ @Override
+ public OFBsnVportQInQ.Builder setEgressVlanId(int egressVlanId) {
+ this.egressVlanId = egressVlanId;
+ this.egressVlanIdSet = true;
+ return this;
+ }
+ @Override
+ public String getIfName() {
+ return ifName;
+ }
+
+ @Override
+ public OFBsnVportQInQ.Builder setIfName(String ifName) {
+ this.ifName = ifName;
+ this.ifNameSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFBsnVportQInQ build() {
+ long portNo = this.portNoSet ? this.portNo : parentMessage.portNo;
+ int ingressTpid = this.ingressTpidSet ? this.ingressTpid : parentMessage.ingressTpid;
+ int ingressVlanId = this.ingressVlanIdSet ? this.ingressVlanId : parentMessage.ingressVlanId;
+ int egressTpid = this.egressTpidSet ? this.egressTpid : parentMessage.egressTpid;
+ int egressVlanId = this.egressVlanIdSet ? this.egressVlanId : parentMessage.egressVlanId;
+ String ifName = this.ifNameSet ? this.ifName : parentMessage.ifName;
+ if(ifName == null)
+ throw new NullPointerException("Property ifName must not be null");
+
+ //
+ return new OFBsnVportQInQVer13(
+ portNo,
+ ingressTpid,
+ ingressVlanId,
+ egressTpid,
+ egressVlanId,
+ ifName
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnVportQInQ.Builder {
+ // OF message fields
+ private boolean portNoSet;
+ private long portNo;
+ private boolean ingressTpidSet;
+ private int ingressTpid;
+ private boolean ingressVlanIdSet;
+ private int ingressVlanId;
+ private boolean egressTpidSet;
+ private int egressTpid;
+ private boolean egressVlanIdSet;
+ private int egressVlanId;
+ private boolean ifNameSet;
+ private String ifName;
+
+ @Override
+ public int getType() {
+ return 0x0;
+ }
+
+ @Override
+ public long getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public OFBsnVportQInQ.Builder setPortNo(long portNo) {
+ this.portNo = portNo;
+ this.portNoSet = true;
+ return this;
+ }
+ @Override
+ public int getIngressTpid() {
+ return ingressTpid;
+ }
+
+ @Override
+ public OFBsnVportQInQ.Builder setIngressTpid(int ingressTpid) {
+ this.ingressTpid = ingressTpid;
+ this.ingressTpidSet = true;
+ return this;
+ }
+ @Override
+ public int getIngressVlanId() {
+ return ingressVlanId;
+ }
+
+ @Override
+ public OFBsnVportQInQ.Builder setIngressVlanId(int ingressVlanId) {
+ this.ingressVlanId = ingressVlanId;
+ this.ingressVlanIdSet = true;
+ return this;
+ }
+ @Override
+ public int getEgressTpid() {
+ return egressTpid;
+ }
+
+ @Override
+ public OFBsnVportQInQ.Builder setEgressTpid(int egressTpid) {
+ this.egressTpid = egressTpid;
+ this.egressTpidSet = true;
+ return this;
+ }
+ @Override
+ public int getEgressVlanId() {
+ return egressVlanId;
+ }
+
+ @Override
+ public OFBsnVportQInQ.Builder setEgressVlanId(int egressVlanId) {
+ this.egressVlanId = egressVlanId;
+ this.egressVlanIdSet = true;
+ return this;
+ }
+ @Override
+ public String getIfName() {
+ return ifName;
+ }
+
+ @Override
+ public OFBsnVportQInQ.Builder setIfName(String ifName) {
+ this.ifName = ifName;
+ this.ifNameSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFBsnVportQInQ build() {
+ long portNo = this.portNoSet ? this.portNo : DEFAULT_PORT_NO;
+ int ingressTpid = this.ingressTpidSet ? this.ingressTpid : DEFAULT_INGRESS_TPID;
+ int ingressVlanId = this.ingressVlanIdSet ? this.ingressVlanId : DEFAULT_INGRESS_VLAN_ID;
+ int egressTpid = this.egressTpidSet ? this.egressTpid : DEFAULT_EGRESS_TPID;
+ int egressVlanId = this.egressVlanIdSet ? this.egressVlanId : DEFAULT_EGRESS_VLAN_ID;
+ String ifName = this.ifNameSet ? this.ifName : DEFAULT_IF_NAME;
+ if(ifName == null)
+ throw new NullPointerException("Property ifName must not be null");
+
+
+ return new OFBsnVportQInQVer13(
+ portNo,
+ ingressTpid,
+ ingressVlanId,
+ egressTpid,
+ egressVlanId,
+ ifName
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnVportQInQ> {
+ @Override
+ public OFBsnVportQInQ readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 0x0
+ short type = bb.readShort();
+ if(type != (short) 0x0)
+ throw new OFParseError("Wrong type: Expected=0x0(0x0), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 32)
+ throw new OFParseError("Wrong length: Expected=32(32), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long portNo = U32.f(bb.readInt());
+ int ingressTpid = U16.f(bb.readShort());
+ int ingressVlanId = U16.f(bb.readShort());
+ int egressTpid = U16.f(bb.readShort());
+ int egressVlanId = U16.f(bb.readShort());
+ String ifName = ChannelUtils.readFixedLengthString(bb, 16);
+
+ OFBsnVportQInQVer13 bsnVportQInQVer13 = new OFBsnVportQInQVer13(
+ portNo,
+ ingressTpid,
+ ingressVlanId,
+ egressTpid,
+ egressVlanId,
+ ifName
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnVportQInQVer13);
+ return bsnVportQInQVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnVportQInQVer13Funnel FUNNEL = new OFBsnVportQInQVer13Funnel();
+ static class OFBsnVportQInQVer13Funnel implements Funnel<OFBsnVportQInQVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnVportQInQVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 0x0
+ sink.putShort((short) 0x0);
+ // fixed value property length = 32
+ sink.putShort((short) 0x20);
+ sink.putLong(message.portNo);
+ sink.putInt(message.ingressTpid);
+ sink.putInt(message.ingressVlanId);
+ sink.putInt(message.egressTpid);
+ sink.putInt(message.egressVlanId);
+ sink.putUnencodedChars(message.ifName);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnVportQInQVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnVportQInQVer13 message) {
+ // fixed value property type = 0x0
+ bb.writeShort((short) 0x0);
+ // fixed value property length = 32
+ bb.writeShort((short) 0x20);
+ bb.writeInt(U32.t(message.portNo));
+ bb.writeShort(U16.t(message.ingressTpid));
+ bb.writeShort(U16.t(message.ingressVlanId));
+ bb.writeShort(U16.t(message.egressTpid));
+ bb.writeShort(U16.t(message.egressVlanId));
+ ChannelUtils.writeFixedLengthString(bb, message.ifName, 16);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnVportQInQVer13(");
+ b.append("portNo=").append(portNo);
+ b.append(", ");
+ b.append("ingressTpid=").append(ingressTpid);
+ b.append(", ");
+ b.append("ingressVlanId=").append(ingressVlanId);
+ b.append(", ");
+ b.append("egressTpid=").append(egressTpid);
+ b.append(", ");
+ b.append("egressVlanId=").append(egressVlanId);
+ b.append(", ");
+ b.append("ifName=").append(ifName);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnVportQInQVer13 other = (OFBsnVportQInQVer13) obj;
+
+ if( portNo != other.portNo)
+ return false;
+ if( ingressTpid != other.ingressTpid)
+ return false;
+ if( ingressVlanId != other.ingressVlanId)
+ return false;
+ if( egressTpid != other.egressTpid)
+ return false;
+ if( egressVlanId != other.egressVlanId)
+ return false;
+ if (ifName == null) {
+ if (other.ifName != null)
+ return false;
+ } else if (!ifName.equals(other.ifName))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (portNo ^ (portNo >>> 32));
+ result = prime * result + ingressTpid;
+ result = prime * result + ingressVlanId;
+ result = prime * result + egressTpid;
+ result = prime * result + egressVlanId;
+ result = prime * result + ((ifName == null) ? 0 : ifName.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVportStatusSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVportStatusSerializerVer13.java
new file mode 100644
index 0000000..ad668bf
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVportStatusSerializerVer13.java
@@ -0,0 +1,74 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFBsnVportStatus;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+
+public class OFBsnVportStatusSerializerVer13 {
+
+ public final static short BSN_VPORT_STATUS_OK_VAL = (short) 0x0;
+ public final static short BSN_VPORT_STATUS_FAILED_VAL = (short) 0x1;
+
+ public static OFBsnVportStatus readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(U8.f(bb.readByte()));
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, OFBsnVportStatus e) {
+ bb.writeByte(U8.t(toWireValue(e)));
+ }
+
+ public static void putTo(OFBsnVportStatus e, PrimitiveSink sink) {
+ sink.putShort(toWireValue(e));
+ }
+
+ public static OFBsnVportStatus ofWireValue(short val) {
+ switch(val) {
+ case BSN_VPORT_STATUS_OK_VAL:
+ return OFBsnVportStatus.BSN_VPORT_STATUS_OK;
+ case BSN_VPORT_STATUS_FAILED_VAL:
+ return OFBsnVportStatus.BSN_VPORT_STATUS_FAILED;
+ default:
+ throw new IllegalArgumentException("Illegal wire value for type OFBsnVportStatus in version 1.3: " + val);
+ }
+ }
+
+
+ public static short toWireValue(OFBsnVportStatus e) {
+ switch(e) {
+ case BSN_VPORT_STATUS_OK:
+ return BSN_VPORT_STATUS_OK_VAL;
+ case BSN_VPORT_STATUS_FAILED:
+ return BSN_VPORT_STATUS_FAILED_VAL;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFBsnVportStatus in version 1.3: " + e);
+ }
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVportVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVportVer13.java
new file mode 100644
index 0000000..686cbeb
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVportVer13.java
@@ -0,0 +1,56 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_virtual_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.jboss.netty.buffer.ChannelBuffer;
+
+abstract class OFBsnVportVer13 {
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 4;
+
+
+ public final static OFBsnVportVer13.Reader READER = new Reader();
+
+ static class Reader implements OFMessageReader<OFBsnVport> {
+ @Override
+ public OFBsnVport readFrom(ChannelBuffer bb) throws OFParseError {
+ if(bb.readableBytes() < MINIMUM_LENGTH)
+ return null;
+ int start = bb.readerIndex();
+ short type = bb.readShort();
+ bb.readerIndex(start);
+ switch(type) {
+ case (short) 0x1:
+ // discriminator value 0x1=0x1 for class OFBsnVportL2GreVer13
+ return OFBsnVportL2GreVer13.READER.readFrom(bb);
+ case (short) 0x0:
+ // discriminator value 0x0=0x0 for class OFBsnVportQInQVer13
+ return OFBsnVportQInQVer13.READER.readFrom(bb);
+ default:
+ throw new OFParseError("Unknown value for discriminator type of class OFBsnVportVer13: " + type);
+ }
+ }
+ }
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVrfCounterConstantsSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVrfCounterConstantsSerializerVer13.java
new file mode 100644
index 0000000..a8a3ffb
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVrfCounterConstantsSerializerVer13.java
@@ -0,0 +1,69 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFBsnVrfCounterConstants;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+
+public class OFBsnVrfCounterConstantsSerializerVer13 {
+
+ public final static int BSN_VRF_ALL_VAL = (int) 0xffffffff;
+
+ public static OFBsnVrfCounterConstants readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readInt());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, OFBsnVrfCounterConstants e) {
+ bb.writeInt(toWireValue(e));
+ }
+
+ public static void putTo(OFBsnVrfCounterConstants e, PrimitiveSink sink) {
+ sink.putInt(toWireValue(e));
+ }
+
+ public static OFBsnVrfCounterConstants ofWireValue(int val) {
+ switch(val) {
+ case BSN_VRF_ALL_VAL:
+ return OFBsnVrfCounterConstants.BSN_VRF_ALL;
+ default:
+ throw new IllegalArgumentException("Illegal wire value for type OFBsnVrfCounterConstants in version 1.3: " + val);
+ }
+ }
+
+
+ public static int toWireValue(OFBsnVrfCounterConstants e) {
+ switch(e) {
+ case BSN_VRF_ALL:
+ return BSN_VRF_ALL_VAL;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFBsnVrfCounterConstants in version 1.3: " + e);
+ }
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVrfCounterStatsEntryVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVrfCounterStatsEntryVer13.java
new file mode 100644
index 0000000..9c337b2
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVrfCounterStatsEntryVer13.java
@@ -0,0 +1,303 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnVrfCounterStatsEntryVer13 implements OFBsnVrfCounterStatsEntry {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnVrfCounterStatsEntryVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 8;
+
+ private final static long DEFAULT_VRF = 0x0L;
+ private final static List<U64> DEFAULT_VALUES = ImmutableList.<U64>of();
+
+ // OF message fields
+ private final long vrf;
+ private final List<U64> values;
+//
+ // Immutable default instance
+ final static OFBsnVrfCounterStatsEntryVer13 DEFAULT = new OFBsnVrfCounterStatsEntryVer13(
+ DEFAULT_VRF, DEFAULT_VALUES
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnVrfCounterStatsEntryVer13(long vrf, List<U64> values) {
+ this.vrf = vrf;
+ this.values = values;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getVrf() {
+ return vrf;
+ }
+
+ @Override
+ public List<U64> getValues() {
+ return values;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFBsnVrfCounterStatsEntry.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnVrfCounterStatsEntry.Builder {
+ final OFBsnVrfCounterStatsEntryVer13 parentMessage;
+
+ // OF message fields
+ private boolean vrfSet;
+ private long vrf;
+ private boolean valuesSet;
+ private List<U64> values;
+
+ BuilderWithParent(OFBsnVrfCounterStatsEntryVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getVrf() {
+ return vrf;
+ }
+
+ @Override
+ public OFBsnVrfCounterStatsEntry.Builder setVrf(long vrf) {
+ this.vrf = vrf;
+ this.vrfSet = true;
+ return this;
+ }
+ @Override
+ public List<U64> getValues() {
+ return values;
+ }
+
+ @Override
+ public OFBsnVrfCounterStatsEntry.Builder setValues(List<U64> values) {
+ this.values = values;
+ this.valuesSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFBsnVrfCounterStatsEntry build() {
+ long vrf = this.vrfSet ? this.vrf : parentMessage.vrf;
+ List<U64> values = this.valuesSet ? this.values : parentMessage.values;
+ if(values == null)
+ throw new NullPointerException("Property values must not be null");
+
+ //
+ return new OFBsnVrfCounterStatsEntryVer13(
+ vrf,
+ values
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnVrfCounterStatsEntry.Builder {
+ // OF message fields
+ private boolean vrfSet;
+ private long vrf;
+ private boolean valuesSet;
+ private List<U64> values;
+
+ @Override
+ public long getVrf() {
+ return vrf;
+ }
+
+ @Override
+ public OFBsnVrfCounterStatsEntry.Builder setVrf(long vrf) {
+ this.vrf = vrf;
+ this.vrfSet = true;
+ return this;
+ }
+ @Override
+ public List<U64> getValues() {
+ return values;
+ }
+
+ @Override
+ public OFBsnVrfCounterStatsEntry.Builder setValues(List<U64> values) {
+ this.values = values;
+ this.valuesSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFBsnVrfCounterStatsEntry build() {
+ long vrf = this.vrfSet ? this.vrf : DEFAULT_VRF;
+ List<U64> values = this.valuesSet ? this.values : DEFAULT_VALUES;
+ if(values == null)
+ throw new NullPointerException("Property values must not be null");
+
+
+ return new OFBsnVrfCounterStatsEntryVer13(
+ vrf,
+ values
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnVrfCounterStatsEntry> {
+ @Override
+ public OFBsnVrfCounterStatsEntry readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ // pad: 2 bytes
+ bb.skipBytes(2);
+ long vrf = U32.f(bb.readInt());
+ List<U64> values = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), U64.READER);
+
+ OFBsnVrfCounterStatsEntryVer13 bsnVrfCounterStatsEntryVer13 = new OFBsnVrfCounterStatsEntryVer13(
+ vrf,
+ values
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnVrfCounterStatsEntryVer13);
+ return bsnVrfCounterStatsEntryVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnVrfCounterStatsEntryVer13Funnel FUNNEL = new OFBsnVrfCounterStatsEntryVer13Funnel();
+ static class OFBsnVrfCounterStatsEntryVer13Funnel implements Funnel<OFBsnVrfCounterStatsEntryVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnVrfCounterStatsEntryVer13 message, PrimitiveSink sink) {
+ // FIXME: skip funnel of length
+ // skip pad (2 bytes)
+ sink.putLong(message.vrf);
+ FunnelUtils.putList(message.values, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnVrfCounterStatsEntryVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnVrfCounterStatsEntryVer13 message) {
+ int startIndex = bb.writerIndex();
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ // pad: 2 bytes
+ bb.writeZero(2);
+ bb.writeInt(U32.t(message.vrf));
+ ChannelUtils.writeList(bb, message.values);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnVrfCounterStatsEntryVer13(");
+ b.append("vrf=").append(vrf);
+ b.append(", ");
+ b.append("values=").append(values);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnVrfCounterStatsEntryVer13 other = (OFBsnVrfCounterStatsEntryVer13) obj;
+
+ if( vrf != other.vrf)
+ return false;
+ if (values == null) {
+ if (other.values != null)
+ return false;
+ } else if (!values.equals(other.values))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (vrf ^ (vrf >>> 32));
+ result = prime * result + ((values == null) ? 0 : values.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVrfCounterStatsReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVrfCounterStatsReplyVer13.java
new file mode 100644
index 0000000..05378ac
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVrfCounterStatsReplyVer13.java
@@ -0,0 +1,458 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnVrfCounterStatsReplyVer13 implements OFBsnVrfCounterStatsReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnVrfCounterStatsReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 24;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsReplyFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsReplyFlags>of();
+ private final static List<OFBsnVrfCounterStatsEntry> DEFAULT_ENTRIES = ImmutableList.<OFBsnVrfCounterStatsEntry>of();
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsReplyFlags> flags;
+ private final List<OFBsnVrfCounterStatsEntry> entries;
+//
+ // Immutable default instance
+ final static OFBsnVrfCounterStatsReplyVer13 DEFAULT = new OFBsnVrfCounterStatsReplyVer13(
+ DEFAULT_XID, DEFAULT_FLAGS, DEFAULT_ENTRIES
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnVrfCounterStatsReplyVer13(long xid, Set<OFStatsReplyFlags> flags, List<OFBsnVrfCounterStatsEntry> entries) {
+ this.xid = xid;
+ this.flags = flags;
+ this.entries = entries;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0xfL;
+ }
+
+ @Override
+ public List<OFBsnVrfCounterStatsEntry> getEntries() {
+ return entries;
+ }
+
+
+
+ public OFBsnVrfCounterStatsReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnVrfCounterStatsReply.Builder {
+ final OFBsnVrfCounterStatsReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean entriesSet;
+ private List<OFBsnVrfCounterStatsEntry> entries;
+
+ BuilderWithParent(OFBsnVrfCounterStatsReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnVrfCounterStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnVrfCounterStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0xfL;
+ }
+
+ @Override
+ public List<OFBsnVrfCounterStatsEntry> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFBsnVrfCounterStatsReply.Builder setEntries(List<OFBsnVrfCounterStatsEntry> entries) {
+ this.entries = entries;
+ this.entriesSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnVrfCounterStatsReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ List<OFBsnVrfCounterStatsEntry> entries = this.entriesSet ? this.entries : parentMessage.entries;
+ if(entries == null)
+ throw new NullPointerException("Property entries must not be null");
+
+ //
+ return new OFBsnVrfCounterStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnVrfCounterStatsReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean entriesSet;
+ private List<OFBsnVrfCounterStatsEntry> entries;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnVrfCounterStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnVrfCounterStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0xfL;
+ }
+
+ @Override
+ public List<OFBsnVrfCounterStatsEntry> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFBsnVrfCounterStatsReply.Builder setEntries(List<OFBsnVrfCounterStatsEntry> entries) {
+ this.entries = entries;
+ this.entriesSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnVrfCounterStatsReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ List<OFBsnVrfCounterStatsEntry> entries = this.entriesSet ? this.entries : DEFAULT_ENTRIES;
+ if(entries == null)
+ throw new NullPointerException("Property entries must not be null");
+
+
+ return new OFBsnVrfCounterStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnVrfCounterStatsReply> {
+ @Override
+ public OFBsnVrfCounterStatsReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 19
+ byte type = bb.readByte();
+ if(type != (byte) 0x13)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REPLY(19), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 65535
+ short statsType = bb.readShort();
+ if(statsType != (short) 0xffff)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.EXPERIMENTER(65535), got="+statsType);
+ Set<OFStatsReplyFlags> flags = OFStatsReplyFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0xfL
+ int subtype = bb.readInt();
+ if(subtype != 0xf)
+ throw new OFParseError("Wrong subtype: Expected=0xfL(0xfL), got="+subtype);
+ List<OFBsnVrfCounterStatsEntry> entries = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFBsnVrfCounterStatsEntryVer13.READER);
+
+ OFBsnVrfCounterStatsReplyVer13 bsnVrfCounterStatsReplyVer13 = new OFBsnVrfCounterStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnVrfCounterStatsReplyVer13);
+ return bsnVrfCounterStatsReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnVrfCounterStatsReplyVer13Funnel FUNNEL = new OFBsnVrfCounterStatsReplyVer13Funnel();
+ static class OFBsnVrfCounterStatsReplyVer13Funnel implements Funnel<OFBsnVrfCounterStatsReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnVrfCounterStatsReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 19
+ sink.putByte((byte) 0x13);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property statsType = 65535
+ sink.putShort((short) 0xffff);
+ OFStatsReplyFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0xfL
+ sink.putInt(0xf);
+ FunnelUtils.putList(message.entries, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnVrfCounterStatsReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnVrfCounterStatsReplyVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 19
+ bb.writeByte((byte) 0x13);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 65535
+ bb.writeShort((short) 0xffff);
+ OFStatsReplyFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0xfL
+ bb.writeInt(0xf);
+ ChannelUtils.writeList(bb, message.entries);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnVrfCounterStatsReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("entries=").append(entries);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnVrfCounterStatsReplyVer13 other = (OFBsnVrfCounterStatsReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if (entries == null) {
+ if (other.entries != null)
+ return false;
+ } else if (!entries.equals(other.entries))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * result + ((entries == null) ? 0 : entries.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVrfCounterStatsRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVrfCounterStatsRequestVer13.java
new file mode 100644
index 0000000..a39cf1c
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVrfCounterStatsRequestVer13.java
@@ -0,0 +1,444 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBsnVrfCounterStatsRequestVer13 implements OFBsnVrfCounterStatsRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFBsnVrfCounterStatsRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 28;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsRequestFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsRequestFlags>of();
+ private final static long DEFAULT_VRF = 0x0L;
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsRequestFlags> flags;
+ private final long vrf;
+//
+ // Immutable default instance
+ final static OFBsnVrfCounterStatsRequestVer13 DEFAULT = new OFBsnVrfCounterStatsRequestVer13(
+ DEFAULT_XID, DEFAULT_FLAGS, DEFAULT_VRF
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBsnVrfCounterStatsRequestVer13(long xid, Set<OFStatsRequestFlags> flags, long vrf) {
+ this.xid = xid;
+ this.flags = flags;
+ this.vrf = vrf;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0xfL;
+ }
+
+ @Override
+ public long getVrf() {
+ return vrf;
+ }
+
+
+
+ public OFBsnVrfCounterStatsRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBsnVrfCounterStatsRequest.Builder {
+ final OFBsnVrfCounterStatsRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+ private boolean vrfSet;
+ private long vrf;
+
+ BuilderWithParent(OFBsnVrfCounterStatsRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnVrfCounterStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnVrfCounterStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0xfL;
+ }
+
+ @Override
+ public long getVrf() {
+ return vrf;
+ }
+
+ @Override
+ public OFBsnVrfCounterStatsRequest.Builder setVrf(long vrf) {
+ this.vrf = vrf;
+ this.vrfSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFBsnVrfCounterStatsRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ long vrf = this.vrfSet ? this.vrf : parentMessage.vrf;
+
+ //
+ return new OFBsnVrfCounterStatsRequestVer13(
+ xid,
+ flags,
+ vrf
+ );
+ }
+
+ }
+
+ static class Builder implements OFBsnVrfCounterStatsRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+ private boolean vrfSet;
+ private long vrf;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBsnVrfCounterStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.EXPERIMENTER;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFBsnVrfCounterStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0xfL;
+ }
+
+ @Override
+ public long getVrf() {
+ return vrf;
+ }
+
+ @Override
+ public OFBsnVrfCounterStatsRequest.Builder setVrf(long vrf) {
+ this.vrf = vrf;
+ this.vrfSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFBsnVrfCounterStatsRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ long vrf = this.vrfSet ? this.vrf : DEFAULT_VRF;
+
+
+ return new OFBsnVrfCounterStatsRequestVer13(
+ xid,
+ flags,
+ vrf
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBsnVrfCounterStatsRequest> {
+ @Override
+ public OFBsnVrfCounterStatsRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 18
+ byte type = bb.readByte();
+ if(type != (byte) 0x12)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REQUEST(18), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 28)
+ throw new OFParseError("Wrong length: Expected=28(28), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 65535
+ short statsType = bb.readShort();
+ if(statsType != (short) 0xffff)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.EXPERIMENTER(65535), got="+statsType);
+ Set<OFStatsRequestFlags> flags = OFStatsRequestFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0xfL
+ int subtype = bb.readInt();
+ if(subtype != 0xf)
+ throw new OFParseError("Wrong subtype: Expected=0xfL(0xfL), got="+subtype);
+ long vrf = U32.f(bb.readInt());
+
+ OFBsnVrfCounterStatsRequestVer13 bsnVrfCounterStatsRequestVer13 = new OFBsnVrfCounterStatsRequestVer13(
+ xid,
+ flags,
+ vrf
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bsnVrfCounterStatsRequestVer13);
+ return bsnVrfCounterStatsRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBsnVrfCounterStatsRequestVer13Funnel FUNNEL = new OFBsnVrfCounterStatsRequestVer13Funnel();
+ static class OFBsnVrfCounterStatsRequestVer13Funnel implements Funnel<OFBsnVrfCounterStatsRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBsnVrfCounterStatsRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 18
+ sink.putByte((byte) 0x12);
+ // fixed value property length = 28
+ sink.putShort((short) 0x1c);
+ sink.putLong(message.xid);
+ // fixed value property statsType = 65535
+ sink.putShort((short) 0xffff);
+ OFStatsRequestFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0xfL
+ sink.putInt(0xf);
+ sink.putLong(message.vrf);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBsnVrfCounterStatsRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBsnVrfCounterStatsRequestVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 18
+ bb.writeByte((byte) 0x12);
+ // fixed value property length = 28
+ bb.writeShort((short) 0x1c);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 65535
+ bb.writeShort((short) 0xffff);
+ OFStatsRequestFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0xfL
+ bb.writeInt(0xf);
+ bb.writeInt(U32.t(message.vrf));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBsnVrfCounterStatsRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("vrf=").append(vrf);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBsnVrfCounterStatsRequestVer13 other = (OFBsnVrfCounterStatsRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if( vrf != other.vrf)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * (int) (vrf ^ (vrf >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVrfCounterTSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVrfCounterTSerializerVer13.java
new file mode 100644
index 0000000..aa4c3b1
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVrfCounterTSerializerVer13.java
@@ -0,0 +1,74 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFBsnVrfCounterT;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+
+public class OFBsnVrfCounterTSerializerVer13 {
+
+ public final static byte BSN_VRF_COUNTER_BYTES_VAL = (byte) 0x0;
+ public final static byte BSN_VRF_COUNTER_PACKETS_VAL = (byte) 0x1;
+
+ public static OFBsnVrfCounterT readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readByte());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, OFBsnVrfCounterT e) {
+ bb.writeByte(toWireValue(e));
+ }
+
+ public static void putTo(OFBsnVrfCounterT e, PrimitiveSink sink) {
+ sink.putByte(toWireValue(e));
+ }
+
+ public static OFBsnVrfCounterT ofWireValue(byte val) {
+ switch(val) {
+ case BSN_VRF_COUNTER_BYTES_VAL:
+ return OFBsnVrfCounterT.BSN_VRF_COUNTER_BYTES;
+ case BSN_VRF_COUNTER_PACKETS_VAL:
+ return OFBsnVrfCounterT.BSN_VRF_COUNTER_PACKETS;
+ default:
+ throw new IllegalArgumentException("Illegal wire value for type OFBsnVrfCounterT in version 1.3: " + val);
+ }
+ }
+
+
+ public static byte toWireValue(OFBsnVrfCounterT e) {
+ switch(e) {
+ case BSN_VRF_COUNTER_BYTES:
+ return BSN_VRF_COUNTER_BYTES_VAL;
+ case BSN_VRF_COUNTER_PACKETS:
+ return BSN_VRF_COUNTER_PACKETS_VAL;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFBsnVrfCounterT in version 1.3: " + e);
+ }
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBucketCounterVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBucketCounterVer13.java
new file mode 100644
index 0000000..4affdbd
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBucketCounterVer13.java
@@ -0,0 +1,283 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBucketCounterVer13 implements OFBucketCounter {
+ private static final Logger logger = LoggerFactory.getLogger(OFBucketCounterVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 16;
+
+ private final static U64 DEFAULT_PACKET_COUNT = U64.ZERO;
+ private final static U64 DEFAULT_BYTE_COUNT = U64.ZERO;
+
+ // OF message fields
+ private final U64 packetCount;
+ private final U64 byteCount;
+//
+ // Immutable default instance
+ final static OFBucketCounterVer13 DEFAULT = new OFBucketCounterVer13(
+ DEFAULT_PACKET_COUNT, DEFAULT_BYTE_COUNT
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBucketCounterVer13(U64 packetCount, U64 byteCount) {
+ this.packetCount = packetCount;
+ this.byteCount = byteCount;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public U64 getPacketCount() {
+ return packetCount;
+ }
+
+ @Override
+ public U64 getByteCount() {
+ return byteCount;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFBucketCounter.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBucketCounter.Builder {
+ final OFBucketCounterVer13 parentMessage;
+
+ // OF message fields
+ private boolean packetCountSet;
+ private U64 packetCount;
+ private boolean byteCountSet;
+ private U64 byteCount;
+
+ BuilderWithParent(OFBucketCounterVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public U64 getPacketCount() {
+ return packetCount;
+ }
+
+ @Override
+ public OFBucketCounter.Builder setPacketCount(U64 packetCount) {
+ this.packetCount = packetCount;
+ this.packetCountSet = true;
+ return this;
+ }
+ @Override
+ public U64 getByteCount() {
+ return byteCount;
+ }
+
+ @Override
+ public OFBucketCounter.Builder setByteCount(U64 byteCount) {
+ this.byteCount = byteCount;
+ this.byteCountSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFBucketCounter build() {
+ U64 packetCount = this.packetCountSet ? this.packetCount : parentMessage.packetCount;
+ if(packetCount == null)
+ throw new NullPointerException("Property packetCount must not be null");
+ U64 byteCount = this.byteCountSet ? this.byteCount : parentMessage.byteCount;
+ if(byteCount == null)
+ throw new NullPointerException("Property byteCount must not be null");
+
+ //
+ return new OFBucketCounterVer13(
+ packetCount,
+ byteCount
+ );
+ }
+
+ }
+
+ static class Builder implements OFBucketCounter.Builder {
+ // OF message fields
+ private boolean packetCountSet;
+ private U64 packetCount;
+ private boolean byteCountSet;
+ private U64 byteCount;
+
+ @Override
+ public U64 getPacketCount() {
+ return packetCount;
+ }
+
+ @Override
+ public OFBucketCounter.Builder setPacketCount(U64 packetCount) {
+ this.packetCount = packetCount;
+ this.packetCountSet = true;
+ return this;
+ }
+ @Override
+ public U64 getByteCount() {
+ return byteCount;
+ }
+
+ @Override
+ public OFBucketCounter.Builder setByteCount(U64 byteCount) {
+ this.byteCount = byteCount;
+ this.byteCountSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFBucketCounter build() {
+ U64 packetCount = this.packetCountSet ? this.packetCount : DEFAULT_PACKET_COUNT;
+ if(packetCount == null)
+ throw new NullPointerException("Property packetCount must not be null");
+ U64 byteCount = this.byteCountSet ? this.byteCount : DEFAULT_BYTE_COUNT;
+ if(byteCount == null)
+ throw new NullPointerException("Property byteCount must not be null");
+
+
+ return new OFBucketCounterVer13(
+ packetCount,
+ byteCount
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBucketCounter> {
+ @Override
+ public OFBucketCounter readFrom(ChannelBuffer bb) throws OFParseError {
+ U64 packetCount = U64.ofRaw(bb.readLong());
+ U64 byteCount = U64.ofRaw(bb.readLong());
+
+ OFBucketCounterVer13 bucketCounterVer13 = new OFBucketCounterVer13(
+ packetCount,
+ byteCount
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bucketCounterVer13);
+ return bucketCounterVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBucketCounterVer13Funnel FUNNEL = new OFBucketCounterVer13Funnel();
+ static class OFBucketCounterVer13Funnel implements Funnel<OFBucketCounterVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBucketCounterVer13 message, PrimitiveSink sink) {
+ message.packetCount.putTo(sink);
+ message.byteCount.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBucketCounterVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBucketCounterVer13 message) {
+ bb.writeLong(message.packetCount.getValue());
+ bb.writeLong(message.byteCount.getValue());
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBucketCounterVer13(");
+ b.append("packetCount=").append(packetCount);
+ b.append(", ");
+ b.append("byteCount=").append(byteCount);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBucketCounterVer13 other = (OFBucketCounterVer13) obj;
+
+ if (packetCount == null) {
+ if (other.packetCount != null)
+ return false;
+ } else if (!packetCount.equals(other.packetCount))
+ return false;
+ if (byteCount == null) {
+ if (other.byteCount != null)
+ return false;
+ } else if (!byteCount.equals(other.byteCount))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((packetCount == null) ? 0 : packetCount.hashCode());
+ result = prime * result + ((byteCount == null) ? 0 : byteCount.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBucketVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBucketVer13.java
new file mode 100644
index 0000000..be6456c
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFBucketVer13.java
@@ -0,0 +1,411 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFBucketVer13 implements OFBucket {
+ private static final Logger logger = LoggerFactory.getLogger(OFBucketVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 16;
+
+ private final static int DEFAULT_WEIGHT = 0x0;
+ private final static OFPort DEFAULT_WATCH_PORT = OFPort.ANY;
+ private final static OFGroup DEFAULT_WATCH_GROUP = OFGroup.ALL;
+ private final static List<OFAction> DEFAULT_ACTIONS = ImmutableList.<OFAction>of();
+
+ // OF message fields
+ private final int weight;
+ private final OFPort watchPort;
+ private final OFGroup watchGroup;
+ private final List<OFAction> actions;
+//
+ // Immutable default instance
+ final static OFBucketVer13 DEFAULT = new OFBucketVer13(
+ DEFAULT_WEIGHT, DEFAULT_WATCH_PORT, DEFAULT_WATCH_GROUP, DEFAULT_ACTIONS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFBucketVer13(int weight, OFPort watchPort, OFGroup watchGroup, List<OFAction> actions) {
+ this.weight = weight;
+ this.watchPort = watchPort;
+ this.watchGroup = watchGroup;
+ this.actions = actions;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public int getWeight() {
+ return weight;
+ }
+
+ @Override
+ public OFPort getWatchPort() {
+ return watchPort;
+ }
+
+ @Override
+ public OFGroup getWatchGroup() {
+ return watchGroup;
+ }
+
+ @Override
+ public List<OFAction> getActions() {
+ return actions;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFBucket.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFBucket.Builder {
+ final OFBucketVer13 parentMessage;
+
+ // OF message fields
+ private boolean weightSet;
+ private int weight;
+ private boolean watchPortSet;
+ private OFPort watchPort;
+ private boolean watchGroupSet;
+ private OFGroup watchGroup;
+ private boolean actionsSet;
+ private List<OFAction> actions;
+
+ BuilderWithParent(OFBucketVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public int getWeight() {
+ return weight;
+ }
+
+ @Override
+ public OFBucket.Builder setWeight(int weight) {
+ this.weight = weight;
+ this.weightSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getWatchPort() {
+ return watchPort;
+ }
+
+ @Override
+ public OFBucket.Builder setWatchPort(OFPort watchPort) {
+ this.watchPort = watchPort;
+ this.watchPortSet = true;
+ return this;
+ }
+ @Override
+ public OFGroup getWatchGroup() {
+ return watchGroup;
+ }
+
+ @Override
+ public OFBucket.Builder setWatchGroup(OFGroup watchGroup) {
+ this.watchGroup = watchGroup;
+ this.watchGroupSet = true;
+ return this;
+ }
+ @Override
+ public List<OFAction> getActions() {
+ return actions;
+ }
+
+ @Override
+ public OFBucket.Builder setActions(List<OFAction> actions) {
+ this.actions = actions;
+ this.actionsSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFBucket build() {
+ int weight = this.weightSet ? this.weight : parentMessage.weight;
+ OFPort watchPort = this.watchPortSet ? this.watchPort : parentMessage.watchPort;
+ if(watchPort == null)
+ throw new NullPointerException("Property watchPort must not be null");
+ OFGroup watchGroup = this.watchGroupSet ? this.watchGroup : parentMessage.watchGroup;
+ if(watchGroup == null)
+ throw new NullPointerException("Property watchGroup must not be null");
+ List<OFAction> actions = this.actionsSet ? this.actions : parentMessage.actions;
+ if(actions == null)
+ throw new NullPointerException("Property actions must not be null");
+
+ //
+ return new OFBucketVer13(
+ weight,
+ watchPort,
+ watchGroup,
+ actions
+ );
+ }
+
+ }
+
+ static class Builder implements OFBucket.Builder {
+ // OF message fields
+ private boolean weightSet;
+ private int weight;
+ private boolean watchPortSet;
+ private OFPort watchPort;
+ private boolean watchGroupSet;
+ private OFGroup watchGroup;
+ private boolean actionsSet;
+ private List<OFAction> actions;
+
+ @Override
+ public int getWeight() {
+ return weight;
+ }
+
+ @Override
+ public OFBucket.Builder setWeight(int weight) {
+ this.weight = weight;
+ this.weightSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getWatchPort() {
+ return watchPort;
+ }
+
+ @Override
+ public OFBucket.Builder setWatchPort(OFPort watchPort) {
+ this.watchPort = watchPort;
+ this.watchPortSet = true;
+ return this;
+ }
+ @Override
+ public OFGroup getWatchGroup() {
+ return watchGroup;
+ }
+
+ @Override
+ public OFBucket.Builder setWatchGroup(OFGroup watchGroup) {
+ this.watchGroup = watchGroup;
+ this.watchGroupSet = true;
+ return this;
+ }
+ @Override
+ public List<OFAction> getActions() {
+ return actions;
+ }
+
+ @Override
+ public OFBucket.Builder setActions(List<OFAction> actions) {
+ this.actions = actions;
+ this.actionsSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFBucket build() {
+ int weight = this.weightSet ? this.weight : DEFAULT_WEIGHT;
+ OFPort watchPort = this.watchPortSet ? this.watchPort : DEFAULT_WATCH_PORT;
+ if(watchPort == null)
+ throw new NullPointerException("Property watchPort must not be null");
+ OFGroup watchGroup = this.watchGroupSet ? this.watchGroup : DEFAULT_WATCH_GROUP;
+ if(watchGroup == null)
+ throw new NullPointerException("Property watchGroup must not be null");
+ List<OFAction> actions = this.actionsSet ? this.actions : DEFAULT_ACTIONS;
+ if(actions == null)
+ throw new NullPointerException("Property actions must not be null");
+
+
+ return new OFBucketVer13(
+ weight,
+ watchPort,
+ watchGroup,
+ actions
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFBucket> {
+ @Override
+ public OFBucket readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ int weight = U16.f(bb.readShort());
+ OFPort watchPort = OFPort.read4Bytes(bb);
+ OFGroup watchGroup = OFGroup.read4Bytes(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ List<OFAction> actions = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFActionVer13.READER);
+
+ OFBucketVer13 bucketVer13 = new OFBucketVer13(
+ weight,
+ watchPort,
+ watchGroup,
+ actions
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", bucketVer13);
+ return bucketVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFBucketVer13Funnel FUNNEL = new OFBucketVer13Funnel();
+ static class OFBucketVer13Funnel implements Funnel<OFBucketVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFBucketVer13 message, PrimitiveSink sink) {
+ // FIXME: skip funnel of length
+ sink.putInt(message.weight);
+ message.watchPort.putTo(sink);
+ message.watchGroup.putTo(sink);
+ // skip pad (4 bytes)
+ FunnelUtils.putList(message.actions, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFBucketVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFBucketVer13 message) {
+ int startIndex = bb.writerIndex();
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeShort(U16.t(message.weight));
+ message.watchPort.write4Bytes(bb);
+ message.watchGroup.write4Bytes(bb);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ ChannelUtils.writeList(bb, message.actions);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFBucketVer13(");
+ b.append("weight=").append(weight);
+ b.append(", ");
+ b.append("watchPort=").append(watchPort);
+ b.append(", ");
+ b.append("watchGroup=").append(watchGroup);
+ b.append(", ");
+ b.append("actions=").append(actions);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFBucketVer13 other = (OFBucketVer13) obj;
+
+ if( weight != other.weight)
+ return false;
+ if (watchPort == null) {
+ if (other.watchPort != null)
+ return false;
+ } else if (!watchPort.equals(other.watchPort))
+ return false;
+ if (watchGroup == null) {
+ if (other.watchGroup != null)
+ return false;
+ } else if (!watchGroup.equals(other.watchGroup))
+ return false;
+ if (actions == null) {
+ if (other.actions != null)
+ return false;
+ } else if (!actions.equals(other.actions))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + weight;
+ result = prime * result + ((watchPort == null) ? 0 : watchPort.hashCode());
+ result = prime * result + ((watchGroup == null) ? 0 : watchGroup.hashCode());
+ result = prime * result + ((actions == null) ? 0 : actions.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFCapabilitiesSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFCapabilitiesSerializerVer13.java
new file mode 100644
index 0000000..e536496
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFCapabilitiesSerializerVer13.java
@@ -0,0 +1,114 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_set_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFCapabilities;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import java.util.EnumSet;
+import java.util.Collections;
+
+
+public class OFCapabilitiesSerializerVer13 {
+
+ public final static int FLOW_STATS_VAL = 0x1;
+ public final static int TABLE_STATS_VAL = 0x2;
+ public final static int PORT_STATS_VAL = 0x4;
+ public final static int IP_REASM_VAL = 0x20;
+ public final static int QUEUE_STATS_VAL = 0x40;
+ public final static int GROUP_STATS_VAL = 0x8;
+ public final static int PORT_BLOCKED_VAL = 0x100;
+
+ public static Set<OFCapabilities> readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readInt());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, Set<OFCapabilities> set) {
+ bb.writeInt(toWireValue(set));
+ }
+
+ public static void putTo(Set<OFCapabilities> set, PrimitiveSink sink) {
+ sink.putInt(toWireValue(set));
+ }
+
+
+ public static Set<OFCapabilities> ofWireValue(int val) {
+ EnumSet<OFCapabilities> set = EnumSet.noneOf(OFCapabilities.class);
+
+ if((val & FLOW_STATS_VAL) != 0)
+ set.add(OFCapabilities.FLOW_STATS);
+ if((val & TABLE_STATS_VAL) != 0)
+ set.add(OFCapabilities.TABLE_STATS);
+ if((val & PORT_STATS_VAL) != 0)
+ set.add(OFCapabilities.PORT_STATS);
+ if((val & IP_REASM_VAL) != 0)
+ set.add(OFCapabilities.IP_REASM);
+ if((val & QUEUE_STATS_VAL) != 0)
+ set.add(OFCapabilities.QUEUE_STATS);
+ if((val & GROUP_STATS_VAL) != 0)
+ set.add(OFCapabilities.GROUP_STATS);
+ if((val & PORT_BLOCKED_VAL) != 0)
+ set.add(OFCapabilities.PORT_BLOCKED);
+ return Collections.unmodifiableSet(set);
+ }
+
+ public static int toWireValue(Set<OFCapabilities> set) {
+ int wireValue = 0;
+
+ for(OFCapabilities e: set) {
+ switch(e) {
+ case FLOW_STATS:
+ wireValue |= FLOW_STATS_VAL;
+ break;
+ case TABLE_STATS:
+ wireValue |= TABLE_STATS_VAL;
+ break;
+ case PORT_STATS:
+ wireValue |= PORT_STATS_VAL;
+ break;
+ case IP_REASM:
+ wireValue |= IP_REASM_VAL;
+ break;
+ case QUEUE_STATS:
+ wireValue |= QUEUE_STATS_VAL;
+ break;
+ case GROUP_STATS:
+ wireValue |= GROUP_STATS_VAL;
+ break;
+ case PORT_BLOCKED:
+ wireValue |= PORT_BLOCKED_VAL;
+ break;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFCapabilities in version 1.3: " + e);
+ }
+ }
+ return wireValue;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFConfigFlagsSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFConfigFlagsSerializerVer13.java
new file mode 100644
index 0000000..a1f3eb9
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFConfigFlagsSerializerVer13.java
@@ -0,0 +1,91 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_set_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFConfigFlags;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import java.util.EnumSet;
+import java.util.Collections;
+
+
+public class OFConfigFlagsSerializerVer13 {
+
+ public final static short FRAG_NORMAL_VAL = (short) 0x0;
+ public final static short FRAG_DROP_VAL = (short) 0x1;
+ public final static short FRAG_REASM_VAL = (short) 0x2;
+ public final static short FRAG_MASK_VAL = (short) 0x3;
+
+ public static Set<OFConfigFlags> readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readShort());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, Set<OFConfigFlags> set) {
+ bb.writeShort(toWireValue(set));
+ }
+
+ public static void putTo(Set<OFConfigFlags> set, PrimitiveSink sink) {
+ sink.putShort(toWireValue(set));
+ }
+
+
+ public static Set<OFConfigFlags> ofWireValue(short val) {
+ EnumSet<OFConfigFlags> set = EnumSet.noneOf(OFConfigFlags.class);
+
+ if((val & FRAG_MASK_VAL) == FRAG_NORMAL_VAL)
+ set.add(OFConfigFlags.FRAG_NORMAL);
+ else if((val & FRAG_MASK_VAL) == FRAG_DROP_VAL)
+ set.add(OFConfigFlags.FRAG_DROP);
+ else if((val & FRAG_MASK_VAL) == FRAG_REASM_VAL)
+ set.add(OFConfigFlags.FRAG_REASM);
+ return Collections.unmodifiableSet(set);
+ }
+
+ public static short toWireValue(Set<OFConfigFlags> set) {
+ short wireValue = 0;
+
+ for(OFConfigFlags e: set) {
+ switch(e) {
+ case FRAG_NORMAL:
+ wireValue |= FRAG_NORMAL_VAL;
+ break;
+ case FRAG_DROP:
+ wireValue |= FRAG_DROP_VAL;
+ break;
+ case FRAG_REASM:
+ wireValue |= FRAG_REASM_VAL;
+ break;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFConfigFlags in version 1.3: " + e);
+ }
+ }
+ return wireValue;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFControllerMaxLenSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFControllerMaxLenSerializerVer13.java
new file mode 100644
index 0000000..cb90254
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFControllerMaxLenSerializerVer13.java
@@ -0,0 +1,74 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFControllerMaxLen;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+
+public class OFControllerMaxLenSerializerVer13 {
+
+ public final static short MAX_VAL = (short) 0xffe5;
+ public final static short NO_BUFFER_VAL = (short) 0xffff;
+
+ public static OFControllerMaxLen readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readShort());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, OFControllerMaxLen e) {
+ bb.writeShort(toWireValue(e));
+ }
+
+ public static void putTo(OFControllerMaxLen e, PrimitiveSink sink) {
+ sink.putShort(toWireValue(e));
+ }
+
+ public static OFControllerMaxLen ofWireValue(short val) {
+ switch(val) {
+ case MAX_VAL:
+ return OFControllerMaxLen.MAX;
+ case NO_BUFFER_VAL:
+ return OFControllerMaxLen.NO_BUFFER;
+ default:
+ throw new IllegalArgumentException("Illegal wire value for type OFControllerMaxLen in version 1.3: " + val);
+ }
+ }
+
+
+ public static short toWireValue(OFControllerMaxLen e) {
+ switch(e) {
+ case MAX:
+ return MAX_VAL;
+ case NO_BUFFER:
+ return NO_BUFFER_VAL;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFControllerMaxLen in version 1.3: " + e);
+ }
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFControllerRoleSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFControllerRoleSerializerVer13.java
new file mode 100644
index 0000000..6090527
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFControllerRoleSerializerVer13.java
@@ -0,0 +1,84 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFControllerRole;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+
+public class OFControllerRoleSerializerVer13 {
+
+ public final static int ROLE_NOCHANGE_VAL = 0x0;
+ public final static int ROLE_EQUAL_VAL = 0x1;
+ public final static int ROLE_MASTER_VAL = 0x2;
+ public final static int ROLE_SLAVE_VAL = 0x3;
+
+ public static OFControllerRole readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readInt());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, OFControllerRole e) {
+ bb.writeInt(toWireValue(e));
+ }
+
+ public static void putTo(OFControllerRole e, PrimitiveSink sink) {
+ sink.putInt(toWireValue(e));
+ }
+
+ public static OFControllerRole ofWireValue(int val) {
+ switch(val) {
+ case ROLE_NOCHANGE_VAL:
+ return OFControllerRole.ROLE_NOCHANGE;
+ case ROLE_EQUAL_VAL:
+ return OFControllerRole.ROLE_EQUAL;
+ case ROLE_MASTER_VAL:
+ return OFControllerRole.ROLE_MASTER;
+ case ROLE_SLAVE_VAL:
+ return OFControllerRole.ROLE_SLAVE;
+ default:
+ throw new IllegalArgumentException("Illegal wire value for type OFControllerRole in version 1.3: " + val);
+ }
+ }
+
+
+ public static int toWireValue(OFControllerRole e) {
+ switch(e) {
+ case ROLE_NOCHANGE:
+ return ROLE_NOCHANGE_VAL;
+ case ROLE_EQUAL:
+ return ROLE_EQUAL_VAL;
+ case ROLE_MASTER:
+ return ROLE_MASTER_VAL;
+ case ROLE_SLAVE:
+ return ROLE_SLAVE_VAL;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFControllerRole in version 1.3: " + e);
+ }
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFDescStatsReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFDescStatsReplyVer13.java
new file mode 100644
index 0000000..4343d37
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFDescStatsReplyVer13.java
@@ -0,0 +1,621 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFDescStatsReplyVer13 implements OFDescStatsReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFDescStatsReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 1072;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsReplyFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsReplyFlags>of();
+ private final static String DEFAULT_MFR_DESC = "";
+ private final static String DEFAULT_HW_DESC = "";
+ private final static String DEFAULT_SW_DESC = "";
+ private final static String DEFAULT_SERIAL_NUM = "";
+ private final static String DEFAULT_DP_DESC = "";
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsReplyFlags> flags;
+ private final String mfrDesc;
+ private final String hwDesc;
+ private final String swDesc;
+ private final String serialNum;
+ private final String dpDesc;
+//
+ // Immutable default instance
+ final static OFDescStatsReplyVer13 DEFAULT = new OFDescStatsReplyVer13(
+ DEFAULT_XID, DEFAULT_FLAGS, DEFAULT_MFR_DESC, DEFAULT_HW_DESC, DEFAULT_SW_DESC, DEFAULT_SERIAL_NUM, DEFAULT_DP_DESC
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFDescStatsReplyVer13(long xid, Set<OFStatsReplyFlags> flags, String mfrDesc, String hwDesc, String swDesc, String serialNum, String dpDesc) {
+ this.xid = xid;
+ this.flags = flags;
+ this.mfrDesc = mfrDesc;
+ this.hwDesc = hwDesc;
+ this.swDesc = swDesc;
+ this.serialNum = serialNum;
+ this.dpDesc = dpDesc;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.DESC;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public String getMfrDesc() {
+ return mfrDesc;
+ }
+
+ @Override
+ public String getHwDesc() {
+ return hwDesc;
+ }
+
+ @Override
+ public String getSwDesc() {
+ return swDesc;
+ }
+
+ @Override
+ public String getSerialNum() {
+ return serialNum;
+ }
+
+ @Override
+ public String getDpDesc() {
+ return dpDesc;
+ }
+
+
+
+ public OFDescStatsReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFDescStatsReply.Builder {
+ final OFDescStatsReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean mfrDescSet;
+ private String mfrDesc;
+ private boolean hwDescSet;
+ private String hwDesc;
+ private boolean swDescSet;
+ private String swDesc;
+ private boolean serialNumSet;
+ private String serialNum;
+ private boolean dpDescSet;
+ private String dpDesc;
+
+ BuilderWithParent(OFDescStatsReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFDescStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.DESC;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFDescStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public String getMfrDesc() {
+ return mfrDesc;
+ }
+
+ @Override
+ public OFDescStatsReply.Builder setMfrDesc(String mfrDesc) {
+ this.mfrDesc = mfrDesc;
+ this.mfrDescSet = true;
+ return this;
+ }
+ @Override
+ public String getHwDesc() {
+ return hwDesc;
+ }
+
+ @Override
+ public OFDescStatsReply.Builder setHwDesc(String hwDesc) {
+ this.hwDesc = hwDesc;
+ this.hwDescSet = true;
+ return this;
+ }
+ @Override
+ public String getSwDesc() {
+ return swDesc;
+ }
+
+ @Override
+ public OFDescStatsReply.Builder setSwDesc(String swDesc) {
+ this.swDesc = swDesc;
+ this.swDescSet = true;
+ return this;
+ }
+ @Override
+ public String getSerialNum() {
+ return serialNum;
+ }
+
+ @Override
+ public OFDescStatsReply.Builder setSerialNum(String serialNum) {
+ this.serialNum = serialNum;
+ this.serialNumSet = true;
+ return this;
+ }
+ @Override
+ public String getDpDesc() {
+ return dpDesc;
+ }
+
+ @Override
+ public OFDescStatsReply.Builder setDpDesc(String dpDesc) {
+ this.dpDesc = dpDesc;
+ this.dpDescSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFDescStatsReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ String mfrDesc = this.mfrDescSet ? this.mfrDesc : parentMessage.mfrDesc;
+ if(mfrDesc == null)
+ throw new NullPointerException("Property mfrDesc must not be null");
+ String hwDesc = this.hwDescSet ? this.hwDesc : parentMessage.hwDesc;
+ if(hwDesc == null)
+ throw new NullPointerException("Property hwDesc must not be null");
+ String swDesc = this.swDescSet ? this.swDesc : parentMessage.swDesc;
+ if(swDesc == null)
+ throw new NullPointerException("Property swDesc must not be null");
+ String serialNum = this.serialNumSet ? this.serialNum : parentMessage.serialNum;
+ if(serialNum == null)
+ throw new NullPointerException("Property serialNum must not be null");
+ String dpDesc = this.dpDescSet ? this.dpDesc : parentMessage.dpDesc;
+ if(dpDesc == null)
+ throw new NullPointerException("Property dpDesc must not be null");
+
+ //
+ return new OFDescStatsReplyVer13(
+ xid,
+ flags,
+ mfrDesc,
+ hwDesc,
+ swDesc,
+ serialNum,
+ dpDesc
+ );
+ }
+
+ }
+
+ static class Builder implements OFDescStatsReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean mfrDescSet;
+ private String mfrDesc;
+ private boolean hwDescSet;
+ private String hwDesc;
+ private boolean swDescSet;
+ private String swDesc;
+ private boolean serialNumSet;
+ private String serialNum;
+ private boolean dpDescSet;
+ private String dpDesc;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFDescStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.DESC;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFDescStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public String getMfrDesc() {
+ return mfrDesc;
+ }
+
+ @Override
+ public OFDescStatsReply.Builder setMfrDesc(String mfrDesc) {
+ this.mfrDesc = mfrDesc;
+ this.mfrDescSet = true;
+ return this;
+ }
+ @Override
+ public String getHwDesc() {
+ return hwDesc;
+ }
+
+ @Override
+ public OFDescStatsReply.Builder setHwDesc(String hwDesc) {
+ this.hwDesc = hwDesc;
+ this.hwDescSet = true;
+ return this;
+ }
+ @Override
+ public String getSwDesc() {
+ return swDesc;
+ }
+
+ @Override
+ public OFDescStatsReply.Builder setSwDesc(String swDesc) {
+ this.swDesc = swDesc;
+ this.swDescSet = true;
+ return this;
+ }
+ @Override
+ public String getSerialNum() {
+ return serialNum;
+ }
+
+ @Override
+ public OFDescStatsReply.Builder setSerialNum(String serialNum) {
+ this.serialNum = serialNum;
+ this.serialNumSet = true;
+ return this;
+ }
+ @Override
+ public String getDpDesc() {
+ return dpDesc;
+ }
+
+ @Override
+ public OFDescStatsReply.Builder setDpDesc(String dpDesc) {
+ this.dpDesc = dpDesc;
+ this.dpDescSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFDescStatsReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ String mfrDesc = this.mfrDescSet ? this.mfrDesc : DEFAULT_MFR_DESC;
+ if(mfrDesc == null)
+ throw new NullPointerException("Property mfrDesc must not be null");
+ String hwDesc = this.hwDescSet ? this.hwDesc : DEFAULT_HW_DESC;
+ if(hwDesc == null)
+ throw new NullPointerException("Property hwDesc must not be null");
+ String swDesc = this.swDescSet ? this.swDesc : DEFAULT_SW_DESC;
+ if(swDesc == null)
+ throw new NullPointerException("Property swDesc must not be null");
+ String serialNum = this.serialNumSet ? this.serialNum : DEFAULT_SERIAL_NUM;
+ if(serialNum == null)
+ throw new NullPointerException("Property serialNum must not be null");
+ String dpDesc = this.dpDescSet ? this.dpDesc : DEFAULT_DP_DESC;
+ if(dpDesc == null)
+ throw new NullPointerException("Property dpDesc must not be null");
+
+
+ return new OFDescStatsReplyVer13(
+ xid,
+ flags,
+ mfrDesc,
+ hwDesc,
+ swDesc,
+ serialNum,
+ dpDesc
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFDescStatsReply> {
+ @Override
+ public OFDescStatsReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 19
+ byte type = bb.readByte();
+ if(type != (byte) 0x13)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REPLY(19), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 1072)
+ throw new OFParseError("Wrong length: Expected=1072(1072), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 0
+ short statsType = bb.readShort();
+ if(statsType != (short) 0x0)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.DESC(0), got="+statsType);
+ Set<OFStatsReplyFlags> flags = OFStatsReplyFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ String mfrDesc = ChannelUtils.readFixedLengthString(bb, 256);
+ String hwDesc = ChannelUtils.readFixedLengthString(bb, 256);
+ String swDesc = ChannelUtils.readFixedLengthString(bb, 256);
+ String serialNum = ChannelUtils.readFixedLengthString(bb, 32);
+ String dpDesc = ChannelUtils.readFixedLengthString(bb, 256);
+
+ OFDescStatsReplyVer13 descStatsReplyVer13 = new OFDescStatsReplyVer13(
+ xid,
+ flags,
+ mfrDesc,
+ hwDesc,
+ swDesc,
+ serialNum,
+ dpDesc
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", descStatsReplyVer13);
+ return descStatsReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFDescStatsReplyVer13Funnel FUNNEL = new OFDescStatsReplyVer13Funnel();
+ static class OFDescStatsReplyVer13Funnel implements Funnel<OFDescStatsReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFDescStatsReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 19
+ sink.putByte((byte) 0x13);
+ // fixed value property length = 1072
+ sink.putShort((short) 0x430);
+ sink.putLong(message.xid);
+ // fixed value property statsType = 0
+ sink.putShort((short) 0x0);
+ OFStatsReplyFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ sink.putUnencodedChars(message.mfrDesc);
+ sink.putUnencodedChars(message.hwDesc);
+ sink.putUnencodedChars(message.swDesc);
+ sink.putUnencodedChars(message.serialNum);
+ sink.putUnencodedChars(message.dpDesc);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFDescStatsReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFDescStatsReplyVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 19
+ bb.writeByte((byte) 0x13);
+ // fixed value property length = 1072
+ bb.writeShort((short) 0x430);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 0
+ bb.writeShort((short) 0x0);
+ OFStatsReplyFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ ChannelUtils.writeFixedLengthString(bb, message.mfrDesc, 256);
+ ChannelUtils.writeFixedLengthString(bb, message.hwDesc, 256);
+ ChannelUtils.writeFixedLengthString(bb, message.swDesc, 256);
+ ChannelUtils.writeFixedLengthString(bb, message.serialNum, 32);
+ ChannelUtils.writeFixedLengthString(bb, message.dpDesc, 256);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFDescStatsReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("mfrDesc=").append(mfrDesc);
+ b.append(", ");
+ b.append("hwDesc=").append(hwDesc);
+ b.append(", ");
+ b.append("swDesc=").append(swDesc);
+ b.append(", ");
+ b.append("serialNum=").append(serialNum);
+ b.append(", ");
+ b.append("dpDesc=").append(dpDesc);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFDescStatsReplyVer13 other = (OFDescStatsReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if (mfrDesc == null) {
+ if (other.mfrDesc != null)
+ return false;
+ } else if (!mfrDesc.equals(other.mfrDesc))
+ return false;
+ if (hwDesc == null) {
+ if (other.hwDesc != null)
+ return false;
+ } else if (!hwDesc.equals(other.hwDesc))
+ return false;
+ if (swDesc == null) {
+ if (other.swDesc != null)
+ return false;
+ } else if (!swDesc.equals(other.swDesc))
+ return false;
+ if (serialNum == null) {
+ if (other.serialNum != null)
+ return false;
+ } else if (!serialNum.equals(other.serialNum))
+ return false;
+ if (dpDesc == null) {
+ if (other.dpDesc != null)
+ return false;
+ } else if (!dpDesc.equals(other.dpDesc))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * result + ((mfrDesc == null) ? 0 : mfrDesc.hashCode());
+ result = prime * result + ((hwDesc == null) ? 0 : hwDesc.hashCode());
+ result = prime * result + ((swDesc == null) ? 0 : swDesc.hashCode());
+ result = prime * result + ((serialNum == null) ? 0 : serialNum.hashCode());
+ result = prime * result + ((dpDesc == null) ? 0 : dpDesc.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFDescStatsRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFDescStatsRequestVer13.java
new file mode 100644
index 0000000..687cb8b
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFDescStatsRequestVer13.java
@@ -0,0 +1,351 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFDescStatsRequestVer13 implements OFDescStatsRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFDescStatsRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 16;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsRequestFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsRequestFlags>of();
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsRequestFlags> flags;
+//
+ // Immutable default instance
+ final static OFDescStatsRequestVer13 DEFAULT = new OFDescStatsRequestVer13(
+ DEFAULT_XID, DEFAULT_FLAGS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFDescStatsRequestVer13(long xid, Set<OFStatsRequestFlags> flags) {
+ this.xid = xid;
+ this.flags = flags;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.DESC;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+
+
+ public OFDescStatsRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFDescStatsRequest.Builder {
+ final OFDescStatsRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+
+ BuilderWithParent(OFDescStatsRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFDescStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.DESC;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFDescStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFDescStatsRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+
+ //
+ return new OFDescStatsRequestVer13(
+ xid,
+ flags
+ );
+ }
+
+ }
+
+ static class Builder implements OFDescStatsRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFDescStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.DESC;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFDescStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFDescStatsRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+
+
+ return new OFDescStatsRequestVer13(
+ xid,
+ flags
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFDescStatsRequest> {
+ @Override
+ public OFDescStatsRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 18
+ byte type = bb.readByte();
+ if(type != (byte) 0x12)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REQUEST(18), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 16)
+ throw new OFParseError("Wrong length: Expected=16(16), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 0
+ short statsType = bb.readShort();
+ if(statsType != (short) 0x0)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.DESC(0), got="+statsType);
+ Set<OFStatsRequestFlags> flags = OFStatsRequestFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+
+ OFDescStatsRequestVer13 descStatsRequestVer13 = new OFDescStatsRequestVer13(
+ xid,
+ flags
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", descStatsRequestVer13);
+ return descStatsRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFDescStatsRequestVer13Funnel FUNNEL = new OFDescStatsRequestVer13Funnel();
+ static class OFDescStatsRequestVer13Funnel implements Funnel<OFDescStatsRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFDescStatsRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 18
+ sink.putByte((byte) 0x12);
+ // fixed value property length = 16
+ sink.putShort((short) 0x10);
+ sink.putLong(message.xid);
+ // fixed value property statsType = 0
+ sink.putShort((short) 0x0);
+ OFStatsRequestFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFDescStatsRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFDescStatsRequestVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 18
+ bb.writeByte((byte) 0x12);
+ // fixed value property length = 16
+ bb.writeShort((short) 0x10);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 0
+ bb.writeShort((short) 0x0);
+ OFStatsRequestFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFDescStatsRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFDescStatsRequestVer13 other = (OFDescStatsRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFEchoReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFEchoReplyVer13.java
new file mode 100644
index 0000000..76d065c
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFEchoReplyVer13.java
@@ -0,0 +1,325 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+import java.util.Arrays;
+
+class OFEchoReplyVer13 implements OFEchoReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFEchoReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 8;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static byte[] DEFAULT_DATA = new byte[0];
+
+ // OF message fields
+ private final long xid;
+ private final byte[] data;
+//
+ // Immutable default instance
+ final static OFEchoReplyVer13 DEFAULT = new OFEchoReplyVer13(
+ DEFAULT_XID, DEFAULT_DATA
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFEchoReplyVer13(long xid, byte[] data) {
+ this.xid = xid;
+ this.data = data;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ECHO_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public byte[] getData() {
+ return data;
+ }
+
+
+
+ public OFEchoReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFEchoReply.Builder {
+ final OFEchoReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean dataSet;
+ private byte[] data;
+
+ BuilderWithParent(OFEchoReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ECHO_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFEchoReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public byte[] getData() {
+ return data;
+ }
+
+ @Override
+ public OFEchoReply.Builder setData(byte[] data) {
+ this.data = data;
+ this.dataSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFEchoReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ byte[] data = this.dataSet ? this.data : parentMessage.data;
+ if(data == null)
+ throw new NullPointerException("Property data must not be null");
+
+ //
+ return new OFEchoReplyVer13(
+ xid,
+ data
+ );
+ }
+
+ }
+
+ static class Builder implements OFEchoReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean dataSet;
+ private byte[] data;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ECHO_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFEchoReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public byte[] getData() {
+ return data;
+ }
+
+ @Override
+ public OFEchoReply.Builder setData(byte[] data) {
+ this.data = data;
+ this.dataSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFEchoReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ byte[] data = this.dataSet ? this.data : DEFAULT_DATA;
+ if(data == null)
+ throw new NullPointerException("Property data must not be null");
+
+
+ return new OFEchoReplyVer13(
+ xid,
+ data
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFEchoReply> {
+ @Override
+ public OFEchoReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 3
+ byte type = bb.readByte();
+ if(type != (byte) 0x3)
+ throw new OFParseError("Wrong type: Expected=OFType.ECHO_REPLY(3), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ byte[] data = ChannelUtils.readBytes(bb, length - (bb.readerIndex() - start));
+
+ OFEchoReplyVer13 echoReplyVer13 = new OFEchoReplyVer13(
+ xid,
+ data
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", echoReplyVer13);
+ return echoReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFEchoReplyVer13Funnel FUNNEL = new OFEchoReplyVer13Funnel();
+ static class OFEchoReplyVer13Funnel implements Funnel<OFEchoReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFEchoReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 3
+ sink.putByte((byte) 0x3);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ sink.putBytes(message.data);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFEchoReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFEchoReplyVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 3
+ bb.writeByte((byte) 0x3);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ bb.writeBytes(message.data);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFEchoReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("data=").append(Arrays.toString(data));
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFEchoReplyVer13 other = (OFEchoReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (!Arrays.equals(data, other.data))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + Arrays.hashCode(data);
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFEchoRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFEchoRequestVer13.java
new file mode 100644
index 0000000..19e2679
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFEchoRequestVer13.java
@@ -0,0 +1,325 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+import java.util.Arrays;
+
+class OFEchoRequestVer13 implements OFEchoRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFEchoRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 8;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static byte[] DEFAULT_DATA = new byte[0];
+
+ // OF message fields
+ private final long xid;
+ private final byte[] data;
+//
+ // Immutable default instance
+ final static OFEchoRequestVer13 DEFAULT = new OFEchoRequestVer13(
+ DEFAULT_XID, DEFAULT_DATA
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFEchoRequestVer13(long xid, byte[] data) {
+ this.xid = xid;
+ this.data = data;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ECHO_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public byte[] getData() {
+ return data;
+ }
+
+
+
+ public OFEchoRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFEchoRequest.Builder {
+ final OFEchoRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean dataSet;
+ private byte[] data;
+
+ BuilderWithParent(OFEchoRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ECHO_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFEchoRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public byte[] getData() {
+ return data;
+ }
+
+ @Override
+ public OFEchoRequest.Builder setData(byte[] data) {
+ this.data = data;
+ this.dataSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFEchoRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ byte[] data = this.dataSet ? this.data : parentMessage.data;
+ if(data == null)
+ throw new NullPointerException("Property data must not be null");
+
+ //
+ return new OFEchoRequestVer13(
+ xid,
+ data
+ );
+ }
+
+ }
+
+ static class Builder implements OFEchoRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean dataSet;
+ private byte[] data;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ECHO_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFEchoRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public byte[] getData() {
+ return data;
+ }
+
+ @Override
+ public OFEchoRequest.Builder setData(byte[] data) {
+ this.data = data;
+ this.dataSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFEchoRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ byte[] data = this.dataSet ? this.data : DEFAULT_DATA;
+ if(data == null)
+ throw new NullPointerException("Property data must not be null");
+
+
+ return new OFEchoRequestVer13(
+ xid,
+ data
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFEchoRequest> {
+ @Override
+ public OFEchoRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 2
+ byte type = bb.readByte();
+ if(type != (byte) 0x2)
+ throw new OFParseError("Wrong type: Expected=OFType.ECHO_REQUEST(2), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ byte[] data = ChannelUtils.readBytes(bb, length - (bb.readerIndex() - start));
+
+ OFEchoRequestVer13 echoRequestVer13 = new OFEchoRequestVer13(
+ xid,
+ data
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", echoRequestVer13);
+ return echoRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFEchoRequestVer13Funnel FUNNEL = new OFEchoRequestVer13Funnel();
+ static class OFEchoRequestVer13Funnel implements Funnel<OFEchoRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFEchoRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 2
+ sink.putByte((byte) 0x2);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ sink.putBytes(message.data);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFEchoRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFEchoRequestVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 2
+ bb.writeByte((byte) 0x2);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ bb.writeBytes(message.data);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFEchoRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("data=").append(Arrays.toString(data));
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFEchoRequestVer13 other = (OFEchoRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (!Arrays.equals(data, other.data))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + Arrays.hashCode(data);
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFErrorMsgVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFErrorMsgVer13.java
new file mode 100644
index 0000000..665ecf4
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFErrorMsgVer13.java
@@ -0,0 +1,107 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_virtual_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.jboss.netty.buffer.ChannelBuffer;
+
+abstract class OFErrorMsgVer13 {
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 10;
+
+
+ public final static OFErrorMsgVer13.Reader READER = new Reader();
+
+ static class Reader implements OFMessageReader<OFErrorMsg> {
+ @Override
+ public OFErrorMsg readFrom(ChannelBuffer bb) throws OFParseError {
+ if(bb.readableBytes() < MINIMUM_LENGTH)
+ return null;
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 1
+ byte type = bb.readByte();
+ if(type != (byte) 0x1)
+ throw new OFParseError("Wrong type: Expected=OFType.ERROR(1), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ U32.f(bb.readInt());
+ short errType = bb.readShort();
+ bb.readerIndex(start);
+ switch(errType) {
+ case (short) 0x2:
+ // discriminator value OFErrorType.BAD_ACTION=2 for class OFBadActionErrorMsgVer13
+ return OFBadActionErrorMsgVer13.READER.readFrom(bb);
+ case (short) 0x1:
+ // discriminator value OFErrorType.BAD_REQUEST=1 for class OFBadRequestErrorMsgVer13
+ return OFBadRequestErrorMsgVer13.READER.readFrom(bb);
+ case (short) 0x5:
+ // discriminator value OFErrorType.FLOW_MOD_FAILED=5 for class OFFlowModFailedErrorMsgVer13
+ return OFFlowModFailedErrorMsgVer13.READER.readFrom(bb);
+ case (short) 0x0:
+ // discriminator value OFErrorType.HELLO_FAILED=0 for class OFHelloFailedErrorMsgVer13
+ return OFHelloFailedErrorMsgVer13.READER.readFrom(bb);
+ case (short) 0x7:
+ // discriminator value OFErrorType.PORT_MOD_FAILED=7 for class OFPortModFailedErrorMsgVer13
+ return OFPortModFailedErrorMsgVer13.READER.readFrom(bb);
+ case (short) 0x9:
+ // discriminator value OFErrorType.QUEUE_OP_FAILED=9 for class OFQueueOpFailedErrorMsgVer13
+ return OFQueueOpFailedErrorMsgVer13.READER.readFrom(bb);
+ case (short) 0x3:
+ // discriminator value OFErrorType.BAD_INSTRUCTION=3 for class OFBadInstructionErrorMsgVer13
+ return OFBadInstructionErrorMsgVer13.READER.readFrom(bb);
+ case (short) 0x4:
+ // discriminator value OFErrorType.BAD_MATCH=4 for class OFBadMatchErrorMsgVer13
+ return OFBadMatchErrorMsgVer13.READER.readFrom(bb);
+ case (short) 0x6:
+ // discriminator value OFErrorType.GROUP_MOD_FAILED=6 for class OFGroupModFailedErrorMsgVer13
+ return OFGroupModFailedErrorMsgVer13.READER.readFrom(bb);
+ case (short) 0xa:
+ // discriminator value OFErrorType.SWITCH_CONFIG_FAILED=10 for class OFSwitchConfigFailedErrorMsgVer13
+ return OFSwitchConfigFailedErrorMsgVer13.READER.readFrom(bb);
+ case (short) 0x8:
+ // discriminator value OFErrorType.TABLE_MOD_FAILED=8 for class OFTableModFailedErrorMsgVer13
+ return OFTableModFailedErrorMsgVer13.READER.readFrom(bb);
+ case (short) 0xffff:
+ // discriminator value OFErrorType.EXPERIMENTER=65535 for class OFExperimenterErrorMsgVer13
+ return OFExperimenterErrorMsgVer13.READER.readFrom(bb);
+ case (short) 0xb:
+ // discriminator value OFErrorType.ROLE_REQUEST_FAILED=11 for class OFRoleRequestFailedErrorMsgVer13
+ return OFRoleRequestFailedErrorMsgVer13.READER.readFrom(bb);
+ case (short) 0xc:
+ // discriminator value OFErrorType.METER_MOD_FAILED=12 for class OFMeterModFailedErrorMsgVer13
+ return OFMeterModFailedErrorMsgVer13.READER.readFrom(bb);
+ case (short) 0xd:
+ // discriminator value OFErrorType.TABLE_FEATURES_FAILED=13 for class OFTableFeaturesFailedErrorMsgVer13
+ return OFTableFeaturesFailedErrorMsgVer13.READER.readFrom(bb);
+ default:
+ throw new OFParseError("Unknown value for discriminator errType of class OFErrorMsgVer13: " + errType);
+ }
+ }
+ }
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFErrorMsgsVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFErrorMsgsVer13.java
new file mode 100644
index 0000000..120b829
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFErrorMsgsVer13.java
@@ -0,0 +1,106 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_factory_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+
+
+public class OFErrorMsgsVer13 implements OFErrorMsgs {
+ public final static OFErrorMsgsVer13 INSTANCE = new OFErrorMsgsVer13();
+
+ private final XidGenerator xidGenerator = XidGenerators.global();
+
+
+
+ public OFBadActionErrorMsg.Builder buildBadActionErrorMsg() {
+ return new OFBadActionErrorMsgVer13.Builder().setXid(nextXid());
+ }
+
+ public OFBadRequestErrorMsg.Builder buildBadRequestErrorMsg() {
+ return new OFBadRequestErrorMsgVer13.Builder().setXid(nextXid());
+ }
+
+ public OFFlowModFailedErrorMsg.Builder buildFlowModFailedErrorMsg() {
+ return new OFFlowModFailedErrorMsgVer13.Builder().setXid(nextXid());
+ }
+
+ public OFHelloFailedErrorMsg.Builder buildHelloFailedErrorMsg() {
+ return new OFHelloFailedErrorMsgVer13.Builder().setXid(nextXid());
+ }
+
+ public OFPortModFailedErrorMsg.Builder buildPortModFailedErrorMsg() {
+ return new OFPortModFailedErrorMsgVer13.Builder().setXid(nextXid());
+ }
+
+ public OFQueueOpFailedErrorMsg.Builder buildQueueOpFailedErrorMsg() {
+ return new OFQueueOpFailedErrorMsgVer13.Builder().setXid(nextXid());
+ }
+
+ public OFBadInstructionErrorMsg.Builder buildBadInstructionErrorMsg() {
+ return new OFBadInstructionErrorMsgVer13.Builder().setXid(nextXid());
+ }
+
+ public OFBadMatchErrorMsg.Builder buildBadMatchErrorMsg() {
+ return new OFBadMatchErrorMsgVer13.Builder().setXid(nextXid());
+ }
+
+ public OFGroupModFailedErrorMsg.Builder buildGroupModFailedErrorMsg() {
+ return new OFGroupModFailedErrorMsgVer13.Builder().setXid(nextXid());
+ }
+
+ public OFSwitchConfigFailedErrorMsg.Builder buildSwitchConfigFailedErrorMsg() {
+ return new OFSwitchConfigFailedErrorMsgVer13.Builder().setXid(nextXid());
+ }
+
+ public OFTableModFailedErrorMsg.Builder buildTableModFailedErrorMsg() {
+ return new OFTableModFailedErrorMsgVer13.Builder().setXid(nextXid());
+ }
+
+ public OFExperimenterErrorMsg.Builder buildExperimenterErrorMsg() {
+ return new OFExperimenterErrorMsgVer13.Builder().setXid(nextXid());
+ }
+
+ public OFRoleRequestFailedErrorMsg.Builder buildRoleRequestFailedErrorMsg() {
+ return new OFRoleRequestFailedErrorMsgVer13.Builder().setXid(nextXid());
+ }
+
+ public OFMeterModFailedErrorMsg.Builder buildMeterModFailedErrorMsg() {
+ return new OFMeterModFailedErrorMsgVer13.Builder().setXid(nextXid());
+ }
+
+ public OFTableFeaturesFailedErrorMsg.Builder buildTableFeaturesFailedErrorMsg() {
+ return new OFTableFeaturesFailedErrorMsgVer13.Builder().setXid(nextXid());
+ }
+
+ public OFMessageReader<OFErrorMsg> getReader() {
+ return OFErrorMsgVer13.READER;
+ }
+
+ public long nextXid() {
+ return xidGenerator.nextXid();
+ }
+
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFErrorTypeSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFErrorTypeSerializerVer13.java
new file mode 100644
index 0000000..9b9a1ae
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFErrorTypeSerializerVer13.java
@@ -0,0 +1,139 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFErrorType;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+
+public class OFErrorTypeSerializerVer13 {
+
+ public final static short HELLO_FAILED_VAL = (short) 0x0;
+ public final static short BAD_REQUEST_VAL = (short) 0x1;
+ public final static short BAD_ACTION_VAL = (short) 0x2;
+ public final static short BAD_INSTRUCTION_VAL = (short) 0x3;
+ public final static short BAD_MATCH_VAL = (short) 0x4;
+ public final static short FLOW_MOD_FAILED_VAL = (short) 0x5;
+ public final static short GROUP_MOD_FAILED_VAL = (short) 0x6;
+ public final static short PORT_MOD_FAILED_VAL = (short) 0x7;
+ public final static short TABLE_MOD_FAILED_VAL = (short) 0x8;
+ public final static short QUEUE_OP_FAILED_VAL = (short) 0x9;
+ public final static short SWITCH_CONFIG_FAILED_VAL = (short) 0xa;
+ public final static short ROLE_REQUEST_FAILED_VAL = (short) 0xb;
+ public final static short METER_MOD_FAILED_VAL = (short) 0xc;
+ public final static short TABLE_FEATURES_FAILED_VAL = (short) 0xd;
+ public final static short EXPERIMENTER_VAL = (short) 0xffff;
+
+ public static OFErrorType readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readShort());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, OFErrorType e) {
+ bb.writeShort(toWireValue(e));
+ }
+
+ public static void putTo(OFErrorType e, PrimitiveSink sink) {
+ sink.putShort(toWireValue(e));
+ }
+
+ public static OFErrorType ofWireValue(short val) {
+ switch(val) {
+ case HELLO_FAILED_VAL:
+ return OFErrorType.HELLO_FAILED;
+ case BAD_REQUEST_VAL:
+ return OFErrorType.BAD_REQUEST;
+ case BAD_ACTION_VAL:
+ return OFErrorType.BAD_ACTION;
+ case BAD_INSTRUCTION_VAL:
+ return OFErrorType.BAD_INSTRUCTION;
+ case BAD_MATCH_VAL:
+ return OFErrorType.BAD_MATCH;
+ case FLOW_MOD_FAILED_VAL:
+ return OFErrorType.FLOW_MOD_FAILED;
+ case GROUP_MOD_FAILED_VAL:
+ return OFErrorType.GROUP_MOD_FAILED;
+ case PORT_MOD_FAILED_VAL:
+ return OFErrorType.PORT_MOD_FAILED;
+ case TABLE_MOD_FAILED_VAL:
+ return OFErrorType.TABLE_MOD_FAILED;
+ case QUEUE_OP_FAILED_VAL:
+ return OFErrorType.QUEUE_OP_FAILED;
+ case SWITCH_CONFIG_FAILED_VAL:
+ return OFErrorType.SWITCH_CONFIG_FAILED;
+ case ROLE_REQUEST_FAILED_VAL:
+ return OFErrorType.ROLE_REQUEST_FAILED;
+ case METER_MOD_FAILED_VAL:
+ return OFErrorType.METER_MOD_FAILED;
+ case TABLE_FEATURES_FAILED_VAL:
+ return OFErrorType.TABLE_FEATURES_FAILED;
+ case EXPERIMENTER_VAL:
+ return OFErrorType.EXPERIMENTER;
+ default:
+ throw new IllegalArgumentException("Illegal wire value for type OFErrorType in version 1.3: " + val);
+ }
+ }
+
+
+ public static short toWireValue(OFErrorType e) {
+ switch(e) {
+ case HELLO_FAILED:
+ return HELLO_FAILED_VAL;
+ case BAD_REQUEST:
+ return BAD_REQUEST_VAL;
+ case BAD_ACTION:
+ return BAD_ACTION_VAL;
+ case BAD_INSTRUCTION:
+ return BAD_INSTRUCTION_VAL;
+ case BAD_MATCH:
+ return BAD_MATCH_VAL;
+ case FLOW_MOD_FAILED:
+ return FLOW_MOD_FAILED_VAL;
+ case GROUP_MOD_FAILED:
+ return GROUP_MOD_FAILED_VAL;
+ case PORT_MOD_FAILED:
+ return PORT_MOD_FAILED_VAL;
+ case TABLE_MOD_FAILED:
+ return TABLE_MOD_FAILED_VAL;
+ case QUEUE_OP_FAILED:
+ return QUEUE_OP_FAILED_VAL;
+ case SWITCH_CONFIG_FAILED:
+ return SWITCH_CONFIG_FAILED_VAL;
+ case ROLE_REQUEST_FAILED:
+ return ROLE_REQUEST_FAILED_VAL;
+ case METER_MOD_FAILED:
+ return METER_MOD_FAILED_VAL;
+ case TABLE_FEATURES_FAILED:
+ return TABLE_FEATURES_FAILED_VAL;
+ case EXPERIMENTER:
+ return EXPERIMENTER_VAL;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFErrorType in version 1.3: " + e);
+ }
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFExperimenterErrorMsgVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFExperimenterErrorMsgVer13.java
new file mode 100644
index 0000000..4f1a25b
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFExperimenterErrorMsgVer13.java
@@ -0,0 +1,444 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFExperimenterErrorMsgVer13 implements OFExperimenterErrorMsg {
+ private static final Logger logger = LoggerFactory.getLogger(OFExperimenterErrorMsgVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 16;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static int DEFAULT_SUBTYPE = 0x0;
+ private final static long DEFAULT_EXPERIMENTER = 0x0L;
+ private final static OFErrorCauseData DEFAULT_DATA = OFErrorCauseData.NONE;
+
+ // OF message fields
+ private final long xid;
+ private final int subtype;
+ private final long experimenter;
+ private final OFErrorCauseData data;
+//
+ // Immutable default instance
+ final static OFExperimenterErrorMsgVer13 DEFAULT = new OFExperimenterErrorMsgVer13(
+ DEFAULT_XID, DEFAULT_SUBTYPE, DEFAULT_EXPERIMENTER, DEFAULT_DATA
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFExperimenterErrorMsgVer13(long xid, int subtype, long experimenter, OFErrorCauseData data) {
+ this.xid = xid;
+ this.subtype = subtype;
+ this.experimenter = experimenter;
+ this.data = data;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ERROR;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFErrorType getErrType() {
+ return OFErrorType.EXPERIMENTER;
+ }
+
+ @Override
+ public int getSubtype() {
+ return subtype;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return experimenter;
+ }
+
+ @Override
+ public OFErrorCauseData getData() {
+ return data;
+ }
+
+
+
+ public OFExperimenterErrorMsg.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFExperimenterErrorMsg.Builder {
+ final OFExperimenterErrorMsgVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean subtypeSet;
+ private int subtype;
+ private boolean experimenterSet;
+ private long experimenter;
+ private boolean dataSet;
+ private OFErrorCauseData data;
+
+ BuilderWithParent(OFExperimenterErrorMsgVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ERROR;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFExperimenterErrorMsg.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorType getErrType() {
+ return OFErrorType.EXPERIMENTER;
+ }
+
+ @Override
+ public int getSubtype() {
+ return subtype;
+ }
+
+ @Override
+ public OFExperimenterErrorMsg.Builder setSubtype(int subtype) {
+ this.subtype = subtype;
+ this.subtypeSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return experimenter;
+ }
+
+ @Override
+ public OFExperimenterErrorMsg.Builder setExperimenter(long experimenter) {
+ this.experimenter = experimenter;
+ this.experimenterSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorCauseData getData() {
+ return data;
+ }
+
+ @Override
+ public OFExperimenterErrorMsg.Builder setData(OFErrorCauseData data) {
+ this.data = data;
+ this.dataSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFExperimenterErrorMsg build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ int subtype = this.subtypeSet ? this.subtype : parentMessage.subtype;
+ long experimenter = this.experimenterSet ? this.experimenter : parentMessage.experimenter;
+ OFErrorCauseData data = this.dataSet ? this.data : parentMessage.data;
+ if(data == null)
+ throw new NullPointerException("Property data must not be null");
+
+ //
+ return new OFExperimenterErrorMsgVer13(
+ xid,
+ subtype,
+ experimenter,
+ data
+ );
+ }
+
+ }
+
+ static class Builder implements OFExperimenterErrorMsg.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean subtypeSet;
+ private int subtype;
+ private boolean experimenterSet;
+ private long experimenter;
+ private boolean dataSet;
+ private OFErrorCauseData data;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ERROR;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFExperimenterErrorMsg.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorType getErrType() {
+ return OFErrorType.EXPERIMENTER;
+ }
+
+ @Override
+ public int getSubtype() {
+ return subtype;
+ }
+
+ @Override
+ public OFExperimenterErrorMsg.Builder setSubtype(int subtype) {
+ this.subtype = subtype;
+ this.subtypeSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return experimenter;
+ }
+
+ @Override
+ public OFExperimenterErrorMsg.Builder setExperimenter(long experimenter) {
+ this.experimenter = experimenter;
+ this.experimenterSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorCauseData getData() {
+ return data;
+ }
+
+ @Override
+ public OFExperimenterErrorMsg.Builder setData(OFErrorCauseData data) {
+ this.data = data;
+ this.dataSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFExperimenterErrorMsg build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ int subtype = this.subtypeSet ? this.subtype : DEFAULT_SUBTYPE;
+ long experimenter = this.experimenterSet ? this.experimenter : DEFAULT_EXPERIMENTER;
+ OFErrorCauseData data = this.dataSet ? this.data : DEFAULT_DATA;
+ if(data == null)
+ throw new NullPointerException("Property data must not be null");
+
+
+ return new OFExperimenterErrorMsgVer13(
+ xid,
+ subtype,
+ experimenter,
+ data
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFExperimenterErrorMsg> {
+ @Override
+ public OFExperimenterErrorMsg readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 1
+ byte type = bb.readByte();
+ if(type != (byte) 0x1)
+ throw new OFParseError("Wrong type: Expected=OFType.ERROR(1), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property errType == 65535
+ short errType = bb.readShort();
+ if(errType != (short) 0xffff)
+ throw new OFParseError("Wrong errType: Expected=OFErrorType.EXPERIMENTER(65535), got="+errType);
+ int subtype = U16.f(bb.readShort());
+ long experimenter = U32.f(bb.readInt());
+ OFErrorCauseData data = OFErrorCauseData.read(bb, length - (bb.readerIndex() - start), OFVersion.OF_13);
+
+ OFExperimenterErrorMsgVer13 experimenterErrorMsgVer13 = new OFExperimenterErrorMsgVer13(
+ xid,
+ subtype,
+ experimenter,
+ data
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", experimenterErrorMsgVer13);
+ return experimenterErrorMsgVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFExperimenterErrorMsgVer13Funnel FUNNEL = new OFExperimenterErrorMsgVer13Funnel();
+ static class OFExperimenterErrorMsgVer13Funnel implements Funnel<OFExperimenterErrorMsgVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFExperimenterErrorMsgVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 1
+ sink.putByte((byte) 0x1);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property errType = 65535
+ sink.putShort((short) 0xffff);
+ sink.putInt(message.subtype);
+ sink.putLong(message.experimenter);
+ message.data.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFExperimenterErrorMsgVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFExperimenterErrorMsgVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 1
+ bb.writeByte((byte) 0x1);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property errType = 65535
+ bb.writeShort((short) 0xffff);
+ bb.writeShort(U16.t(message.subtype));
+ bb.writeInt(U32.t(message.experimenter));
+ message.data.writeTo(bb);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFExperimenterErrorMsgVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("subtype=").append(subtype);
+ b.append(", ");
+ b.append("experimenter=").append(experimenter);
+ b.append(", ");
+ b.append("data=").append(data);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFExperimenterErrorMsgVer13 other = (OFExperimenterErrorMsgVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if( subtype != other.subtype)
+ return false;
+ if( experimenter != other.experimenter)
+ return false;
+ if (data == null) {
+ if (other.data != null)
+ return false;
+ } else if (!data.equals(other.data))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + subtype;
+ result = prime * (int) (experimenter ^ (experimenter >>> 32));
+ result = prime * result + ((data == null) ? 0 : data.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFExperimenterStatsReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFExperimenterStatsReplyVer13.java
new file mode 100644
index 0000000..5e8a716
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFExperimenterStatsReplyVer13.java
@@ -0,0 +1,72 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_virtual_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.jboss.netty.buffer.ChannelBuffer;
+
+abstract class OFExperimenterStatsReplyVer13 {
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 24;
+
+
+ public final static OFExperimenterStatsReplyVer13.Reader READER = new Reader();
+
+ static class Reader implements OFMessageReader<OFExperimenterStatsReply> {
+ @Override
+ public OFExperimenterStatsReply readFrom(ChannelBuffer bb) throws OFParseError {
+ if(bb.readableBytes() < MINIMUM_LENGTH)
+ return null;
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 19
+ byte type = bb.readByte();
+ if(type != (byte) 0x13)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REPLY(19), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ U32.f(bb.readInt());
+ // fixed value property statsType == 65535
+ short statsType = bb.readShort();
+ if(statsType != (short) 0xffff)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.EXPERIMENTER(65535), got="+statsType);
+ OFStatsReplyFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ int experimenter = bb.readInt();
+ bb.readerIndex(start);
+ switch(experimenter) {
+ case 0x5c16c7:
+ // discriminator value 0x5c16c7L=0x5c16c7L for class OFBsnStatsReplyVer13
+ return OFBsnStatsReplyVer13.READER.readFrom(bb);
+ default:
+ throw new OFParseError("Unknown value for discriminator experimenter of class OFExperimenterStatsReplyVer13: " + experimenter);
+ }
+ }
+ }
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFExperimenterStatsRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFExperimenterStatsRequestVer13.java
new file mode 100644
index 0000000..f0d5d76
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFExperimenterStatsRequestVer13.java
@@ -0,0 +1,72 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_virtual_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.jboss.netty.buffer.ChannelBuffer;
+
+abstract class OFExperimenterStatsRequestVer13 {
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 24;
+
+
+ public final static OFExperimenterStatsRequestVer13.Reader READER = new Reader();
+
+ static class Reader implements OFMessageReader<OFExperimenterStatsRequest<?>> {
+ @Override
+ public OFExperimenterStatsRequest<?> readFrom(ChannelBuffer bb) throws OFParseError {
+ if(bb.readableBytes() < MINIMUM_LENGTH)
+ return null;
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 18
+ byte type = bb.readByte();
+ if(type != (byte) 0x12)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REQUEST(18), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ U32.f(bb.readInt());
+ // fixed value property statsType == 65535
+ short statsType = bb.readShort();
+ if(statsType != (short) 0xffff)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.EXPERIMENTER(65535), got="+statsType);
+ OFStatsRequestFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ int experimenter = bb.readInt();
+ bb.readerIndex(start);
+ switch(experimenter) {
+ case 0x5c16c7:
+ // discriminator value 0x5c16c7L=0x5c16c7L for class OFBsnStatsRequestVer13
+ return OFBsnStatsRequestVer13.READER.readFrom(bb);
+ default:
+ throw new OFParseError("Unknown value for discriminator experimenter of class OFExperimenterStatsRequestVer13: " + experimenter);
+ }
+ }
+ }
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFExperimenterVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFExperimenterVer13.java
new file mode 100644
index 0000000..8a8d50b
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFExperimenterVer13.java
@@ -0,0 +1,68 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_virtual_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.jboss.netty.buffer.ChannelBuffer;
+
+abstract class OFExperimenterVer13 {
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 16;
+
+
+ public final static OFExperimenterVer13.Reader READER = new Reader();
+
+ static class Reader implements OFMessageReader<OFExperimenter> {
+ @Override
+ public OFExperimenter readFrom(ChannelBuffer bb) throws OFParseError {
+ if(bb.readableBytes() < MINIMUM_LENGTH)
+ return null;
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 4
+ byte type = bb.readByte();
+ if(type != (byte) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ U32.f(bb.readInt());
+ int experimenter = bb.readInt();
+ bb.readerIndex(start);
+ switch(experimenter) {
+ case 0x5c16c7:
+ // discriminator value 0x5c16c7L=0x5c16c7L for class OFBsnHeaderVer13
+ return OFBsnHeaderVer13.READER.readFrom(bb);
+ case 0x2320:
+ // discriminator value 0x2320L=0x2320L for class OFNiciraHeaderVer13
+ return OFNiciraHeaderVer13.READER.readFrom(bb);
+ default:
+ throw new OFParseError("Unknown value for discriminator experimenter of class OFExperimenterVer13: " + experimenter);
+ }
+ }
+ }
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFactoryVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFactoryVer13.java
new file mode 100644
index 0000000..f5b2e34
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFactoryVer13.java
@@ -0,0 +1,1359 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_factory_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import java.util.Set;
+import java.util.List;
+import org.projectfloodlight.openflow.protocol.OFOxmList;
+
+
+public class OFFactoryVer13 implements OFFactory {
+ public final static OFFactoryVer13 INSTANCE = new OFFactoryVer13();
+
+ private final XidGenerator xidGenerator = XidGenerators.global();
+
+ public OFActions actions() {
+ return OFActionsVer13.INSTANCE;
+ }
+ public OFInstructions instructions() {
+ return OFInstructionsVer13.INSTANCE;
+ }
+ public OFMeterBands meterBands() {
+ return OFMeterBandsVer13.INSTANCE;
+ }
+ public OFOxms oxms() {
+ return OFOxmsVer13.INSTANCE;
+ }
+ public OFQueueProps queueProps() {
+ return OFQueuePropsVer13.INSTANCE;
+ }
+ public OFErrorMsgs errorMsgs() {
+ return OFErrorMsgsVer13.INSTANCE;
+ }
+ public OFActionIds actionIds() {
+ return OFActionIdsVer13.INSTANCE;
+ }
+ public OFInstructionIds instructionIds() {
+ return OFInstructionIdsVer13.INSTANCE;
+ }
+ public OFBsnTlvs bsnTlvs() {
+ return OFBsnTlvsVer13.INSTANCE;
+ }
+
+
+ public OFAggregateStatsReply.Builder buildAggregateStatsReply() {
+ return new OFAggregateStatsReplyVer13.Builder().setXid(nextXid());
+ }
+
+ public OFAggregateStatsRequest.Builder buildAggregateStatsRequest() {
+ return new OFAggregateStatsRequestVer13.Builder().setXid(nextXid());
+ }
+
+ public OFBarrierReply.Builder buildBarrierReply() {
+ return new OFBarrierReplyVer13.Builder().setXid(nextXid());
+ }
+ public OFBarrierReply barrierReply() {
+ return new OFBarrierReplyVer13(
+ nextXid()
+ );
+ }
+
+ public OFBarrierRequest.Builder buildBarrierRequest() {
+ return new OFBarrierRequestVer13.Builder().setXid(nextXid());
+ }
+ public OFBarrierRequest barrierRequest() {
+ return new OFBarrierRequestVer13(
+ nextXid()
+ );
+ }
+
+ public OFBsnBwClearDataReply.Builder buildBsnBwClearDataReply() {
+ return new OFBsnBwClearDataReplyVer13.Builder().setXid(nextXid());
+ }
+ public OFBsnBwClearDataReply bsnBwClearDataReply(long status) {
+ return new OFBsnBwClearDataReplyVer13(
+ nextXid(),
+ status
+ );
+ }
+
+ public OFBsnBwClearDataRequest.Builder buildBsnBwClearDataRequest() {
+ return new OFBsnBwClearDataRequestVer13.Builder().setXid(nextXid());
+ }
+ public OFBsnBwClearDataRequest bsnBwClearDataRequest() {
+ return new OFBsnBwClearDataRequestVer13(
+ nextXid()
+ );
+ }
+
+ public OFBsnBwEnableGetReply.Builder buildBsnBwEnableGetReply() {
+ return new OFBsnBwEnableGetReplyVer13.Builder().setXid(nextXid());
+ }
+ public OFBsnBwEnableGetReply bsnBwEnableGetReply(long enabled) {
+ return new OFBsnBwEnableGetReplyVer13(
+ nextXid(),
+ enabled
+ );
+ }
+
+ public OFBsnBwEnableGetRequest.Builder buildBsnBwEnableGetRequest() {
+ return new OFBsnBwEnableGetRequestVer13.Builder().setXid(nextXid());
+ }
+ public OFBsnBwEnableGetRequest bsnBwEnableGetRequest() {
+ return new OFBsnBwEnableGetRequestVer13(
+ nextXid()
+ );
+ }
+
+ public OFBsnBwEnableSetReply.Builder buildBsnBwEnableSetReply() {
+ return new OFBsnBwEnableSetReplyVer13.Builder().setXid(nextXid());
+ }
+
+ public OFBsnBwEnableSetRequest.Builder buildBsnBwEnableSetRequest() {
+ return new OFBsnBwEnableSetRequestVer13.Builder().setXid(nextXid());
+ }
+ public OFBsnBwEnableSetRequest bsnBwEnableSetRequest(long enable) {
+ return new OFBsnBwEnableSetRequestVer13(
+ nextXid(),
+ enable
+ );
+ }
+
+ public OFBsnGetInterfacesReply.Builder buildBsnGetInterfacesReply() {
+ return new OFBsnGetInterfacesReplyVer13.Builder().setXid(nextXid());
+ }
+ public OFBsnGetInterfacesReply bsnGetInterfacesReply(List<OFBsnInterface> interfaces) {
+ return new OFBsnGetInterfacesReplyVer13(
+ nextXid(),
+ interfaces
+ );
+ }
+
+ public OFBsnGetInterfacesRequest.Builder buildBsnGetInterfacesRequest() {
+ return new OFBsnGetInterfacesRequestVer13.Builder().setXid(nextXid());
+ }
+ public OFBsnGetInterfacesRequest bsnGetInterfacesRequest() {
+ return new OFBsnGetInterfacesRequestVer13(
+ nextXid()
+ );
+ }
+
+ public OFBsnGetIpMaskReply.Builder buildBsnGetIpMaskReply() {
+ throw new UnsupportedOperationException("OFBsnGetIpMaskReply not supported in version 1.3");
+ }
+
+ public OFBsnGetIpMaskRequest.Builder buildBsnGetIpMaskRequest() {
+ throw new UnsupportedOperationException("OFBsnGetIpMaskRequest not supported in version 1.3");
+ }
+ public OFBsnGetIpMaskRequest bsnGetIpMaskRequest(short index) {
+ throw new UnsupportedOperationException("OFBsnGetIpMaskRequest not supported in version 1.3");
+ }
+
+ public OFBsnGetL2TableReply.Builder buildBsnGetL2TableReply() {
+ throw new UnsupportedOperationException("OFBsnGetL2TableReply not supported in version 1.3");
+ }
+
+ public OFBsnGetL2TableRequest.Builder buildBsnGetL2TableRequest() {
+ throw new UnsupportedOperationException("OFBsnGetL2TableRequest not supported in version 1.3");
+ }
+ public OFBsnGetL2TableRequest bsnGetL2TableRequest() {
+ throw new UnsupportedOperationException("OFBsnGetL2TableRequest not supported in version 1.3");
+ }
+
+ public OFBsnGetMirroringReply.Builder buildBsnGetMirroringReply() {
+ return new OFBsnGetMirroringReplyVer13.Builder().setXid(nextXid());
+ }
+ public OFBsnGetMirroringReply bsnGetMirroringReply(short reportMirrorPorts) {
+ return new OFBsnGetMirroringReplyVer13(
+ nextXid(),
+ reportMirrorPorts
+ );
+ }
+
+ public OFBsnGetMirroringRequest.Builder buildBsnGetMirroringRequest() {
+ return new OFBsnGetMirroringRequestVer13.Builder().setXid(nextXid());
+ }
+ public OFBsnGetMirroringRequest bsnGetMirroringRequest(short reportMirrorPorts) {
+ return new OFBsnGetMirroringRequestVer13(
+ nextXid(),
+ reportMirrorPorts
+ );
+ }
+
+ public OFBsnHybridGetReply.Builder buildBsnHybridGetReply() {
+ throw new UnsupportedOperationException("OFBsnHybridGetReply not supported in version 1.3");
+ }
+
+ public OFBsnHybridGetRequest.Builder buildBsnHybridGetRequest() {
+ throw new UnsupportedOperationException("OFBsnHybridGetRequest not supported in version 1.3");
+ }
+ public OFBsnHybridGetRequest bsnHybridGetRequest() {
+ throw new UnsupportedOperationException("OFBsnHybridGetRequest not supported in version 1.3");
+ }
+
+ public OFBsnInterface.Builder buildBsnInterface() {
+ return new OFBsnInterfaceVer13.Builder();
+ }
+
+ public OFBsnPduRxReply.Builder buildBsnPduRxReply() {
+ return new OFBsnPduRxReplyVer13.Builder().setXid(nextXid());
+ }
+
+ public OFBsnPduRxRequest.Builder buildBsnPduRxRequest() {
+ return new OFBsnPduRxRequestVer13.Builder().setXid(nextXid());
+ }
+
+ public OFBsnPduRxTimeout.Builder buildBsnPduRxTimeout() {
+ return new OFBsnPduRxTimeoutVer13.Builder().setXid(nextXid());
+ }
+
+ public OFBsnPduTxReply.Builder buildBsnPduTxReply() {
+ return new OFBsnPduTxReplyVer13.Builder().setXid(nextXid());
+ }
+
+ public OFBsnPduTxRequest.Builder buildBsnPduTxRequest() {
+ return new OFBsnPduTxRequestVer13.Builder().setXid(nextXid());
+ }
+
+ public OFBsnSetIpMask.Builder buildBsnSetIpMask() {
+ throw new UnsupportedOperationException("OFBsnSetIpMask not supported in version 1.3");
+ }
+
+ public OFBsnSetL2TableReply.Builder buildBsnSetL2TableReply() {
+ throw new UnsupportedOperationException("OFBsnSetL2TableReply not supported in version 1.3");
+ }
+
+ public OFBsnSetL2TableRequest.Builder buildBsnSetL2TableRequest() {
+ throw new UnsupportedOperationException("OFBsnSetL2TableRequest not supported in version 1.3");
+ }
+
+ public OFBsnSetMirroring.Builder buildBsnSetMirroring() {
+ return new OFBsnSetMirroringVer13.Builder().setXid(nextXid());
+ }
+ public OFBsnSetMirroring bsnSetMirroring(short reportMirrorPorts) {
+ return new OFBsnSetMirroringVer13(
+ nextXid(),
+ reportMirrorPorts
+ );
+ }
+
+ public OFBsnSetPktinSuppressionReply.Builder buildBsnSetPktinSuppressionReply() {
+ return new OFBsnSetPktinSuppressionReplyVer13.Builder().setXid(nextXid());
+ }
+ public OFBsnSetPktinSuppressionReply bsnSetPktinSuppressionReply(long status) {
+ return new OFBsnSetPktinSuppressionReplyVer13(
+ nextXid(),
+ status
+ );
+ }
+
+ public OFBsnSetPktinSuppressionRequest.Builder buildBsnSetPktinSuppressionRequest() {
+ return new OFBsnSetPktinSuppressionRequestVer13.Builder().setXid(nextXid());
+ }
+
+ public OFBsnShellCommand.Builder buildBsnShellCommand() {
+ throw new UnsupportedOperationException("OFBsnShellCommand not supported in version 1.3");
+ }
+
+ public OFBsnShellOutput.Builder buildBsnShellOutput() {
+ throw new UnsupportedOperationException("OFBsnShellOutput not supported in version 1.3");
+ }
+ public OFBsnShellOutput bsnShellOutput(byte[] data) {
+ throw new UnsupportedOperationException("OFBsnShellOutput not supported in version 1.3");
+ }
+
+ public OFBsnShellStatus.Builder buildBsnShellStatus() {
+ throw new UnsupportedOperationException("OFBsnShellStatus not supported in version 1.3");
+ }
+ public OFBsnShellStatus bsnShellStatus(long status) {
+ throw new UnsupportedOperationException("OFBsnShellStatus not supported in version 1.3");
+ }
+
+ public OFBsnVirtualPortCreateReply.Builder buildBsnVirtualPortCreateReply() {
+ return new OFBsnVirtualPortCreateReplyVer13.Builder().setXid(nextXid());
+ }
+
+ public OFBsnVirtualPortCreateRequest.Builder buildBsnVirtualPortCreateRequest() {
+ return new OFBsnVirtualPortCreateRequestVer13.Builder().setXid(nextXid());
+ }
+ public OFBsnVirtualPortCreateRequest bsnVirtualPortCreateRequest(OFBsnVport vport) {
+ return new OFBsnVirtualPortCreateRequestVer13(
+ nextXid(),
+ vport
+ );
+ }
+
+ public OFBsnVirtualPortRemoveReply.Builder buildBsnVirtualPortRemoveReply() {
+ return new OFBsnVirtualPortRemoveReplyVer13.Builder().setXid(nextXid());
+ }
+ public OFBsnVirtualPortRemoveReply bsnVirtualPortRemoveReply(long status) {
+ return new OFBsnVirtualPortRemoveReplyVer13(
+ nextXid(),
+ status
+ );
+ }
+
+ public OFBsnVirtualPortRemoveRequest.Builder buildBsnVirtualPortRemoveRequest() {
+ return new OFBsnVirtualPortRemoveRequestVer13.Builder().setXid(nextXid());
+ }
+ public OFBsnVirtualPortRemoveRequest bsnVirtualPortRemoveRequest(long vportNo) {
+ return new OFBsnVirtualPortRemoveRequestVer13(
+ nextXid(),
+ vportNo
+ );
+ }
+
+ public OFBsnVportL2Gre.Builder buildBsnVportL2Gre() {
+ return new OFBsnVportL2GreVer13.Builder();
+ }
+
+ public OFBsnVportQInQ.Builder buildBsnVportQInQ() {
+ return new OFBsnVportQInQVer13.Builder();
+ }
+
+ public OFDescStatsReply.Builder buildDescStatsReply() {
+ return new OFDescStatsReplyVer13.Builder().setXid(nextXid());
+ }
+
+ public OFDescStatsRequest.Builder buildDescStatsRequest() {
+ return new OFDescStatsRequestVer13.Builder().setXid(nextXid());
+ }
+ public OFDescStatsRequest descStatsRequest(Set<OFStatsRequestFlags> flags) {
+ return new OFDescStatsRequestVer13(
+ nextXid(),
+ flags
+ );
+ }
+
+ public OFEchoReply.Builder buildEchoReply() {
+ return new OFEchoReplyVer13.Builder().setXid(nextXid());
+ }
+ public OFEchoReply echoReply(byte[] data) {
+ return new OFEchoReplyVer13(
+ nextXid(),
+ data
+ );
+ }
+
+ public OFEchoRequest.Builder buildEchoRequest() {
+ return new OFEchoRequestVer13.Builder().setXid(nextXid());
+ }
+ public OFEchoRequest echoRequest(byte[] data) {
+ return new OFEchoRequestVer13(
+ nextXid(),
+ data
+ );
+ }
+
+ public OFFeaturesReply.Builder buildFeaturesReply() {
+ return new OFFeaturesReplyVer13.Builder().setXid(nextXid());
+ }
+
+ public OFFeaturesRequest.Builder buildFeaturesRequest() {
+ return new OFFeaturesRequestVer13.Builder().setXid(nextXid());
+ }
+ public OFFeaturesRequest featuresRequest() {
+ return new OFFeaturesRequestVer13(
+ nextXid()
+ );
+ }
+
+ public OFFlowAdd.Builder buildFlowAdd() {
+ return new OFFlowAddVer13.Builder().setXid(nextXid());
+ }
+
+ public OFFlowDelete.Builder buildFlowDelete() {
+ return new OFFlowDeleteVer13.Builder().setXid(nextXid());
+ }
+
+ public OFFlowDeleteStrict.Builder buildFlowDeleteStrict() {
+ return new OFFlowDeleteStrictVer13.Builder().setXid(nextXid());
+ }
+
+ public OFFlowModify.Builder buildFlowModify() {
+ return new OFFlowModifyVer13.Builder().setXid(nextXid());
+ }
+
+ public OFFlowModifyStrict.Builder buildFlowModifyStrict() {
+ return new OFFlowModifyStrictVer13.Builder().setXid(nextXid());
+ }
+
+ public OFFlowRemoved.Builder buildFlowRemoved() {
+ return new OFFlowRemovedVer13.Builder().setXid(nextXid());
+ }
+
+ public OFFlowStatsEntry.Builder buildFlowStatsEntry() {
+ return new OFFlowStatsEntryVer13.Builder();
+ }
+
+ public OFFlowStatsReply.Builder buildFlowStatsReply() {
+ return new OFFlowStatsReplyVer13.Builder().setXid(nextXid());
+ }
+
+ public OFFlowStatsRequest.Builder buildFlowStatsRequest() {
+ return new OFFlowStatsRequestVer13.Builder().setXid(nextXid());
+ }
+
+ public OFGetConfigReply.Builder buildGetConfigReply() {
+ return new OFGetConfigReplyVer13.Builder().setXid(nextXid());
+ }
+
+ public OFGetConfigRequest.Builder buildGetConfigRequest() {
+ return new OFGetConfigRequestVer13.Builder().setXid(nextXid());
+ }
+ public OFGetConfigRequest getConfigRequest() {
+ return new OFGetConfigRequestVer13(
+ nextXid()
+ );
+ }
+
+ public OFHello.Builder buildHello() {
+ return new OFHelloVer13.Builder().setXid(nextXid());
+ }
+ public OFHello hello(List<OFHelloElem> elements) {
+ return new OFHelloVer13(
+ nextXid(),
+ elements
+ );
+ }
+
+ public OFMatchV1.Builder buildMatchV1() {
+ throw new UnsupportedOperationException("OFMatchV1 not supported in version 1.3");
+ }
+
+ public OFNiciraControllerRoleReply.Builder buildNiciraControllerRoleReply() {
+ throw new UnsupportedOperationException("OFNiciraControllerRoleReply not supported in version 1.3");
+ }
+ public OFNiciraControllerRoleReply niciraControllerRoleReply(OFNiciraControllerRole role) {
+ throw new UnsupportedOperationException("OFNiciraControllerRoleReply not supported in version 1.3");
+ }
+
+ public OFNiciraControllerRoleRequest.Builder buildNiciraControllerRoleRequest() {
+ throw new UnsupportedOperationException("OFNiciraControllerRoleRequest not supported in version 1.3");
+ }
+ public OFNiciraControllerRoleRequest niciraControllerRoleRequest(OFNiciraControllerRole role) {
+ throw new UnsupportedOperationException("OFNiciraControllerRoleRequest not supported in version 1.3");
+ }
+
+ public OFPacketIn.Builder buildPacketIn() {
+ return new OFPacketInVer13.Builder().setXid(nextXid());
+ }
+
+ public OFPacketOut.Builder buildPacketOut() {
+ return new OFPacketOutVer13.Builder().setXid(nextXid());
+ }
+
+ public OFPacketQueue.Builder buildPacketQueue() {
+ return new OFPacketQueueVer13.Builder();
+ }
+
+ public OFPortDesc.Builder buildPortDesc() {
+ return new OFPortDescVer13.Builder();
+ }
+
+ public OFPortMod.Builder buildPortMod() {
+ return new OFPortModVer13.Builder().setXid(nextXid());
+ }
+
+ public OFPortStatsEntry.Builder buildPortStatsEntry() {
+ return new OFPortStatsEntryVer13.Builder();
+ }
+
+ public OFPortStatsReply.Builder buildPortStatsReply() {
+ return new OFPortStatsReplyVer13.Builder().setXid(nextXid());
+ }
+
+ public OFPortStatsRequest.Builder buildPortStatsRequest() {
+ return new OFPortStatsRequestVer13.Builder().setXid(nextXid());
+ }
+
+ public OFPortStatus.Builder buildPortStatus() {
+ return new OFPortStatusVer13.Builder().setXid(nextXid());
+ }
+
+ public OFQueueGetConfigReply.Builder buildQueueGetConfigReply() {
+ return new OFQueueGetConfigReplyVer13.Builder().setXid(nextXid());
+ }
+
+ public OFQueueGetConfigRequest.Builder buildQueueGetConfigRequest() {
+ return new OFQueueGetConfigRequestVer13.Builder().setXid(nextXid());
+ }
+ public OFQueueGetConfigRequest queueGetConfigRequest(OFPort port) {
+ return new OFQueueGetConfigRequestVer13(
+ nextXid(),
+ port
+ );
+ }
+
+ public OFQueueStatsEntry.Builder buildQueueStatsEntry() {
+ return new OFQueueStatsEntryVer13.Builder();
+ }
+
+ public OFQueueStatsReply.Builder buildQueueStatsReply() {
+ return new OFQueueStatsReplyVer13.Builder().setXid(nextXid());
+ }
+
+ public OFQueueStatsRequest.Builder buildQueueStatsRequest() {
+ return new OFQueueStatsRequestVer13.Builder().setXid(nextXid());
+ }
+
+ public OFSetConfig.Builder buildSetConfig() {
+ return new OFSetConfigVer13.Builder().setXid(nextXid());
+ }
+
+ public OFTableMod.Builder buildTableMod() {
+ return new OFTableModVer13.Builder().setXid(nextXid());
+ }
+
+ public OFTableStatsEntry.Builder buildTableStatsEntry() {
+ return new OFTableStatsEntryVer13.Builder();
+ }
+
+ public OFTableStatsReply.Builder buildTableStatsReply() {
+ return new OFTableStatsReplyVer13.Builder().setXid(nextXid());
+ }
+
+ public OFTableStatsRequest.Builder buildTableStatsRequest() {
+ return new OFTableStatsRequestVer13.Builder().setXid(nextXid());
+ }
+ public OFTableStatsRequest tableStatsRequest(Set<OFStatsRequestFlags> flags) {
+ return new OFTableStatsRequestVer13(
+ nextXid(),
+ flags
+ );
+ }
+
+ public OFBucket.Builder buildBucket() {
+ return new OFBucketVer13.Builder();
+ }
+
+ public OFBucketCounter.Builder buildBucketCounter() {
+ return new OFBucketCounterVer13.Builder();
+ }
+ public OFBucketCounter bucketCounter(U64 packetCount, U64 byteCount) {
+ return new OFBucketCounterVer13(
+ packetCount,
+ byteCount
+ );
+ }
+
+ public OFGroupAdd.Builder buildGroupAdd() {
+ return new OFGroupAddVer13.Builder().setXid(nextXid());
+ }
+
+ public OFGroupDelete.Builder buildGroupDelete() {
+ return new OFGroupDeleteVer13.Builder().setXid(nextXid());
+ }
+
+ public OFGroupDescStatsEntry.Builder buildGroupDescStatsEntry() {
+ return new OFGroupDescStatsEntryVer13.Builder();
+ }
+
+ public OFGroupDescStatsReply.Builder buildGroupDescStatsReply() {
+ return new OFGroupDescStatsReplyVer13.Builder().setXid(nextXid());
+ }
+
+ public OFGroupDescStatsRequest.Builder buildGroupDescStatsRequest() {
+ return new OFGroupDescStatsRequestVer13.Builder().setXid(nextXid());
+ }
+ public OFGroupDescStatsRequest groupDescStatsRequest(Set<OFStatsRequestFlags> flags) {
+ return new OFGroupDescStatsRequestVer13(
+ nextXid(),
+ flags
+ );
+ }
+
+ public OFGroupModify.Builder buildGroupModify() {
+ return new OFGroupModifyVer13.Builder().setXid(nextXid());
+ }
+
+ public OFGroupStatsEntry.Builder buildGroupStatsEntry() {
+ return new OFGroupStatsEntryVer13.Builder();
+ }
+
+ public OFGroupStatsReply.Builder buildGroupStatsReply() {
+ return new OFGroupStatsReplyVer13.Builder().setXid(nextXid());
+ }
+
+ public OFGroupStatsRequest.Builder buildGroupStatsRequest() {
+ return new OFGroupStatsRequestVer13.Builder().setXid(nextXid());
+ }
+
+ public OFMatchV2.Builder buildMatchV2() {
+ throw new UnsupportedOperationException("OFMatchV2 not supported in version 1.3");
+ }
+
+ public OFGroupFeaturesStatsReply.Builder buildGroupFeaturesStatsReply() {
+ return new OFGroupFeaturesStatsReplyVer13.Builder().setXid(nextXid());
+ }
+
+ public OFGroupFeaturesStatsRequest.Builder buildGroupFeaturesStatsRequest() {
+ return new OFGroupFeaturesStatsRequestVer13.Builder().setXid(nextXid());
+ }
+ public OFGroupFeaturesStatsRequest groupFeaturesStatsRequest(Set<OFStatsRequestFlags> flags) {
+ return new OFGroupFeaturesStatsRequestVer13(
+ nextXid(),
+ flags
+ );
+ }
+
+ public OFMatchV3.Builder buildMatchV3() {
+ return new OFMatchV3Ver13.Builder();
+ }
+ public Match.Builder buildMatch() {
+ return new OFMatchV3Ver13.Builder();
+ }
+
+ final static Match MATCH_WILDCARD_ALL = OFMatchV3Ver13.DEFAULT;
+
+ public Match matchWildcardAll() {
+ return MATCH_WILDCARD_ALL;
+ }
+ public OFMatchV3 matchV3(OFOxmList oxmList) {
+ return new OFMatchV3Ver13(
+ oxmList
+ );
+ }
+
+ public OFRoleReply.Builder buildRoleReply() {
+ return new OFRoleReplyVer13.Builder().setXid(nextXid());
+ }
+
+ public OFRoleRequest.Builder buildRoleRequest() {
+ return new OFRoleRequestVer13.Builder().setXid(nextXid());
+ }
+
+ public OFAsyncGetReply.Builder buildAsyncGetReply() {
+ return new OFAsyncGetReplyVer13.Builder().setXid(nextXid());
+ }
+
+ public OFAsyncGetRequest.Builder buildAsyncGetRequest() {
+ return new OFAsyncGetRequestVer13.Builder().setXid(nextXid());
+ }
+
+ public OFAsyncSet.Builder buildAsyncSet() {
+ return new OFAsyncSetVer13.Builder().setXid(nextXid());
+ }
+
+ public OFBsnArpIdle.Builder buildBsnArpIdle() {
+ return new OFBsnArpIdleVer13.Builder().setXid(nextXid());
+ }
+
+ public OFBsnControllerConnection.Builder buildBsnControllerConnection() {
+ return new OFBsnControllerConnectionVer13.Builder();
+ }
+
+ public OFBsnControllerConnectionsReply.Builder buildBsnControllerConnectionsReply() {
+ return new OFBsnControllerConnectionsReplyVer13.Builder().setXid(nextXid());
+ }
+ public OFBsnControllerConnectionsReply bsnControllerConnectionsReply(List<OFBsnControllerConnection> connections) {
+ return new OFBsnControllerConnectionsReplyVer13(
+ nextXid(),
+ connections
+ );
+ }
+
+ public OFBsnControllerConnectionsRequest.Builder buildBsnControllerConnectionsRequest() {
+ return new OFBsnControllerConnectionsRequestVer13.Builder().setXid(nextXid());
+ }
+ public OFBsnControllerConnectionsRequest bsnControllerConnectionsRequest() {
+ return new OFBsnControllerConnectionsRequestVer13(
+ nextXid()
+ );
+ }
+
+ public OFBsnDebugCounterDescStatsEntry.Builder buildBsnDebugCounterDescStatsEntry() {
+ return new OFBsnDebugCounterDescStatsEntryVer13.Builder();
+ }
+
+ public OFBsnDebugCounterDescStatsReply.Builder buildBsnDebugCounterDescStatsReply() {
+ return new OFBsnDebugCounterDescStatsReplyVer13.Builder().setXid(nextXid());
+ }
+
+ public OFBsnDebugCounterDescStatsRequest.Builder buildBsnDebugCounterDescStatsRequest() {
+ return new OFBsnDebugCounterDescStatsRequestVer13.Builder().setXid(nextXid());
+ }
+ public OFBsnDebugCounterDescStatsRequest bsnDebugCounterDescStatsRequest(Set<OFStatsRequestFlags> flags) {
+ return new OFBsnDebugCounterDescStatsRequestVer13(
+ nextXid(),
+ flags
+ );
+ }
+
+ public OFBsnDebugCounterStatsEntry.Builder buildBsnDebugCounterStatsEntry() {
+ return new OFBsnDebugCounterStatsEntryVer13.Builder();
+ }
+ public OFBsnDebugCounterStatsEntry bsnDebugCounterStatsEntry(U64 counterId, U64 value) {
+ return new OFBsnDebugCounterStatsEntryVer13(
+ counterId,
+ value
+ );
+ }
+
+ public OFBsnDebugCounterStatsReply.Builder buildBsnDebugCounterStatsReply() {
+ return new OFBsnDebugCounterStatsReplyVer13.Builder().setXid(nextXid());
+ }
+
+ public OFBsnDebugCounterStatsRequest.Builder buildBsnDebugCounterStatsRequest() {
+ return new OFBsnDebugCounterStatsRequestVer13.Builder().setXid(nextXid());
+ }
+ public OFBsnDebugCounterStatsRequest bsnDebugCounterStatsRequest(Set<OFStatsRequestFlags> flags) {
+ return new OFBsnDebugCounterStatsRequestVer13(
+ nextXid(),
+ flags
+ );
+ }
+
+ public OFBsnFlowChecksumBucketStatsEntry.Builder buildBsnFlowChecksumBucketStatsEntry() {
+ return new OFBsnFlowChecksumBucketStatsEntryVer13.Builder();
+ }
+ public OFBsnFlowChecksumBucketStatsEntry bsnFlowChecksumBucketStatsEntry(U64 checksum) {
+ return new OFBsnFlowChecksumBucketStatsEntryVer13(
+ checksum
+ );
+ }
+
+ public OFBsnFlowChecksumBucketStatsReply.Builder buildBsnFlowChecksumBucketStatsReply() {
+ return new OFBsnFlowChecksumBucketStatsReplyVer13.Builder().setXid(nextXid());
+ }
+
+ public OFBsnFlowChecksumBucketStatsRequest.Builder buildBsnFlowChecksumBucketStatsRequest() {
+ return new OFBsnFlowChecksumBucketStatsRequestVer13.Builder().setXid(nextXid());
+ }
+
+ public OFBsnFlowIdle.Builder buildBsnFlowIdle() {
+ return new OFBsnFlowIdleVer13.Builder().setXid(nextXid());
+ }
+
+ public OFBsnFlowIdleEnableGetReply.Builder buildBsnFlowIdleEnableGetReply() {
+ return new OFBsnFlowIdleEnableGetReplyVer13.Builder().setXid(nextXid());
+ }
+ public OFBsnFlowIdleEnableGetReply bsnFlowIdleEnableGetReply(long enabled) {
+ return new OFBsnFlowIdleEnableGetReplyVer13(
+ nextXid(),
+ enabled
+ );
+ }
+
+ public OFBsnFlowIdleEnableGetRequest.Builder buildBsnFlowIdleEnableGetRequest() {
+ return new OFBsnFlowIdleEnableGetRequestVer13.Builder().setXid(nextXid());
+ }
+ public OFBsnFlowIdleEnableGetRequest bsnFlowIdleEnableGetRequest() {
+ return new OFBsnFlowIdleEnableGetRequestVer13(
+ nextXid()
+ );
+ }
+
+ public OFBsnFlowIdleEnableSetReply.Builder buildBsnFlowIdleEnableSetReply() {
+ return new OFBsnFlowIdleEnableSetReplyVer13.Builder().setXid(nextXid());
+ }
+
+ public OFBsnFlowIdleEnableSetRequest.Builder buildBsnFlowIdleEnableSetRequest() {
+ return new OFBsnFlowIdleEnableSetRequestVer13.Builder().setXid(nextXid());
+ }
+ public OFBsnFlowIdleEnableSetRequest bsnFlowIdleEnableSetRequest(long enable) {
+ return new OFBsnFlowIdleEnableSetRequestVer13(
+ nextXid(),
+ enable
+ );
+ }
+
+ public OFBsnGentableBucketStatsEntry.Builder buildBsnGentableBucketStatsEntry() {
+ return new OFBsnGentableBucketStatsEntryVer13.Builder();
+ }
+ public OFBsnGentableBucketStatsEntry bsnGentableBucketStatsEntry(U128 checksum) {
+ return new OFBsnGentableBucketStatsEntryVer13(
+ checksum
+ );
+ }
+
+ public OFBsnGentableBucketStatsReply.Builder buildBsnGentableBucketStatsReply() {
+ return new OFBsnGentableBucketStatsReplyVer13.Builder().setXid(nextXid());
+ }
+
+ public OFBsnGentableBucketStatsRequest.Builder buildBsnGentableBucketStatsRequest() {
+ return new OFBsnGentableBucketStatsRequestVer13.Builder().setXid(nextXid());
+ }
+
+ public OFBsnGentableClearReply.Builder buildBsnGentableClearReply() {
+ return new OFBsnGentableClearReplyVer13.Builder().setXid(nextXid());
+ }
+
+ public OFBsnGentableClearRequest.Builder buildBsnGentableClearRequest() {
+ return new OFBsnGentableClearRequestVer13.Builder().setXid(nextXid());
+ }
+
+ public OFBsnGentableDescStatsEntry.Builder buildBsnGentableDescStatsEntry() {
+ return new OFBsnGentableDescStatsEntryVer13.Builder();
+ }
+
+ public OFBsnGentableDescStatsReply.Builder buildBsnGentableDescStatsReply() {
+ return new OFBsnGentableDescStatsReplyVer13.Builder().setXid(nextXid());
+ }
+
+ public OFBsnGentableDescStatsRequest.Builder buildBsnGentableDescStatsRequest() {
+ return new OFBsnGentableDescStatsRequestVer13.Builder().setXid(nextXid());
+ }
+ public OFBsnGentableDescStatsRequest bsnGentableDescStatsRequest(Set<OFStatsRequestFlags> flags) {
+ return new OFBsnGentableDescStatsRequestVer13(
+ nextXid(),
+ flags
+ );
+ }
+
+ public OFBsnGentableEntryAdd.Builder buildBsnGentableEntryAdd() {
+ return new OFBsnGentableEntryAddVer13.Builder().setXid(nextXid());
+ }
+
+ public OFBsnGentableEntryDelete.Builder buildBsnGentableEntryDelete() {
+ return new OFBsnGentableEntryDeleteVer13.Builder().setXid(nextXid());
+ }
+
+ public OFBsnGentableEntryDescStatsEntry.Builder buildBsnGentableEntryDescStatsEntry() {
+ return new OFBsnGentableEntryDescStatsEntryVer13.Builder();
+ }
+
+ public OFBsnGentableEntryDescStatsReply.Builder buildBsnGentableEntryDescStatsReply() {
+ return new OFBsnGentableEntryDescStatsReplyVer13.Builder().setXid(nextXid());
+ }
+
+ public OFBsnGentableEntryDescStatsRequest.Builder buildBsnGentableEntryDescStatsRequest() {
+ return new OFBsnGentableEntryDescStatsRequestVer13.Builder().setXid(nextXid());
+ }
+
+ public OFBsnGentableEntryStatsEntry.Builder buildBsnGentableEntryStatsEntry() {
+ return new OFBsnGentableEntryStatsEntryVer13.Builder();
+ }
+ public OFBsnGentableEntryStatsEntry bsnGentableEntryStatsEntry(List<OFBsnTlv> key, List<OFBsnTlv> stats) {
+ return new OFBsnGentableEntryStatsEntryVer13(
+ key,
+ stats
+ );
+ }
+
+ public OFBsnGentableEntryStatsReply.Builder buildBsnGentableEntryStatsReply() {
+ return new OFBsnGentableEntryStatsReplyVer13.Builder().setXid(nextXid());
+ }
+
+ public OFBsnGentableEntryStatsRequest.Builder buildBsnGentableEntryStatsRequest() {
+ return new OFBsnGentableEntryStatsRequestVer13.Builder().setXid(nextXid());
+ }
+
+ public OFBsnGentableSetBucketsSize.Builder buildBsnGentableSetBucketsSize() {
+ return new OFBsnGentableSetBucketsSizeVer13.Builder().setXid(nextXid());
+ }
+
+ public OFBsnGentableStatsEntry.Builder buildBsnGentableStatsEntry() {
+ return new OFBsnGentableStatsEntryVer13.Builder();
+ }
+
+ public OFBsnGentableStatsReply.Builder buildBsnGentableStatsReply() {
+ return new OFBsnGentableStatsReplyVer13.Builder().setXid(nextXid());
+ }
+
+ public OFBsnGentableStatsRequest.Builder buildBsnGentableStatsRequest() {
+ return new OFBsnGentableStatsRequestVer13.Builder().setXid(nextXid());
+ }
+ public OFBsnGentableStatsRequest bsnGentableStatsRequest(Set<OFStatsRequestFlags> flags) {
+ return new OFBsnGentableStatsRequestVer13(
+ nextXid(),
+ flags
+ );
+ }
+
+ public OFBsnGetSwitchPipelineReply.Builder buildBsnGetSwitchPipelineReply() {
+ return new OFBsnGetSwitchPipelineReplyVer13.Builder().setXid(nextXid());
+ }
+ public OFBsnGetSwitchPipelineReply bsnGetSwitchPipelineReply(String pipeline) {
+ return new OFBsnGetSwitchPipelineReplyVer13(
+ nextXid(),
+ pipeline
+ );
+ }
+
+ public OFBsnGetSwitchPipelineRequest.Builder buildBsnGetSwitchPipelineRequest() {
+ return new OFBsnGetSwitchPipelineRequestVer13.Builder().setXid(nextXid());
+ }
+ public OFBsnGetSwitchPipelineRequest bsnGetSwitchPipelineRequest() {
+ return new OFBsnGetSwitchPipelineRequestVer13(
+ nextXid()
+ );
+ }
+
+ public OFBsnImageDescStatsReply.Builder buildBsnImageDescStatsReply() {
+ return new OFBsnImageDescStatsReplyVer13.Builder().setXid(nextXid());
+ }
+
+ public OFBsnImageDescStatsRequest.Builder buildBsnImageDescStatsRequest() {
+ return new OFBsnImageDescStatsRequestVer13.Builder().setXid(nextXid());
+ }
+ public OFBsnImageDescStatsRequest bsnImageDescStatsRequest(Set<OFStatsRequestFlags> flags) {
+ return new OFBsnImageDescStatsRequestVer13(
+ nextXid(),
+ flags
+ );
+ }
+
+ public OFBsnLacpConvergenceNotif.Builder buildBsnLacpConvergenceNotif() {
+ return new OFBsnLacpConvergenceNotifVer13.Builder().setXid(nextXid());
+ }
+
+ public OFBsnLacpStatsEntry.Builder buildBsnLacpStatsEntry() {
+ return new OFBsnLacpStatsEntryVer13.Builder();
+ }
+
+ public OFBsnLacpStatsReply.Builder buildBsnLacpStatsReply() {
+ return new OFBsnLacpStatsReplyVer13.Builder().setXid(nextXid());
+ }
+
+ public OFBsnLacpStatsRequest.Builder buildBsnLacpStatsRequest() {
+ return new OFBsnLacpStatsRequestVer13.Builder().setXid(nextXid());
+ }
+ public OFBsnLacpStatsRequest bsnLacpStatsRequest(Set<OFStatsRequestFlags> flags) {
+ return new OFBsnLacpStatsRequestVer13(
+ nextXid(),
+ flags
+ );
+ }
+
+ public OFBsnLog.Builder buildBsnLog() {
+ return new OFBsnLogVer13.Builder().setXid(nextXid());
+ }
+
+ public OFBsnPortCounterStatsEntry.Builder buildBsnPortCounterStatsEntry() {
+ return new OFBsnPortCounterStatsEntryVer13.Builder();
+ }
+ public OFBsnPortCounterStatsEntry bsnPortCounterStatsEntry(OFPort portNo, List<U64> values) {
+ return new OFBsnPortCounterStatsEntryVer13(
+ portNo,
+ values
+ );
+ }
+
+ public OFBsnPortCounterStatsReply.Builder buildBsnPortCounterStatsReply() {
+ return new OFBsnPortCounterStatsReplyVer13.Builder().setXid(nextXid());
+ }
+
+ public OFBsnPortCounterStatsRequest.Builder buildBsnPortCounterStatsRequest() {
+ return new OFBsnPortCounterStatsRequestVer13.Builder().setXid(nextXid());
+ }
+
+ public OFBsnRoleStatus.Builder buildBsnRoleStatus() {
+ return new OFBsnRoleStatusVer13.Builder().setXid(nextXid());
+ }
+
+ public OFBsnSetAuxCxnsReply.Builder buildBsnSetAuxCxnsReply() {
+ return new OFBsnSetAuxCxnsReplyVer13.Builder().setXid(nextXid());
+ }
+
+ public OFBsnSetAuxCxnsRequest.Builder buildBsnSetAuxCxnsRequest() {
+ return new OFBsnSetAuxCxnsRequestVer13.Builder().setXid(nextXid());
+ }
+ public OFBsnSetAuxCxnsRequest bsnSetAuxCxnsRequest(long numAux) {
+ return new OFBsnSetAuxCxnsRequestVer13(
+ nextXid(),
+ numAux
+ );
+ }
+
+ public OFBsnSetLacpReply.Builder buildBsnSetLacpReply() {
+ return new OFBsnSetLacpReplyVer13.Builder().setXid(nextXid());
+ }
+
+ public OFBsnSetLacpRequest.Builder buildBsnSetLacpRequest() {
+ return new OFBsnSetLacpRequestVer13.Builder().setXid(nextXid());
+ }
+
+ public OFBsnSetSwitchPipelineReply.Builder buildBsnSetSwitchPipelineReply() {
+ return new OFBsnSetSwitchPipelineReplyVer13.Builder().setXid(nextXid());
+ }
+ public OFBsnSetSwitchPipelineReply bsnSetSwitchPipelineReply(long status) {
+ return new OFBsnSetSwitchPipelineReplyVer13(
+ nextXid(),
+ status
+ );
+ }
+
+ public OFBsnSetSwitchPipelineRequest.Builder buildBsnSetSwitchPipelineRequest() {
+ return new OFBsnSetSwitchPipelineRequestVer13.Builder().setXid(nextXid());
+ }
+ public OFBsnSetSwitchPipelineRequest bsnSetSwitchPipelineRequest(String pipeline) {
+ return new OFBsnSetSwitchPipelineRequestVer13(
+ nextXid(),
+ pipeline
+ );
+ }
+
+ public OFBsnSwitchPipelineStatsEntry.Builder buildBsnSwitchPipelineStatsEntry() {
+ return new OFBsnSwitchPipelineStatsEntryVer13.Builder();
+ }
+ public OFBsnSwitchPipelineStatsEntry bsnSwitchPipelineStatsEntry(String pipeline) {
+ return new OFBsnSwitchPipelineStatsEntryVer13(
+ pipeline
+ );
+ }
+
+ public OFBsnSwitchPipelineStatsReply.Builder buildBsnSwitchPipelineStatsReply() {
+ return new OFBsnSwitchPipelineStatsReplyVer13.Builder().setXid(nextXid());
+ }
+
+ public OFBsnSwitchPipelineStatsRequest.Builder buildBsnSwitchPipelineStatsRequest() {
+ return new OFBsnSwitchPipelineStatsRequestVer13.Builder().setXid(nextXid());
+ }
+ public OFBsnSwitchPipelineStatsRequest bsnSwitchPipelineStatsRequest(Set<OFStatsRequestFlags> flags) {
+ return new OFBsnSwitchPipelineStatsRequestVer13(
+ nextXid(),
+ flags
+ );
+ }
+
+ public OFBsnTableChecksumStatsEntry.Builder buildBsnTableChecksumStatsEntry() {
+ return new OFBsnTableChecksumStatsEntryVer13.Builder();
+ }
+ public OFBsnTableChecksumStatsEntry bsnTableChecksumStatsEntry(TableId tableId, U64 checksum) {
+ return new OFBsnTableChecksumStatsEntryVer13(
+ tableId,
+ checksum
+ );
+ }
+
+ public OFBsnTableChecksumStatsReply.Builder buildBsnTableChecksumStatsReply() {
+ return new OFBsnTableChecksumStatsReplyVer13.Builder().setXid(nextXid());
+ }
+
+ public OFBsnTableChecksumStatsRequest.Builder buildBsnTableChecksumStatsRequest() {
+ return new OFBsnTableChecksumStatsRequestVer13.Builder().setXid(nextXid());
+ }
+ public OFBsnTableChecksumStatsRequest bsnTableChecksumStatsRequest(Set<OFStatsRequestFlags> flags) {
+ return new OFBsnTableChecksumStatsRequestVer13(
+ nextXid(),
+ flags
+ );
+ }
+
+ public OFBsnTableSetBucketsSize.Builder buildBsnTableSetBucketsSize() {
+ return new OFBsnTableSetBucketsSizeVer13.Builder().setXid(nextXid());
+ }
+
+ public OFBsnTimeReply.Builder buildBsnTimeReply() {
+ return new OFBsnTimeReplyVer13.Builder().setXid(nextXid());
+ }
+ public OFBsnTimeReply bsnTimeReply(U64 timeMs) {
+ return new OFBsnTimeReplyVer13(
+ nextXid(),
+ timeMs
+ );
+ }
+
+ public OFBsnTimeRequest.Builder buildBsnTimeRequest() {
+ return new OFBsnTimeRequestVer13.Builder().setXid(nextXid());
+ }
+ public OFBsnTimeRequest bsnTimeRequest() {
+ return new OFBsnTimeRequestVer13(
+ nextXid()
+ );
+ }
+
+ public OFBsnVlanCounterStatsEntry.Builder buildBsnVlanCounterStatsEntry() {
+ return new OFBsnVlanCounterStatsEntryVer13.Builder();
+ }
+ public OFBsnVlanCounterStatsEntry bsnVlanCounterStatsEntry(int vlanVid, List<U64> values) {
+ return new OFBsnVlanCounterStatsEntryVer13(
+ vlanVid,
+ values
+ );
+ }
+
+ public OFBsnVlanCounterStatsReply.Builder buildBsnVlanCounterStatsReply() {
+ return new OFBsnVlanCounterStatsReplyVer13.Builder().setXid(nextXid());
+ }
+
+ public OFBsnVlanCounterStatsRequest.Builder buildBsnVlanCounterStatsRequest() {
+ return new OFBsnVlanCounterStatsRequestVer13.Builder().setXid(nextXid());
+ }
+
+ public OFBsnVrfCounterStatsEntry.Builder buildBsnVrfCounterStatsEntry() {
+ return new OFBsnVrfCounterStatsEntryVer13.Builder();
+ }
+ public OFBsnVrfCounterStatsEntry bsnVrfCounterStatsEntry(long vrf, List<U64> values) {
+ return new OFBsnVrfCounterStatsEntryVer13(
+ vrf,
+ values
+ );
+ }
+
+ public OFBsnVrfCounterStatsReply.Builder buildBsnVrfCounterStatsReply() {
+ return new OFBsnVrfCounterStatsReplyVer13.Builder().setXid(nextXid());
+ }
+
+ public OFBsnVrfCounterStatsRequest.Builder buildBsnVrfCounterStatsRequest() {
+ return new OFBsnVrfCounterStatsRequestVer13.Builder().setXid(nextXid());
+ }
+
+ public OFHelloElemVersionbitmap.Builder buildHelloElemVersionbitmap() {
+ return new OFHelloElemVersionbitmapVer13.Builder();
+ }
+ public OFHelloElemVersionbitmap helloElemVersionbitmap(List<U32> bitmaps) {
+ return new OFHelloElemVersionbitmapVer13(
+ bitmaps
+ );
+ }
+
+ public OFMeterBandStats.Builder buildMeterBandStats() {
+ return new OFMeterBandStatsVer13.Builder();
+ }
+ public OFMeterBandStats meterBandStats(U64 packetBandCount, U64 byteBandCount) {
+ return new OFMeterBandStatsVer13(
+ packetBandCount,
+ byteBandCount
+ );
+ }
+
+ public OFMeterConfig.Builder buildMeterConfig() {
+ return new OFMeterConfigVer13.Builder();
+ }
+
+ public OFMeterConfigStatsReply.Builder buildMeterConfigStatsReply() {
+ return new OFMeterConfigStatsReplyVer13.Builder().setXid(nextXid());
+ }
+
+ public OFMeterConfigStatsRequest.Builder buildMeterConfigStatsRequest() {
+ return new OFMeterConfigStatsRequestVer13.Builder().setXid(nextXid());
+ }
+
+ public OFMeterFeatures.Builder buildMeterFeatures() {
+ return new OFMeterFeaturesVer13.Builder();
+ }
+
+ public OFMeterFeaturesStatsReply.Builder buildMeterFeaturesStatsReply() {
+ return new OFMeterFeaturesStatsReplyVer13.Builder().setXid(nextXid());
+ }
+
+ public OFMeterFeaturesStatsRequest.Builder buildMeterFeaturesStatsRequest() {
+ return new OFMeterFeaturesStatsRequestVer13.Builder().setXid(nextXid());
+ }
+ public OFMeterFeaturesStatsRequest meterFeaturesStatsRequest(Set<OFStatsRequestFlags> flags) {
+ return new OFMeterFeaturesStatsRequestVer13(
+ nextXid(),
+ flags
+ );
+ }
+
+ public OFMeterMod.Builder buildMeterMod() {
+ return new OFMeterModVer13.Builder().setXid(nextXid());
+ }
+
+ public OFMeterStats.Builder buildMeterStats() {
+ return new OFMeterStatsVer13.Builder();
+ }
+
+ public OFMeterStatsReply.Builder buildMeterStatsReply() {
+ return new OFMeterStatsReplyVer13.Builder().setXid(nextXid());
+ }
+
+ public OFMeterStatsRequest.Builder buildMeterStatsRequest() {
+ return new OFMeterStatsRequestVer13.Builder().setXid(nextXid());
+ }
+
+ public OFPortDescStatsReply.Builder buildPortDescStatsReply() {
+ return new OFPortDescStatsReplyVer13.Builder().setXid(nextXid());
+ }
+
+ public OFPortDescStatsRequest.Builder buildPortDescStatsRequest() {
+ return new OFPortDescStatsRequestVer13.Builder().setXid(nextXid());
+ }
+ public OFPortDescStatsRequest portDescStatsRequest(Set<OFStatsRequestFlags> flags) {
+ return new OFPortDescStatsRequestVer13(
+ nextXid(),
+ flags
+ );
+ }
+
+ public OFTableFeaturePropApplyActions.Builder buildTableFeaturePropApplyActions() {
+ return new OFTableFeaturePropApplyActionsVer13.Builder();
+ }
+ public OFTableFeaturePropApplyActions tableFeaturePropApplyActions(List<OFActionId> actionIds) {
+ return new OFTableFeaturePropApplyActionsVer13(
+ actionIds
+ );
+ }
+
+ public OFTableFeaturePropApplyActionsMiss.Builder buildTableFeaturePropApplyActionsMiss() {
+ return new OFTableFeaturePropApplyActionsMissVer13.Builder();
+ }
+ public OFTableFeaturePropApplyActionsMiss tableFeaturePropApplyActionsMiss(List<OFActionId> actionIds) {
+ return new OFTableFeaturePropApplyActionsMissVer13(
+ actionIds
+ );
+ }
+
+ public OFTableFeaturePropApplySetfield.Builder buildTableFeaturePropApplySetfield() {
+ return new OFTableFeaturePropApplySetfieldVer13.Builder();
+ }
+ public OFTableFeaturePropApplySetfield tableFeaturePropApplySetfield(List<U32> oxmIds) {
+ return new OFTableFeaturePropApplySetfieldVer13(
+ oxmIds
+ );
+ }
+
+ public OFTableFeaturePropApplySetfieldMiss.Builder buildTableFeaturePropApplySetfieldMiss() {
+ return new OFTableFeaturePropApplySetfieldMissVer13.Builder();
+ }
+ public OFTableFeaturePropApplySetfieldMiss tableFeaturePropApplySetfieldMiss(List<U32> oxmIds) {
+ return new OFTableFeaturePropApplySetfieldMissVer13(
+ oxmIds
+ );
+ }
+
+ public OFTableFeaturePropExperimenter.Builder buildTableFeaturePropExperimenter() {
+ return new OFTableFeaturePropExperimenterVer13.Builder();
+ }
+
+ public OFTableFeaturePropExperimenterMiss.Builder buildTableFeaturePropExperimenterMiss() {
+ return new OFTableFeaturePropExperimenterMissVer13.Builder();
+ }
+
+ public OFTableFeaturePropInstructions.Builder buildTableFeaturePropInstructions() {
+ return new OFTableFeaturePropInstructionsVer13.Builder();
+ }
+ public OFTableFeaturePropInstructions tableFeaturePropInstructions(List<OFInstructionId> instructionIds) {
+ return new OFTableFeaturePropInstructionsVer13(
+ instructionIds
+ );
+ }
+
+ public OFTableFeaturePropInstructionsMiss.Builder buildTableFeaturePropInstructionsMiss() {
+ return new OFTableFeaturePropInstructionsMissVer13.Builder();
+ }
+ public OFTableFeaturePropInstructionsMiss tableFeaturePropInstructionsMiss(List<OFInstructionId> instructionIds) {
+ return new OFTableFeaturePropInstructionsMissVer13(
+ instructionIds
+ );
+ }
+
+ public OFTableFeaturePropMatch.Builder buildTableFeaturePropMatch() {
+ return new OFTableFeaturePropMatchVer13.Builder();
+ }
+ public OFTableFeaturePropMatch tableFeaturePropMatch(List<U32> oxmIds) {
+ return new OFTableFeaturePropMatchVer13(
+ oxmIds
+ );
+ }
+
+ public OFTableFeaturePropNextTables.Builder buildTableFeaturePropNextTables() {
+ return new OFTableFeaturePropNextTablesVer13.Builder();
+ }
+ public OFTableFeaturePropNextTables tableFeaturePropNextTables(List<U8> nextTableIds) {
+ return new OFTableFeaturePropNextTablesVer13(
+ nextTableIds
+ );
+ }
+
+ public OFTableFeaturePropNextTablesMiss.Builder buildTableFeaturePropNextTablesMiss() {
+ return new OFTableFeaturePropNextTablesMissVer13.Builder();
+ }
+ public OFTableFeaturePropNextTablesMiss tableFeaturePropNextTablesMiss(List<U8> nextTableIds) {
+ return new OFTableFeaturePropNextTablesMissVer13(
+ nextTableIds
+ );
+ }
+
+ public OFTableFeaturePropWildcards.Builder buildTableFeaturePropWildcards() {
+ return new OFTableFeaturePropWildcardsVer13.Builder();
+ }
+ public OFTableFeaturePropWildcards tableFeaturePropWildcards(List<U32> oxmIds) {
+ return new OFTableFeaturePropWildcardsVer13(
+ oxmIds
+ );
+ }
+
+ public OFTableFeaturePropWriteActions.Builder buildTableFeaturePropWriteActions() {
+ return new OFTableFeaturePropWriteActionsVer13.Builder();
+ }
+ public OFTableFeaturePropWriteActions tableFeaturePropWriteActions(List<OFActionId> actionIds) {
+ return new OFTableFeaturePropWriteActionsVer13(
+ actionIds
+ );
+ }
+
+ public OFTableFeaturePropWriteActionsMiss.Builder buildTableFeaturePropWriteActionsMiss() {
+ return new OFTableFeaturePropWriteActionsMissVer13.Builder();
+ }
+ public OFTableFeaturePropWriteActionsMiss tableFeaturePropWriteActionsMiss(List<OFActionId> actionIds) {
+ return new OFTableFeaturePropWriteActionsMissVer13(
+ actionIds
+ );
+ }
+
+ public OFTableFeaturePropWriteSetfield.Builder buildTableFeaturePropWriteSetfield() {
+ return new OFTableFeaturePropWriteSetfieldVer13.Builder();
+ }
+ public OFTableFeaturePropWriteSetfield tableFeaturePropWriteSetfield(List<U32> oxmIds) {
+ return new OFTableFeaturePropWriteSetfieldVer13(
+ oxmIds
+ );
+ }
+
+ public OFTableFeaturePropWriteSetfieldMiss.Builder buildTableFeaturePropWriteSetfieldMiss() {
+ return new OFTableFeaturePropWriteSetfieldMissVer13.Builder();
+ }
+ public OFTableFeaturePropWriteSetfieldMiss tableFeaturePropWriteSetfieldMiss(List<U32> oxmIds) {
+ return new OFTableFeaturePropWriteSetfieldMissVer13(
+ oxmIds
+ );
+ }
+
+ public OFTableFeatures.Builder buildTableFeatures() {
+ return new OFTableFeaturesVer13.Builder();
+ }
+
+ public OFTableFeaturesStatsReply.Builder buildTableFeaturesStatsReply() {
+ return new OFTableFeaturesStatsReplyVer13.Builder().setXid(nextXid());
+ }
+
+ public OFTableFeaturesStatsRequest.Builder buildTableFeaturesStatsRequest() {
+ return new OFTableFeaturesStatsRequestVer13.Builder().setXid(nextXid());
+ }
+
+ public OFUint64.Builder buildUint64() {
+ return new OFUint64Ver13.Builder();
+ }
+ public OFUint64 uint64(U64 value) {
+ return new OFUint64Ver13(
+ value
+ );
+ }
+
+ public OFMessageReader<OFMessage> getReader() {
+ return OFMessageVer13.READER;
+ }
+
+ public long nextXid() {
+ return xidGenerator.nextXid();
+ }
+
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFeaturesReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFeaturesReplyVer13.java
new file mode 100644
index 0000000..2f9c36b
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFeaturesReplyVer13.java
@@ -0,0 +1,624 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import java.util.List;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFFeaturesReplyVer13 implements OFFeaturesReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFFeaturesReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 32;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static DatapathId DEFAULT_DATAPATH_ID = DatapathId.NONE;
+ private final static long DEFAULT_N_BUFFERS = 0x0L;
+ private final static short DEFAULT_N_TABLES = (short) 0x0;
+ private final static OFAuxId DEFAULT_AUXILIARY_ID = OFAuxId.MAIN;
+ private final static Set<OFCapabilities> DEFAULT_CAPABILITIES = ImmutableSet.<OFCapabilities>of();
+ private final static long DEFAULT_RESERVED = 0x0L;
+
+ // OF message fields
+ private final long xid;
+ private final DatapathId datapathId;
+ private final long nBuffers;
+ private final short nTables;
+ private final OFAuxId auxiliaryId;
+ private final Set<OFCapabilities> capabilities;
+ private final long reserved;
+//
+ // Immutable default instance
+ final static OFFeaturesReplyVer13 DEFAULT = new OFFeaturesReplyVer13(
+ DEFAULT_XID, DEFAULT_DATAPATH_ID, DEFAULT_N_BUFFERS, DEFAULT_N_TABLES, DEFAULT_AUXILIARY_ID, DEFAULT_CAPABILITIES, DEFAULT_RESERVED
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFFeaturesReplyVer13(long xid, DatapathId datapathId, long nBuffers, short nTables, OFAuxId auxiliaryId, Set<OFCapabilities> capabilities, long reserved) {
+ this.xid = xid;
+ this.datapathId = datapathId;
+ this.nBuffers = nBuffers;
+ this.nTables = nTables;
+ this.auxiliaryId = auxiliaryId;
+ this.capabilities = capabilities;
+ this.reserved = reserved;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.FEATURES_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public DatapathId getDatapathId() {
+ return datapathId;
+ }
+
+ @Override
+ public long getNBuffers() {
+ return nBuffers;
+ }
+
+ @Override
+ public short getNTables() {
+ return nTables;
+ }
+
+ @Override
+ public Set<OFCapabilities> getCapabilities() {
+ return capabilities;
+ }
+
+ @Override
+ public long getReserved() {
+ return reserved;
+ }
+
+ @Override
+ public List<OFPortDesc> getPorts()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property ports not supported in version 1.3");
+ }
+
+ @Override
+ public Set<OFActionType> getActions()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property actions not supported in version 1.3");
+ }
+
+ @Override
+ public OFAuxId getAuxiliaryId() {
+ return auxiliaryId;
+ }
+
+
+
+ public OFFeaturesReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFFeaturesReply.Builder {
+ final OFFeaturesReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean datapathIdSet;
+ private DatapathId datapathId;
+ private boolean nBuffersSet;
+ private long nBuffers;
+ private boolean nTablesSet;
+ private short nTables;
+ private boolean auxiliaryIdSet;
+ private OFAuxId auxiliaryId;
+ private boolean capabilitiesSet;
+ private Set<OFCapabilities> capabilities;
+ private boolean reservedSet;
+ private long reserved;
+
+ BuilderWithParent(OFFeaturesReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.FEATURES_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFFeaturesReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public DatapathId getDatapathId() {
+ return datapathId;
+ }
+
+ @Override
+ public OFFeaturesReply.Builder setDatapathId(DatapathId datapathId) {
+ this.datapathId = datapathId;
+ this.datapathIdSet = true;
+ return this;
+ }
+ @Override
+ public long getNBuffers() {
+ return nBuffers;
+ }
+
+ @Override
+ public OFFeaturesReply.Builder setNBuffers(long nBuffers) {
+ this.nBuffers = nBuffers;
+ this.nBuffersSet = true;
+ return this;
+ }
+ @Override
+ public short getNTables() {
+ return nTables;
+ }
+
+ @Override
+ public OFFeaturesReply.Builder setNTables(short nTables) {
+ this.nTables = nTables;
+ this.nTablesSet = true;
+ return this;
+ }
+ @Override
+ public Set<OFCapabilities> getCapabilities() {
+ return capabilities;
+ }
+
+ @Override
+ public OFFeaturesReply.Builder setCapabilities(Set<OFCapabilities> capabilities) {
+ this.capabilities = capabilities;
+ this.capabilitiesSet = true;
+ return this;
+ }
+ @Override
+ public long getReserved() {
+ return reserved;
+ }
+
+ @Override
+ public OFFeaturesReply.Builder setReserved(long reserved) {
+ this.reserved = reserved;
+ this.reservedSet = true;
+ return this;
+ }
+ @Override
+ public List<OFPortDesc> getPorts()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property ports not supported in version 1.3");
+ }
+
+ @Override
+ public OFFeaturesReply.Builder setPorts(List<OFPortDesc> ports) throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property ports not supported in version 1.3");
+ }
+ @Override
+ public Set<OFActionType> getActions()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property actions not supported in version 1.3");
+ }
+
+ @Override
+ public OFFeaturesReply.Builder setActions(Set<OFActionType> actions) throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property actions not supported in version 1.3");
+ }
+ @Override
+ public OFAuxId getAuxiliaryId() {
+ return auxiliaryId;
+ }
+
+ @Override
+ public OFFeaturesReply.Builder setAuxiliaryId(OFAuxId auxiliaryId) {
+ this.auxiliaryId = auxiliaryId;
+ this.auxiliaryIdSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFFeaturesReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ DatapathId datapathId = this.datapathIdSet ? this.datapathId : parentMessage.datapathId;
+ if(datapathId == null)
+ throw new NullPointerException("Property datapathId must not be null");
+ long nBuffers = this.nBuffersSet ? this.nBuffers : parentMessage.nBuffers;
+ short nTables = this.nTablesSet ? this.nTables : parentMessage.nTables;
+ OFAuxId auxiliaryId = this.auxiliaryIdSet ? this.auxiliaryId : parentMessage.auxiliaryId;
+ if(auxiliaryId == null)
+ throw new NullPointerException("Property auxiliaryId must not be null");
+ Set<OFCapabilities> capabilities = this.capabilitiesSet ? this.capabilities : parentMessage.capabilities;
+ if(capabilities == null)
+ throw new NullPointerException("Property capabilities must not be null");
+ long reserved = this.reservedSet ? this.reserved : parentMessage.reserved;
+
+ //
+ return new OFFeaturesReplyVer13(
+ xid,
+ datapathId,
+ nBuffers,
+ nTables,
+ auxiliaryId,
+ capabilities,
+ reserved
+ );
+ }
+
+ }
+
+ static class Builder implements OFFeaturesReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean datapathIdSet;
+ private DatapathId datapathId;
+ private boolean nBuffersSet;
+ private long nBuffers;
+ private boolean nTablesSet;
+ private short nTables;
+ private boolean auxiliaryIdSet;
+ private OFAuxId auxiliaryId;
+ private boolean capabilitiesSet;
+ private Set<OFCapabilities> capabilities;
+ private boolean reservedSet;
+ private long reserved;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.FEATURES_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFFeaturesReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public DatapathId getDatapathId() {
+ return datapathId;
+ }
+
+ @Override
+ public OFFeaturesReply.Builder setDatapathId(DatapathId datapathId) {
+ this.datapathId = datapathId;
+ this.datapathIdSet = true;
+ return this;
+ }
+ @Override
+ public long getNBuffers() {
+ return nBuffers;
+ }
+
+ @Override
+ public OFFeaturesReply.Builder setNBuffers(long nBuffers) {
+ this.nBuffers = nBuffers;
+ this.nBuffersSet = true;
+ return this;
+ }
+ @Override
+ public short getNTables() {
+ return nTables;
+ }
+
+ @Override
+ public OFFeaturesReply.Builder setNTables(short nTables) {
+ this.nTables = nTables;
+ this.nTablesSet = true;
+ return this;
+ }
+ @Override
+ public Set<OFCapabilities> getCapabilities() {
+ return capabilities;
+ }
+
+ @Override
+ public OFFeaturesReply.Builder setCapabilities(Set<OFCapabilities> capabilities) {
+ this.capabilities = capabilities;
+ this.capabilitiesSet = true;
+ return this;
+ }
+ @Override
+ public long getReserved() {
+ return reserved;
+ }
+
+ @Override
+ public OFFeaturesReply.Builder setReserved(long reserved) {
+ this.reserved = reserved;
+ this.reservedSet = true;
+ return this;
+ }
+ @Override
+ public List<OFPortDesc> getPorts()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property ports not supported in version 1.3");
+ }
+
+ @Override
+ public OFFeaturesReply.Builder setPorts(List<OFPortDesc> ports) throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property ports not supported in version 1.3");
+ }
+ @Override
+ public Set<OFActionType> getActions()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property actions not supported in version 1.3");
+ }
+
+ @Override
+ public OFFeaturesReply.Builder setActions(Set<OFActionType> actions) throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property actions not supported in version 1.3");
+ }
+ @Override
+ public OFAuxId getAuxiliaryId() {
+ return auxiliaryId;
+ }
+
+ @Override
+ public OFFeaturesReply.Builder setAuxiliaryId(OFAuxId auxiliaryId) {
+ this.auxiliaryId = auxiliaryId;
+ this.auxiliaryIdSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFFeaturesReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ DatapathId datapathId = this.datapathIdSet ? this.datapathId : DEFAULT_DATAPATH_ID;
+ if(datapathId == null)
+ throw new NullPointerException("Property datapathId must not be null");
+ long nBuffers = this.nBuffersSet ? this.nBuffers : DEFAULT_N_BUFFERS;
+ short nTables = this.nTablesSet ? this.nTables : DEFAULT_N_TABLES;
+ OFAuxId auxiliaryId = this.auxiliaryIdSet ? this.auxiliaryId : DEFAULT_AUXILIARY_ID;
+ if(auxiliaryId == null)
+ throw new NullPointerException("Property auxiliaryId must not be null");
+ Set<OFCapabilities> capabilities = this.capabilitiesSet ? this.capabilities : DEFAULT_CAPABILITIES;
+ if(capabilities == null)
+ throw new NullPointerException("Property capabilities must not be null");
+ long reserved = this.reservedSet ? this.reserved : DEFAULT_RESERVED;
+
+
+ return new OFFeaturesReplyVer13(
+ xid,
+ datapathId,
+ nBuffers,
+ nTables,
+ auxiliaryId,
+ capabilities,
+ reserved
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFFeaturesReply> {
+ @Override
+ public OFFeaturesReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 6
+ byte type = bb.readByte();
+ if(type != (byte) 0x6)
+ throw new OFParseError("Wrong type: Expected=OFType.FEATURES_REPLY(6), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 32)
+ throw new OFParseError("Wrong length: Expected=32(32), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ DatapathId datapathId = DatapathId.of(bb.readLong());
+ long nBuffers = U32.f(bb.readInt());
+ short nTables = U8.f(bb.readByte());
+ OFAuxId auxiliaryId = OFAuxId.readByte(bb);
+ // pad: 2 bytes
+ bb.skipBytes(2);
+ Set<OFCapabilities> capabilities = OFCapabilitiesSerializerVer13.readFrom(bb);
+ long reserved = U32.f(bb.readInt());
+
+ OFFeaturesReplyVer13 featuresReplyVer13 = new OFFeaturesReplyVer13(
+ xid,
+ datapathId,
+ nBuffers,
+ nTables,
+ auxiliaryId,
+ capabilities,
+ reserved
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", featuresReplyVer13);
+ return featuresReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFFeaturesReplyVer13Funnel FUNNEL = new OFFeaturesReplyVer13Funnel();
+ static class OFFeaturesReplyVer13Funnel implements Funnel<OFFeaturesReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFFeaturesReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 6
+ sink.putByte((byte) 0x6);
+ // fixed value property length = 32
+ sink.putShort((short) 0x20);
+ sink.putLong(message.xid);
+ message.datapathId.putTo(sink);
+ sink.putLong(message.nBuffers);
+ sink.putShort(message.nTables);
+ message.auxiliaryId.putTo(sink);
+ // skip pad (2 bytes)
+ OFCapabilitiesSerializerVer13.putTo(message.capabilities, sink);
+ sink.putLong(message.reserved);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFFeaturesReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFFeaturesReplyVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 6
+ bb.writeByte((byte) 0x6);
+ // fixed value property length = 32
+ bb.writeShort((short) 0x20);
+ bb.writeInt(U32.t(message.xid));
+ bb.writeLong(message.datapathId.getLong());
+ bb.writeInt(U32.t(message.nBuffers));
+ bb.writeByte(U8.t(message.nTables));
+ message.auxiliaryId.writeByte(bb);
+ // pad: 2 bytes
+ bb.writeZero(2);
+ OFCapabilitiesSerializerVer13.writeTo(bb, message.capabilities);
+ bb.writeInt(U32.t(message.reserved));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFFeaturesReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("datapathId=").append(datapathId);
+ b.append(", ");
+ b.append("nBuffers=").append(nBuffers);
+ b.append(", ");
+ b.append("nTables=").append(nTables);
+ b.append(", ");
+ b.append("auxiliaryId=").append(auxiliaryId);
+ b.append(", ");
+ b.append("capabilities=").append(capabilities);
+ b.append(", ");
+ b.append("reserved=").append(reserved);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFFeaturesReplyVer13 other = (OFFeaturesReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (datapathId == null) {
+ if (other.datapathId != null)
+ return false;
+ } else if (!datapathId.equals(other.datapathId))
+ return false;
+ if( nBuffers != other.nBuffers)
+ return false;
+ if( nTables != other.nTables)
+ return false;
+ if (auxiliaryId == null) {
+ if (other.auxiliaryId != null)
+ return false;
+ } else if (!auxiliaryId.equals(other.auxiliaryId))
+ return false;
+ if (capabilities == null) {
+ if (other.capabilities != null)
+ return false;
+ } else if (!capabilities.equals(other.capabilities))
+ return false;
+ if( reserved != other.reserved)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((datapathId == null) ? 0 : datapathId.hashCode());
+ result = prime * (int) (nBuffers ^ (nBuffers >>> 32));
+ result = prime * result + nTables;
+ result = prime * result + ((auxiliaryId == null) ? 0 : auxiliaryId.hashCode());
+ result = prime * result + ((capabilities == null) ? 0 : capabilities.hashCode());
+ result = prime * (int) (reserved ^ (reserved >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFeaturesRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFeaturesRequestVer13.java
new file mode 100644
index 0000000..3b10c55
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFeaturesRequestVer13.java
@@ -0,0 +1,268 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFFeaturesRequestVer13 implements OFFeaturesRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFFeaturesRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static long DEFAULT_XID = 0x0L;
+
+ // OF message fields
+ private final long xid;
+//
+ // Immutable default instance
+ final static OFFeaturesRequestVer13 DEFAULT = new OFFeaturesRequestVer13(
+ DEFAULT_XID
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFFeaturesRequestVer13(long xid) {
+ this.xid = xid;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.FEATURES_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+
+
+ public OFFeaturesRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFFeaturesRequest.Builder {
+ final OFFeaturesRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+
+ BuilderWithParent(OFFeaturesRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.FEATURES_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFFeaturesRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFFeaturesRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+
+ //
+ return new OFFeaturesRequestVer13(
+ xid
+ );
+ }
+
+ }
+
+ static class Builder implements OFFeaturesRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.FEATURES_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFFeaturesRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFFeaturesRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+
+
+ return new OFFeaturesRequestVer13(
+ xid
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFFeaturesRequest> {
+ @Override
+ public OFFeaturesRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 5
+ byte type = bb.readByte();
+ if(type != (byte) 0x5)
+ throw new OFParseError("Wrong type: Expected=OFType.FEATURES_REQUEST(5), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 8)
+ throw new OFParseError("Wrong length: Expected=8(8), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+
+ OFFeaturesRequestVer13 featuresRequestVer13 = new OFFeaturesRequestVer13(
+ xid
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", featuresRequestVer13);
+ return featuresRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFFeaturesRequestVer13Funnel FUNNEL = new OFFeaturesRequestVer13Funnel();
+ static class OFFeaturesRequestVer13Funnel implements Funnel<OFFeaturesRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFFeaturesRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 5
+ sink.putByte((byte) 0x5);
+ // fixed value property length = 8
+ sink.putShort((short) 0x8);
+ sink.putLong(message.xid);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFFeaturesRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFFeaturesRequestVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 5
+ bb.writeByte((byte) 0x5);
+ // fixed value property length = 8
+ bb.writeShort((short) 0x8);
+ bb.writeInt(U32.t(message.xid));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFFeaturesRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFFeaturesRequestVer13 other = (OFFeaturesRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowAddVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowAddVer13.java
new file mode 100644
index 0000000..44a9cf5
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowAddVer13.java
@@ -0,0 +1,987 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import java.util.Collections;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFFlowAddVer13 implements OFFlowAdd {
+ private static final Logger logger = LoggerFactory.getLogger(OFFlowAddVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 56;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static U64 DEFAULT_COOKIE = U64.ZERO;
+ private final static U64 DEFAULT_COOKIE_MASK = U64.ZERO;
+ private final static TableId DEFAULT_TABLE_ID = TableId.ZERO;
+ private final static int DEFAULT_IDLE_TIMEOUT = 0x0;
+ private final static int DEFAULT_HARD_TIMEOUT = 0x0;
+ private final static int DEFAULT_PRIORITY = 0x0;
+ private final static OFBufferId DEFAULT_BUFFER_ID = OFBufferId.NO_BUFFER;
+ private final static OFPort DEFAULT_OUT_PORT = OFPort.ANY;
+ private final static OFGroup DEFAULT_OUT_GROUP = OFGroup.ANY;
+ private final static Set<OFFlowModFlags> DEFAULT_FLAGS = ImmutableSet.<OFFlowModFlags>of();
+ private final static Match DEFAULT_MATCH = OFFactoryVer13.MATCH_WILDCARD_ALL;
+ private final static List<OFInstruction> DEFAULT_INSTRUCTIONS = ImmutableList.<OFInstruction>of();
+
+ // OF message fields
+ private final long xid;
+ private final U64 cookie;
+ private final U64 cookieMask;
+ private final TableId tableId;
+ private final int idleTimeout;
+ private final int hardTimeout;
+ private final int priority;
+ private final OFBufferId bufferId;
+ private final OFPort outPort;
+ private final OFGroup outGroup;
+ private final Set<OFFlowModFlags> flags;
+ private final Match match;
+ private final List<OFInstruction> instructions;
+//
+ // Immutable default instance
+ final static OFFlowAddVer13 DEFAULT = new OFFlowAddVer13(
+ DEFAULT_XID, DEFAULT_COOKIE, DEFAULT_COOKIE_MASK, DEFAULT_TABLE_ID, DEFAULT_IDLE_TIMEOUT, DEFAULT_HARD_TIMEOUT, DEFAULT_PRIORITY, DEFAULT_BUFFER_ID, DEFAULT_OUT_PORT, DEFAULT_OUT_GROUP, DEFAULT_FLAGS, DEFAULT_MATCH, DEFAULT_INSTRUCTIONS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFFlowAddVer13(long xid, U64 cookie, U64 cookieMask, TableId tableId, int idleTimeout, int hardTimeout, int priority, OFBufferId bufferId, OFPort outPort, OFGroup outGroup, Set<OFFlowModFlags> flags, Match match, List<OFInstruction> instructions) {
+ this.xid = xid;
+ this.cookie = cookie;
+ this.cookieMask = cookieMask;
+ this.tableId = tableId;
+ this.idleTimeout = idleTimeout;
+ this.hardTimeout = hardTimeout;
+ this.priority = priority;
+ this.bufferId = bufferId;
+ this.outPort = outPort;
+ this.outGroup = outGroup;
+ this.flags = flags;
+ this.match = match;
+ this.instructions = instructions;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.FLOW_MOD;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public U64 getCookie() {
+ return cookie;
+ }
+
+ @Override
+ public U64 getCookieMask() {
+ return cookieMask;
+ }
+
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFFlowModCommand getCommand() {
+ return OFFlowModCommand.ADD;
+ }
+
+ @Override
+ public int getIdleTimeout() {
+ return idleTimeout;
+ }
+
+ @Override
+ public int getHardTimeout() {
+ return hardTimeout;
+ }
+
+ @Override
+ public int getPriority() {
+ return priority;
+ }
+
+ @Override
+ public OFBufferId getBufferId() {
+ return bufferId;
+ }
+
+ @Override
+ public OFPort getOutPort() {
+ return outPort;
+ }
+
+ @Override
+ public OFGroup getOutGroup() {
+ return outGroup;
+ }
+
+ @Override
+ public Set<OFFlowModFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public Match getMatch() {
+ return match;
+ }
+
+ @Override
+ public List<OFInstruction> getInstructions() {
+ return instructions;
+ }
+
+
+ @Override
+ public List<OFAction> getActions()throws UnsupportedOperationException {
+ for (OFInstruction inst : this.instructions) {
+ if (inst instanceof OFInstructionApplyActions) {
+ OFInstructionApplyActions iap = (OFInstructionApplyActions)inst;
+ return iap.getActions();
+ }
+ }
+ return Collections.emptyList();
+ }
+
+
+ public OFFlowAdd.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFFlowAdd.Builder {
+ final OFFlowAddVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean cookieSet;
+ private U64 cookie;
+ private boolean cookieMaskSet;
+ private U64 cookieMask;
+ private boolean tableIdSet;
+ private TableId tableId;
+ private boolean idleTimeoutSet;
+ private int idleTimeout;
+ private boolean hardTimeoutSet;
+ private int hardTimeout;
+ private boolean prioritySet;
+ private int priority;
+ private boolean bufferIdSet;
+ private OFBufferId bufferId;
+ private boolean outPortSet;
+ private OFPort outPort;
+ private boolean outGroupSet;
+ private OFGroup outGroup;
+ private boolean flagsSet;
+ private Set<OFFlowModFlags> flags;
+ private boolean matchSet;
+ private Match match;
+ private boolean instructionsSet;
+ private List<OFInstruction> instructions;
+
+ BuilderWithParent(OFFlowAddVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.FLOW_MOD;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFFlowAdd.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public U64 getCookie() {
+ return cookie;
+ }
+
+ @Override
+ public OFFlowAdd.Builder setCookie(U64 cookie) {
+ this.cookie = cookie;
+ this.cookieSet = true;
+ return this;
+ }
+ @Override
+ public U64 getCookieMask() {
+ return cookieMask;
+ }
+
+ @Override
+ public OFFlowAdd.Builder setCookieMask(U64 cookieMask) {
+ this.cookieMask = cookieMask;
+ this.cookieMaskSet = true;
+ return this;
+ }
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFFlowAdd.Builder setTableId(TableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+ @Override
+ public OFFlowModCommand getCommand() {
+ return OFFlowModCommand.ADD;
+ }
+
+ @Override
+ public int getIdleTimeout() {
+ return idleTimeout;
+ }
+
+ @Override
+ public OFFlowAdd.Builder setIdleTimeout(int idleTimeout) {
+ this.idleTimeout = idleTimeout;
+ this.idleTimeoutSet = true;
+ return this;
+ }
+ @Override
+ public int getHardTimeout() {
+ return hardTimeout;
+ }
+
+ @Override
+ public OFFlowAdd.Builder setHardTimeout(int hardTimeout) {
+ this.hardTimeout = hardTimeout;
+ this.hardTimeoutSet = true;
+ return this;
+ }
+ @Override
+ public int getPriority() {
+ return priority;
+ }
+
+ @Override
+ public OFFlowAdd.Builder setPriority(int priority) {
+ this.priority = priority;
+ this.prioritySet = true;
+ return this;
+ }
+ @Override
+ public OFBufferId getBufferId() {
+ return bufferId;
+ }
+
+ @Override
+ public OFFlowAdd.Builder setBufferId(OFBufferId bufferId) {
+ this.bufferId = bufferId;
+ this.bufferIdSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getOutPort() {
+ return outPort;
+ }
+
+ @Override
+ public OFFlowAdd.Builder setOutPort(OFPort outPort) {
+ this.outPort = outPort;
+ this.outPortSet = true;
+ return this;
+ }
+ @Override
+ public OFGroup getOutGroup() {
+ return outGroup;
+ }
+
+ @Override
+ public OFFlowAdd.Builder setOutGroup(OFGroup outGroup) {
+ this.outGroup = outGroup;
+ this.outGroupSet = true;
+ return this;
+ }
+ @Override
+ public Set<OFFlowModFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFFlowAdd.Builder setFlags(Set<OFFlowModFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public Match getMatch() {
+ return match;
+ }
+
+ @Override
+ public OFFlowAdd.Builder setMatch(Match match) {
+ this.match = match;
+ this.matchSet = true;
+ return this;
+ }
+ @Override
+ public List<OFInstruction> getInstructions() {
+ return instructions;
+ }
+
+ @Override
+ public OFFlowAdd.Builder setInstructions(List<OFInstruction> instructions) {
+ this.instructions = instructions;
+ this.instructionsSet = true;
+ return this;
+ }
+
+ @Override
+ public List<OFAction> getActions()throws UnsupportedOperationException {
+ if (!this.instructionsSet)
+ return parentMessage.getActions();
+ for (OFInstruction inst : this.instructions) {
+ if (inst instanceof OFInstructionApplyActions) {
+ OFInstructionApplyActions iap = (OFInstructionApplyActions)inst;
+ return iap.getActions();
+ }
+ }
+ return Collections.emptyList();
+ }
+
+ @Override
+ public OFFlowAdd.Builder setActions(List<OFAction> actions) throws UnsupportedOperationException {
+ OFInstructionApplyActionsVer13.Builder builder = new OFInstructionApplyActionsVer13.Builder();
+ builder.setActions(actions);
+ this.instructions = Collections.singletonList((OFInstruction)builder.build());
+ this.instructionsSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFFlowAdd build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ U64 cookie = this.cookieSet ? this.cookie : parentMessage.cookie;
+ if(cookie == null)
+ throw new NullPointerException("Property cookie must not be null");
+ U64 cookieMask = this.cookieMaskSet ? this.cookieMask : parentMessage.cookieMask;
+ if(cookieMask == null)
+ throw new NullPointerException("Property cookieMask must not be null");
+ TableId tableId = this.tableIdSet ? this.tableId : parentMessage.tableId;
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+ int idleTimeout = this.idleTimeoutSet ? this.idleTimeout : parentMessage.idleTimeout;
+ int hardTimeout = this.hardTimeoutSet ? this.hardTimeout : parentMessage.hardTimeout;
+ int priority = this.prioritySet ? this.priority : parentMessage.priority;
+ OFBufferId bufferId = this.bufferIdSet ? this.bufferId : parentMessage.bufferId;
+ if(bufferId == null)
+ throw new NullPointerException("Property bufferId must not be null");
+ OFPort outPort = this.outPortSet ? this.outPort : parentMessage.outPort;
+ if(outPort == null)
+ throw new NullPointerException("Property outPort must not be null");
+ OFGroup outGroup = this.outGroupSet ? this.outGroup : parentMessage.outGroup;
+ if(outGroup == null)
+ throw new NullPointerException("Property outGroup must not be null");
+ Set<OFFlowModFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ Match match = this.matchSet ? this.match : parentMessage.match;
+ if(match == null)
+ throw new NullPointerException("Property match must not be null");
+ List<OFInstruction> instructions = this.instructionsSet ? this.instructions : parentMessage.instructions;
+ if(instructions == null)
+ throw new NullPointerException("Property instructions must not be null");
+
+ //
+ return new OFFlowAddVer13(
+ xid,
+ cookie,
+ cookieMask,
+ tableId,
+ idleTimeout,
+ hardTimeout,
+ priority,
+ bufferId,
+ outPort,
+ outGroup,
+ flags,
+ match,
+ instructions
+ );
+ }
+
+ }
+
+ static class Builder implements OFFlowAdd.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean cookieSet;
+ private U64 cookie;
+ private boolean cookieMaskSet;
+ private U64 cookieMask;
+ private boolean tableIdSet;
+ private TableId tableId;
+ private boolean idleTimeoutSet;
+ private int idleTimeout;
+ private boolean hardTimeoutSet;
+ private int hardTimeout;
+ private boolean prioritySet;
+ private int priority;
+ private boolean bufferIdSet;
+ private OFBufferId bufferId;
+ private boolean outPortSet;
+ private OFPort outPort;
+ private boolean outGroupSet;
+ private OFGroup outGroup;
+ private boolean flagsSet;
+ private Set<OFFlowModFlags> flags;
+ private boolean matchSet;
+ private Match match;
+ private boolean instructionsSet;
+ private List<OFInstruction> instructions;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.FLOW_MOD;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFFlowAdd.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public U64 getCookie() {
+ return cookie;
+ }
+
+ @Override
+ public OFFlowAdd.Builder setCookie(U64 cookie) {
+ this.cookie = cookie;
+ this.cookieSet = true;
+ return this;
+ }
+ @Override
+ public U64 getCookieMask() {
+ return cookieMask;
+ }
+
+ @Override
+ public OFFlowAdd.Builder setCookieMask(U64 cookieMask) {
+ this.cookieMask = cookieMask;
+ this.cookieMaskSet = true;
+ return this;
+ }
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFFlowAdd.Builder setTableId(TableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+ @Override
+ public OFFlowModCommand getCommand() {
+ return OFFlowModCommand.ADD;
+ }
+
+ @Override
+ public int getIdleTimeout() {
+ return idleTimeout;
+ }
+
+ @Override
+ public OFFlowAdd.Builder setIdleTimeout(int idleTimeout) {
+ this.idleTimeout = idleTimeout;
+ this.idleTimeoutSet = true;
+ return this;
+ }
+ @Override
+ public int getHardTimeout() {
+ return hardTimeout;
+ }
+
+ @Override
+ public OFFlowAdd.Builder setHardTimeout(int hardTimeout) {
+ this.hardTimeout = hardTimeout;
+ this.hardTimeoutSet = true;
+ return this;
+ }
+ @Override
+ public int getPriority() {
+ return priority;
+ }
+
+ @Override
+ public OFFlowAdd.Builder setPriority(int priority) {
+ this.priority = priority;
+ this.prioritySet = true;
+ return this;
+ }
+ @Override
+ public OFBufferId getBufferId() {
+ return bufferId;
+ }
+
+ @Override
+ public OFFlowAdd.Builder setBufferId(OFBufferId bufferId) {
+ this.bufferId = bufferId;
+ this.bufferIdSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getOutPort() {
+ return outPort;
+ }
+
+ @Override
+ public OFFlowAdd.Builder setOutPort(OFPort outPort) {
+ this.outPort = outPort;
+ this.outPortSet = true;
+ return this;
+ }
+ @Override
+ public OFGroup getOutGroup() {
+ return outGroup;
+ }
+
+ @Override
+ public OFFlowAdd.Builder setOutGroup(OFGroup outGroup) {
+ this.outGroup = outGroup;
+ this.outGroupSet = true;
+ return this;
+ }
+ @Override
+ public Set<OFFlowModFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFFlowAdd.Builder setFlags(Set<OFFlowModFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public Match getMatch() {
+ return match;
+ }
+
+ @Override
+ public OFFlowAdd.Builder setMatch(Match match) {
+ this.match = match;
+ this.matchSet = true;
+ return this;
+ }
+ @Override
+ public List<OFInstruction> getInstructions() {
+ return instructions;
+ }
+
+ @Override
+ public OFFlowAdd.Builder setInstructions(List<OFInstruction> instructions) {
+ this.instructions = instructions;
+ this.instructionsSet = true;
+ return this;
+ }
+
+ @Override
+ public List<OFAction> getActions()throws UnsupportedOperationException {
+ if (!this.instructionsSet)
+ return Collections.emptyList();
+ for (OFInstruction inst : this.instructions) {
+ if (inst instanceof OFInstructionApplyActions) {
+ OFInstructionApplyActions iap = (OFInstructionApplyActions)inst;
+ return iap.getActions();
+ }
+ }
+ return Collections.emptyList();
+ }
+
+ @Override
+ public OFFlowAdd.Builder setActions(List<OFAction> actions) throws UnsupportedOperationException {
+ OFInstructionApplyActionsVer13.Builder builder = new OFInstructionApplyActionsVer13.Builder();
+ builder.setActions(actions);
+ this.instructions = Collections.singletonList((OFInstruction)builder.build());
+ this.instructionsSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFFlowAdd build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ U64 cookie = this.cookieSet ? this.cookie : DEFAULT_COOKIE;
+ if(cookie == null)
+ throw new NullPointerException("Property cookie must not be null");
+ U64 cookieMask = this.cookieMaskSet ? this.cookieMask : DEFAULT_COOKIE_MASK;
+ if(cookieMask == null)
+ throw new NullPointerException("Property cookieMask must not be null");
+ TableId tableId = this.tableIdSet ? this.tableId : DEFAULT_TABLE_ID;
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+ int idleTimeout = this.idleTimeoutSet ? this.idleTimeout : DEFAULT_IDLE_TIMEOUT;
+ int hardTimeout = this.hardTimeoutSet ? this.hardTimeout : DEFAULT_HARD_TIMEOUT;
+ int priority = this.prioritySet ? this.priority : DEFAULT_PRIORITY;
+ OFBufferId bufferId = this.bufferIdSet ? this.bufferId : DEFAULT_BUFFER_ID;
+ if(bufferId == null)
+ throw new NullPointerException("Property bufferId must not be null");
+ OFPort outPort = this.outPortSet ? this.outPort : DEFAULT_OUT_PORT;
+ if(outPort == null)
+ throw new NullPointerException("Property outPort must not be null");
+ OFGroup outGroup = this.outGroupSet ? this.outGroup : DEFAULT_OUT_GROUP;
+ if(outGroup == null)
+ throw new NullPointerException("Property outGroup must not be null");
+ Set<OFFlowModFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ Match match = this.matchSet ? this.match : DEFAULT_MATCH;
+ if(match == null)
+ throw new NullPointerException("Property match must not be null");
+ List<OFInstruction> instructions = this.instructionsSet ? this.instructions : DEFAULT_INSTRUCTIONS;
+ if(instructions == null)
+ throw new NullPointerException("Property instructions must not be null");
+
+
+ return new OFFlowAddVer13(
+ xid,
+ cookie,
+ cookieMask,
+ tableId,
+ idleTimeout,
+ hardTimeout,
+ priority,
+ bufferId,
+ outPort,
+ outGroup,
+ flags,
+ match,
+ instructions
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFFlowAdd> {
+ @Override
+ public OFFlowAdd readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 14
+ byte type = bb.readByte();
+ if(type != (byte) 0xe)
+ throw new OFParseError("Wrong type: Expected=OFType.FLOW_MOD(14), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ U64 cookie = U64.ofRaw(bb.readLong());
+ U64 cookieMask = U64.ofRaw(bb.readLong());
+ TableId tableId = TableId.readByte(bb);
+ // fixed value property command == 0
+ short command = bb.readByte();
+ if(command != (short) 0x0)
+ throw new OFParseError("Wrong command: Expected=OFFlowModCommand.ADD(0), got="+command);
+ int idleTimeout = U16.f(bb.readShort());
+ int hardTimeout = U16.f(bb.readShort());
+ int priority = U16.f(bb.readShort());
+ OFBufferId bufferId = OFBufferId.of(bb.readInt());
+ OFPort outPort = OFPort.read4Bytes(bb);
+ OFGroup outGroup = OFGroup.read4Bytes(bb);
+ Set<OFFlowModFlags> flags = OFFlowModFlagsSerializerVer13.readFrom(bb);
+ // pad: 2 bytes
+ bb.skipBytes(2);
+ Match match = ChannelUtilsVer13.readOFMatch(bb);
+ List<OFInstruction> instructions = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFInstructionVer13.READER);
+
+ OFFlowAddVer13 flowAddVer13 = new OFFlowAddVer13(
+ xid,
+ cookie,
+ cookieMask,
+ tableId,
+ idleTimeout,
+ hardTimeout,
+ priority,
+ bufferId,
+ outPort,
+ outGroup,
+ flags,
+ match,
+ instructions
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", flowAddVer13);
+ return flowAddVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFFlowAddVer13Funnel FUNNEL = new OFFlowAddVer13Funnel();
+ static class OFFlowAddVer13Funnel implements Funnel<OFFlowAddVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFFlowAddVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 14
+ sink.putByte((byte) 0xe);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ message.cookie.putTo(sink);
+ message.cookieMask.putTo(sink);
+ message.tableId.putTo(sink);
+ // fixed value property command = 0
+ sink.putShort((short) 0x0);
+ sink.putInt(message.idleTimeout);
+ sink.putInt(message.hardTimeout);
+ sink.putInt(message.priority);
+ message.bufferId.putTo(sink);
+ message.outPort.putTo(sink);
+ message.outGroup.putTo(sink);
+ OFFlowModFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (2 bytes)
+ message.match.putTo(sink);
+ FunnelUtils.putList(message.instructions, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFFlowAddVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFFlowAddVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 14
+ bb.writeByte((byte) 0xe);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ bb.writeLong(message.cookie.getValue());
+ bb.writeLong(message.cookieMask.getValue());
+ message.tableId.writeByte(bb);
+ // fixed value property command = 0
+ bb.writeByte((short) 0x0);
+ bb.writeShort(U16.t(message.idleTimeout));
+ bb.writeShort(U16.t(message.hardTimeout));
+ bb.writeShort(U16.t(message.priority));
+ bb.writeInt(message.bufferId.getInt());
+ message.outPort.write4Bytes(bb);
+ message.outGroup.write4Bytes(bb);
+ OFFlowModFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 2 bytes
+ bb.writeZero(2);
+ message.match.writeTo(bb);
+ ChannelUtils.writeList(bb, message.instructions);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFFlowAddVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("cookie=").append(cookie);
+ b.append(", ");
+ b.append("cookieMask=").append(cookieMask);
+ b.append(", ");
+ b.append("tableId=").append(tableId);
+ b.append(", ");
+ b.append("idleTimeout=").append(idleTimeout);
+ b.append(", ");
+ b.append("hardTimeout=").append(hardTimeout);
+ b.append(", ");
+ b.append("priority=").append(priority);
+ b.append(", ");
+ b.append("bufferId=").append(bufferId);
+ b.append(", ");
+ b.append("outPort=").append(outPort);
+ b.append(", ");
+ b.append("outGroup=").append(outGroup);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("match=").append(match);
+ b.append(", ");
+ b.append("instructions=").append(instructions);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFFlowAddVer13 other = (OFFlowAddVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (cookie == null) {
+ if (other.cookie != null)
+ return false;
+ } else if (!cookie.equals(other.cookie))
+ return false;
+ if (cookieMask == null) {
+ if (other.cookieMask != null)
+ return false;
+ } else if (!cookieMask.equals(other.cookieMask))
+ return false;
+ if (tableId == null) {
+ if (other.tableId != null)
+ return false;
+ } else if (!tableId.equals(other.tableId))
+ return false;
+ if( idleTimeout != other.idleTimeout)
+ return false;
+ if( hardTimeout != other.hardTimeout)
+ return false;
+ if( priority != other.priority)
+ return false;
+ if (bufferId == null) {
+ if (other.bufferId != null)
+ return false;
+ } else if (!bufferId.equals(other.bufferId))
+ return false;
+ if (outPort == null) {
+ if (other.outPort != null)
+ return false;
+ } else if (!outPort.equals(other.outPort))
+ return false;
+ if (outGroup == null) {
+ if (other.outGroup != null)
+ return false;
+ } else if (!outGroup.equals(other.outGroup))
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if (match == null) {
+ if (other.match != null)
+ return false;
+ } else if (!match.equals(other.match))
+ return false;
+ if (instructions == null) {
+ if (other.instructions != null)
+ return false;
+ } else if (!instructions.equals(other.instructions))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((cookie == null) ? 0 : cookie.hashCode());
+ result = prime * result + ((cookieMask == null) ? 0 : cookieMask.hashCode());
+ result = prime * result + ((tableId == null) ? 0 : tableId.hashCode());
+ result = prime * result + idleTimeout;
+ result = prime * result + hardTimeout;
+ result = prime * result + priority;
+ result = prime * result + ((bufferId == null) ? 0 : bufferId.hashCode());
+ result = prime * result + ((outPort == null) ? 0 : outPort.hashCode());
+ result = prime * result + ((outGroup == null) ? 0 : outGroup.hashCode());
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * result + ((match == null) ? 0 : match.hashCode());
+ result = prime * result + ((instructions == null) ? 0 : instructions.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowDeleteStrictVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowDeleteStrictVer13.java
new file mode 100644
index 0000000..aacdb04
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowDeleteStrictVer13.java
@@ -0,0 +1,987 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import java.util.Collections;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFFlowDeleteStrictVer13 implements OFFlowDeleteStrict {
+ private static final Logger logger = LoggerFactory.getLogger(OFFlowDeleteStrictVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 56;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static U64 DEFAULT_COOKIE = U64.ZERO;
+ private final static U64 DEFAULT_COOKIE_MASK = U64.ZERO;
+ private final static TableId DEFAULT_TABLE_ID = TableId.ZERO;
+ private final static int DEFAULT_IDLE_TIMEOUT = 0x0;
+ private final static int DEFAULT_HARD_TIMEOUT = 0x0;
+ private final static int DEFAULT_PRIORITY = 0x0;
+ private final static OFBufferId DEFAULT_BUFFER_ID = OFBufferId.NO_BUFFER;
+ private final static OFPort DEFAULT_OUT_PORT = OFPort.ANY;
+ private final static OFGroup DEFAULT_OUT_GROUP = OFGroup.ANY;
+ private final static Set<OFFlowModFlags> DEFAULT_FLAGS = ImmutableSet.<OFFlowModFlags>of();
+ private final static Match DEFAULT_MATCH = OFFactoryVer13.MATCH_WILDCARD_ALL;
+ private final static List<OFInstruction> DEFAULT_INSTRUCTIONS = ImmutableList.<OFInstruction>of();
+
+ // OF message fields
+ private final long xid;
+ private final U64 cookie;
+ private final U64 cookieMask;
+ private final TableId tableId;
+ private final int idleTimeout;
+ private final int hardTimeout;
+ private final int priority;
+ private final OFBufferId bufferId;
+ private final OFPort outPort;
+ private final OFGroup outGroup;
+ private final Set<OFFlowModFlags> flags;
+ private final Match match;
+ private final List<OFInstruction> instructions;
+//
+ // Immutable default instance
+ final static OFFlowDeleteStrictVer13 DEFAULT = new OFFlowDeleteStrictVer13(
+ DEFAULT_XID, DEFAULT_COOKIE, DEFAULT_COOKIE_MASK, DEFAULT_TABLE_ID, DEFAULT_IDLE_TIMEOUT, DEFAULT_HARD_TIMEOUT, DEFAULT_PRIORITY, DEFAULT_BUFFER_ID, DEFAULT_OUT_PORT, DEFAULT_OUT_GROUP, DEFAULT_FLAGS, DEFAULT_MATCH, DEFAULT_INSTRUCTIONS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFFlowDeleteStrictVer13(long xid, U64 cookie, U64 cookieMask, TableId tableId, int idleTimeout, int hardTimeout, int priority, OFBufferId bufferId, OFPort outPort, OFGroup outGroup, Set<OFFlowModFlags> flags, Match match, List<OFInstruction> instructions) {
+ this.xid = xid;
+ this.cookie = cookie;
+ this.cookieMask = cookieMask;
+ this.tableId = tableId;
+ this.idleTimeout = idleTimeout;
+ this.hardTimeout = hardTimeout;
+ this.priority = priority;
+ this.bufferId = bufferId;
+ this.outPort = outPort;
+ this.outGroup = outGroup;
+ this.flags = flags;
+ this.match = match;
+ this.instructions = instructions;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.FLOW_MOD;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public U64 getCookie() {
+ return cookie;
+ }
+
+ @Override
+ public U64 getCookieMask() {
+ return cookieMask;
+ }
+
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFFlowModCommand getCommand() {
+ return OFFlowModCommand.DELETE_STRICT;
+ }
+
+ @Override
+ public int getIdleTimeout() {
+ return idleTimeout;
+ }
+
+ @Override
+ public int getHardTimeout() {
+ return hardTimeout;
+ }
+
+ @Override
+ public int getPriority() {
+ return priority;
+ }
+
+ @Override
+ public OFBufferId getBufferId() {
+ return bufferId;
+ }
+
+ @Override
+ public OFPort getOutPort() {
+ return outPort;
+ }
+
+ @Override
+ public OFGroup getOutGroup() {
+ return outGroup;
+ }
+
+ @Override
+ public Set<OFFlowModFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public Match getMatch() {
+ return match;
+ }
+
+ @Override
+ public List<OFInstruction> getInstructions() {
+ return instructions;
+ }
+
+
+ @Override
+ public List<OFAction> getActions()throws UnsupportedOperationException {
+ for (OFInstruction inst : this.instructions) {
+ if (inst instanceof OFInstructionApplyActions) {
+ OFInstructionApplyActions iap = (OFInstructionApplyActions)inst;
+ return iap.getActions();
+ }
+ }
+ return Collections.emptyList();
+ }
+
+
+ public OFFlowDeleteStrict.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFFlowDeleteStrict.Builder {
+ final OFFlowDeleteStrictVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean cookieSet;
+ private U64 cookie;
+ private boolean cookieMaskSet;
+ private U64 cookieMask;
+ private boolean tableIdSet;
+ private TableId tableId;
+ private boolean idleTimeoutSet;
+ private int idleTimeout;
+ private boolean hardTimeoutSet;
+ private int hardTimeout;
+ private boolean prioritySet;
+ private int priority;
+ private boolean bufferIdSet;
+ private OFBufferId bufferId;
+ private boolean outPortSet;
+ private OFPort outPort;
+ private boolean outGroupSet;
+ private OFGroup outGroup;
+ private boolean flagsSet;
+ private Set<OFFlowModFlags> flags;
+ private boolean matchSet;
+ private Match match;
+ private boolean instructionsSet;
+ private List<OFInstruction> instructions;
+
+ BuilderWithParent(OFFlowDeleteStrictVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.FLOW_MOD;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFFlowDeleteStrict.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public U64 getCookie() {
+ return cookie;
+ }
+
+ @Override
+ public OFFlowDeleteStrict.Builder setCookie(U64 cookie) {
+ this.cookie = cookie;
+ this.cookieSet = true;
+ return this;
+ }
+ @Override
+ public U64 getCookieMask() {
+ return cookieMask;
+ }
+
+ @Override
+ public OFFlowDeleteStrict.Builder setCookieMask(U64 cookieMask) {
+ this.cookieMask = cookieMask;
+ this.cookieMaskSet = true;
+ return this;
+ }
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFFlowDeleteStrict.Builder setTableId(TableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+ @Override
+ public OFFlowModCommand getCommand() {
+ return OFFlowModCommand.DELETE_STRICT;
+ }
+
+ @Override
+ public int getIdleTimeout() {
+ return idleTimeout;
+ }
+
+ @Override
+ public OFFlowDeleteStrict.Builder setIdleTimeout(int idleTimeout) {
+ this.idleTimeout = idleTimeout;
+ this.idleTimeoutSet = true;
+ return this;
+ }
+ @Override
+ public int getHardTimeout() {
+ return hardTimeout;
+ }
+
+ @Override
+ public OFFlowDeleteStrict.Builder setHardTimeout(int hardTimeout) {
+ this.hardTimeout = hardTimeout;
+ this.hardTimeoutSet = true;
+ return this;
+ }
+ @Override
+ public int getPriority() {
+ return priority;
+ }
+
+ @Override
+ public OFFlowDeleteStrict.Builder setPriority(int priority) {
+ this.priority = priority;
+ this.prioritySet = true;
+ return this;
+ }
+ @Override
+ public OFBufferId getBufferId() {
+ return bufferId;
+ }
+
+ @Override
+ public OFFlowDeleteStrict.Builder setBufferId(OFBufferId bufferId) {
+ this.bufferId = bufferId;
+ this.bufferIdSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getOutPort() {
+ return outPort;
+ }
+
+ @Override
+ public OFFlowDeleteStrict.Builder setOutPort(OFPort outPort) {
+ this.outPort = outPort;
+ this.outPortSet = true;
+ return this;
+ }
+ @Override
+ public OFGroup getOutGroup() {
+ return outGroup;
+ }
+
+ @Override
+ public OFFlowDeleteStrict.Builder setOutGroup(OFGroup outGroup) {
+ this.outGroup = outGroup;
+ this.outGroupSet = true;
+ return this;
+ }
+ @Override
+ public Set<OFFlowModFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFFlowDeleteStrict.Builder setFlags(Set<OFFlowModFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public Match getMatch() {
+ return match;
+ }
+
+ @Override
+ public OFFlowDeleteStrict.Builder setMatch(Match match) {
+ this.match = match;
+ this.matchSet = true;
+ return this;
+ }
+ @Override
+ public List<OFInstruction> getInstructions() {
+ return instructions;
+ }
+
+ @Override
+ public OFFlowDeleteStrict.Builder setInstructions(List<OFInstruction> instructions) {
+ this.instructions = instructions;
+ this.instructionsSet = true;
+ return this;
+ }
+
+ @Override
+ public List<OFAction> getActions()throws UnsupportedOperationException {
+ if (!this.instructionsSet)
+ return parentMessage.getActions();
+ for (OFInstruction inst : this.instructions) {
+ if (inst instanceof OFInstructionApplyActions) {
+ OFInstructionApplyActions iap = (OFInstructionApplyActions)inst;
+ return iap.getActions();
+ }
+ }
+ return Collections.emptyList();
+ }
+
+ @Override
+ public OFFlowDeleteStrict.Builder setActions(List<OFAction> actions) throws UnsupportedOperationException {
+ OFInstructionApplyActionsVer13.Builder builder = new OFInstructionApplyActionsVer13.Builder();
+ builder.setActions(actions);
+ this.instructions = Collections.singletonList((OFInstruction)builder.build());
+ this.instructionsSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFFlowDeleteStrict build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ U64 cookie = this.cookieSet ? this.cookie : parentMessage.cookie;
+ if(cookie == null)
+ throw new NullPointerException("Property cookie must not be null");
+ U64 cookieMask = this.cookieMaskSet ? this.cookieMask : parentMessage.cookieMask;
+ if(cookieMask == null)
+ throw new NullPointerException("Property cookieMask must not be null");
+ TableId tableId = this.tableIdSet ? this.tableId : parentMessage.tableId;
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+ int idleTimeout = this.idleTimeoutSet ? this.idleTimeout : parentMessage.idleTimeout;
+ int hardTimeout = this.hardTimeoutSet ? this.hardTimeout : parentMessage.hardTimeout;
+ int priority = this.prioritySet ? this.priority : parentMessage.priority;
+ OFBufferId bufferId = this.bufferIdSet ? this.bufferId : parentMessage.bufferId;
+ if(bufferId == null)
+ throw new NullPointerException("Property bufferId must not be null");
+ OFPort outPort = this.outPortSet ? this.outPort : parentMessage.outPort;
+ if(outPort == null)
+ throw new NullPointerException("Property outPort must not be null");
+ OFGroup outGroup = this.outGroupSet ? this.outGroup : parentMessage.outGroup;
+ if(outGroup == null)
+ throw new NullPointerException("Property outGroup must not be null");
+ Set<OFFlowModFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ Match match = this.matchSet ? this.match : parentMessage.match;
+ if(match == null)
+ throw new NullPointerException("Property match must not be null");
+ List<OFInstruction> instructions = this.instructionsSet ? this.instructions : parentMessage.instructions;
+ if(instructions == null)
+ throw new NullPointerException("Property instructions must not be null");
+
+ //
+ return new OFFlowDeleteStrictVer13(
+ xid,
+ cookie,
+ cookieMask,
+ tableId,
+ idleTimeout,
+ hardTimeout,
+ priority,
+ bufferId,
+ outPort,
+ outGroup,
+ flags,
+ match,
+ instructions
+ );
+ }
+
+ }
+
+ static class Builder implements OFFlowDeleteStrict.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean cookieSet;
+ private U64 cookie;
+ private boolean cookieMaskSet;
+ private U64 cookieMask;
+ private boolean tableIdSet;
+ private TableId tableId;
+ private boolean idleTimeoutSet;
+ private int idleTimeout;
+ private boolean hardTimeoutSet;
+ private int hardTimeout;
+ private boolean prioritySet;
+ private int priority;
+ private boolean bufferIdSet;
+ private OFBufferId bufferId;
+ private boolean outPortSet;
+ private OFPort outPort;
+ private boolean outGroupSet;
+ private OFGroup outGroup;
+ private boolean flagsSet;
+ private Set<OFFlowModFlags> flags;
+ private boolean matchSet;
+ private Match match;
+ private boolean instructionsSet;
+ private List<OFInstruction> instructions;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.FLOW_MOD;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFFlowDeleteStrict.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public U64 getCookie() {
+ return cookie;
+ }
+
+ @Override
+ public OFFlowDeleteStrict.Builder setCookie(U64 cookie) {
+ this.cookie = cookie;
+ this.cookieSet = true;
+ return this;
+ }
+ @Override
+ public U64 getCookieMask() {
+ return cookieMask;
+ }
+
+ @Override
+ public OFFlowDeleteStrict.Builder setCookieMask(U64 cookieMask) {
+ this.cookieMask = cookieMask;
+ this.cookieMaskSet = true;
+ return this;
+ }
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFFlowDeleteStrict.Builder setTableId(TableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+ @Override
+ public OFFlowModCommand getCommand() {
+ return OFFlowModCommand.DELETE_STRICT;
+ }
+
+ @Override
+ public int getIdleTimeout() {
+ return idleTimeout;
+ }
+
+ @Override
+ public OFFlowDeleteStrict.Builder setIdleTimeout(int idleTimeout) {
+ this.idleTimeout = idleTimeout;
+ this.idleTimeoutSet = true;
+ return this;
+ }
+ @Override
+ public int getHardTimeout() {
+ return hardTimeout;
+ }
+
+ @Override
+ public OFFlowDeleteStrict.Builder setHardTimeout(int hardTimeout) {
+ this.hardTimeout = hardTimeout;
+ this.hardTimeoutSet = true;
+ return this;
+ }
+ @Override
+ public int getPriority() {
+ return priority;
+ }
+
+ @Override
+ public OFFlowDeleteStrict.Builder setPriority(int priority) {
+ this.priority = priority;
+ this.prioritySet = true;
+ return this;
+ }
+ @Override
+ public OFBufferId getBufferId() {
+ return bufferId;
+ }
+
+ @Override
+ public OFFlowDeleteStrict.Builder setBufferId(OFBufferId bufferId) {
+ this.bufferId = bufferId;
+ this.bufferIdSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getOutPort() {
+ return outPort;
+ }
+
+ @Override
+ public OFFlowDeleteStrict.Builder setOutPort(OFPort outPort) {
+ this.outPort = outPort;
+ this.outPortSet = true;
+ return this;
+ }
+ @Override
+ public OFGroup getOutGroup() {
+ return outGroup;
+ }
+
+ @Override
+ public OFFlowDeleteStrict.Builder setOutGroup(OFGroup outGroup) {
+ this.outGroup = outGroup;
+ this.outGroupSet = true;
+ return this;
+ }
+ @Override
+ public Set<OFFlowModFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFFlowDeleteStrict.Builder setFlags(Set<OFFlowModFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public Match getMatch() {
+ return match;
+ }
+
+ @Override
+ public OFFlowDeleteStrict.Builder setMatch(Match match) {
+ this.match = match;
+ this.matchSet = true;
+ return this;
+ }
+ @Override
+ public List<OFInstruction> getInstructions() {
+ return instructions;
+ }
+
+ @Override
+ public OFFlowDeleteStrict.Builder setInstructions(List<OFInstruction> instructions) {
+ this.instructions = instructions;
+ this.instructionsSet = true;
+ return this;
+ }
+
+ @Override
+ public List<OFAction> getActions()throws UnsupportedOperationException {
+ if (!this.instructionsSet)
+ return Collections.emptyList();
+ for (OFInstruction inst : this.instructions) {
+ if (inst instanceof OFInstructionApplyActions) {
+ OFInstructionApplyActions iap = (OFInstructionApplyActions)inst;
+ return iap.getActions();
+ }
+ }
+ return Collections.emptyList();
+ }
+
+ @Override
+ public OFFlowDeleteStrict.Builder setActions(List<OFAction> actions) throws UnsupportedOperationException {
+ OFInstructionApplyActionsVer13.Builder builder = new OFInstructionApplyActionsVer13.Builder();
+ builder.setActions(actions);
+ this.instructions = Collections.singletonList((OFInstruction)builder.build());
+ this.instructionsSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFFlowDeleteStrict build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ U64 cookie = this.cookieSet ? this.cookie : DEFAULT_COOKIE;
+ if(cookie == null)
+ throw new NullPointerException("Property cookie must not be null");
+ U64 cookieMask = this.cookieMaskSet ? this.cookieMask : DEFAULT_COOKIE_MASK;
+ if(cookieMask == null)
+ throw new NullPointerException("Property cookieMask must not be null");
+ TableId tableId = this.tableIdSet ? this.tableId : DEFAULT_TABLE_ID;
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+ int idleTimeout = this.idleTimeoutSet ? this.idleTimeout : DEFAULT_IDLE_TIMEOUT;
+ int hardTimeout = this.hardTimeoutSet ? this.hardTimeout : DEFAULT_HARD_TIMEOUT;
+ int priority = this.prioritySet ? this.priority : DEFAULT_PRIORITY;
+ OFBufferId bufferId = this.bufferIdSet ? this.bufferId : DEFAULT_BUFFER_ID;
+ if(bufferId == null)
+ throw new NullPointerException("Property bufferId must not be null");
+ OFPort outPort = this.outPortSet ? this.outPort : DEFAULT_OUT_PORT;
+ if(outPort == null)
+ throw new NullPointerException("Property outPort must not be null");
+ OFGroup outGroup = this.outGroupSet ? this.outGroup : DEFAULT_OUT_GROUP;
+ if(outGroup == null)
+ throw new NullPointerException("Property outGroup must not be null");
+ Set<OFFlowModFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ Match match = this.matchSet ? this.match : DEFAULT_MATCH;
+ if(match == null)
+ throw new NullPointerException("Property match must not be null");
+ List<OFInstruction> instructions = this.instructionsSet ? this.instructions : DEFAULT_INSTRUCTIONS;
+ if(instructions == null)
+ throw new NullPointerException("Property instructions must not be null");
+
+
+ return new OFFlowDeleteStrictVer13(
+ xid,
+ cookie,
+ cookieMask,
+ tableId,
+ idleTimeout,
+ hardTimeout,
+ priority,
+ bufferId,
+ outPort,
+ outGroup,
+ flags,
+ match,
+ instructions
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFFlowDeleteStrict> {
+ @Override
+ public OFFlowDeleteStrict readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 14
+ byte type = bb.readByte();
+ if(type != (byte) 0xe)
+ throw new OFParseError("Wrong type: Expected=OFType.FLOW_MOD(14), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ U64 cookie = U64.ofRaw(bb.readLong());
+ U64 cookieMask = U64.ofRaw(bb.readLong());
+ TableId tableId = TableId.readByte(bb);
+ // fixed value property command == 4
+ short command = bb.readByte();
+ if(command != (short) 0x4)
+ throw new OFParseError("Wrong command: Expected=OFFlowModCommand.DELETE_STRICT(4), got="+command);
+ int idleTimeout = U16.f(bb.readShort());
+ int hardTimeout = U16.f(bb.readShort());
+ int priority = U16.f(bb.readShort());
+ OFBufferId bufferId = OFBufferId.of(bb.readInt());
+ OFPort outPort = OFPort.read4Bytes(bb);
+ OFGroup outGroup = OFGroup.read4Bytes(bb);
+ Set<OFFlowModFlags> flags = OFFlowModFlagsSerializerVer13.readFrom(bb);
+ // pad: 2 bytes
+ bb.skipBytes(2);
+ Match match = ChannelUtilsVer13.readOFMatch(bb);
+ List<OFInstruction> instructions = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFInstructionVer13.READER);
+
+ OFFlowDeleteStrictVer13 flowDeleteStrictVer13 = new OFFlowDeleteStrictVer13(
+ xid,
+ cookie,
+ cookieMask,
+ tableId,
+ idleTimeout,
+ hardTimeout,
+ priority,
+ bufferId,
+ outPort,
+ outGroup,
+ flags,
+ match,
+ instructions
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", flowDeleteStrictVer13);
+ return flowDeleteStrictVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFFlowDeleteStrictVer13Funnel FUNNEL = new OFFlowDeleteStrictVer13Funnel();
+ static class OFFlowDeleteStrictVer13Funnel implements Funnel<OFFlowDeleteStrictVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFFlowDeleteStrictVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 14
+ sink.putByte((byte) 0xe);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ message.cookie.putTo(sink);
+ message.cookieMask.putTo(sink);
+ message.tableId.putTo(sink);
+ // fixed value property command = 4
+ sink.putShort((short) 0x4);
+ sink.putInt(message.idleTimeout);
+ sink.putInt(message.hardTimeout);
+ sink.putInt(message.priority);
+ message.bufferId.putTo(sink);
+ message.outPort.putTo(sink);
+ message.outGroup.putTo(sink);
+ OFFlowModFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (2 bytes)
+ message.match.putTo(sink);
+ FunnelUtils.putList(message.instructions, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFFlowDeleteStrictVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFFlowDeleteStrictVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 14
+ bb.writeByte((byte) 0xe);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ bb.writeLong(message.cookie.getValue());
+ bb.writeLong(message.cookieMask.getValue());
+ message.tableId.writeByte(bb);
+ // fixed value property command = 4
+ bb.writeByte((short) 0x4);
+ bb.writeShort(U16.t(message.idleTimeout));
+ bb.writeShort(U16.t(message.hardTimeout));
+ bb.writeShort(U16.t(message.priority));
+ bb.writeInt(message.bufferId.getInt());
+ message.outPort.write4Bytes(bb);
+ message.outGroup.write4Bytes(bb);
+ OFFlowModFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 2 bytes
+ bb.writeZero(2);
+ message.match.writeTo(bb);
+ ChannelUtils.writeList(bb, message.instructions);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFFlowDeleteStrictVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("cookie=").append(cookie);
+ b.append(", ");
+ b.append("cookieMask=").append(cookieMask);
+ b.append(", ");
+ b.append("tableId=").append(tableId);
+ b.append(", ");
+ b.append("idleTimeout=").append(idleTimeout);
+ b.append(", ");
+ b.append("hardTimeout=").append(hardTimeout);
+ b.append(", ");
+ b.append("priority=").append(priority);
+ b.append(", ");
+ b.append("bufferId=").append(bufferId);
+ b.append(", ");
+ b.append("outPort=").append(outPort);
+ b.append(", ");
+ b.append("outGroup=").append(outGroup);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("match=").append(match);
+ b.append(", ");
+ b.append("instructions=").append(instructions);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFFlowDeleteStrictVer13 other = (OFFlowDeleteStrictVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (cookie == null) {
+ if (other.cookie != null)
+ return false;
+ } else if (!cookie.equals(other.cookie))
+ return false;
+ if (cookieMask == null) {
+ if (other.cookieMask != null)
+ return false;
+ } else if (!cookieMask.equals(other.cookieMask))
+ return false;
+ if (tableId == null) {
+ if (other.tableId != null)
+ return false;
+ } else if (!tableId.equals(other.tableId))
+ return false;
+ if( idleTimeout != other.idleTimeout)
+ return false;
+ if( hardTimeout != other.hardTimeout)
+ return false;
+ if( priority != other.priority)
+ return false;
+ if (bufferId == null) {
+ if (other.bufferId != null)
+ return false;
+ } else if (!bufferId.equals(other.bufferId))
+ return false;
+ if (outPort == null) {
+ if (other.outPort != null)
+ return false;
+ } else if (!outPort.equals(other.outPort))
+ return false;
+ if (outGroup == null) {
+ if (other.outGroup != null)
+ return false;
+ } else if (!outGroup.equals(other.outGroup))
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if (match == null) {
+ if (other.match != null)
+ return false;
+ } else if (!match.equals(other.match))
+ return false;
+ if (instructions == null) {
+ if (other.instructions != null)
+ return false;
+ } else if (!instructions.equals(other.instructions))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((cookie == null) ? 0 : cookie.hashCode());
+ result = prime * result + ((cookieMask == null) ? 0 : cookieMask.hashCode());
+ result = prime * result + ((tableId == null) ? 0 : tableId.hashCode());
+ result = prime * result + idleTimeout;
+ result = prime * result + hardTimeout;
+ result = prime * result + priority;
+ result = prime * result + ((bufferId == null) ? 0 : bufferId.hashCode());
+ result = prime * result + ((outPort == null) ? 0 : outPort.hashCode());
+ result = prime * result + ((outGroup == null) ? 0 : outGroup.hashCode());
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * result + ((match == null) ? 0 : match.hashCode());
+ result = prime * result + ((instructions == null) ? 0 : instructions.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowDeleteVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowDeleteVer13.java
new file mode 100644
index 0000000..1315068
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowDeleteVer13.java
@@ -0,0 +1,987 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import java.util.Collections;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFFlowDeleteVer13 implements OFFlowDelete {
+ private static final Logger logger = LoggerFactory.getLogger(OFFlowDeleteVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 56;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static U64 DEFAULT_COOKIE = U64.ZERO;
+ private final static U64 DEFAULT_COOKIE_MASK = U64.ZERO;
+ private final static TableId DEFAULT_TABLE_ID = TableId.ZERO;
+ private final static int DEFAULT_IDLE_TIMEOUT = 0x0;
+ private final static int DEFAULT_HARD_TIMEOUT = 0x0;
+ private final static int DEFAULT_PRIORITY = 0x0;
+ private final static OFBufferId DEFAULT_BUFFER_ID = OFBufferId.NO_BUFFER;
+ private final static OFPort DEFAULT_OUT_PORT = OFPort.ANY;
+ private final static OFGroup DEFAULT_OUT_GROUP = OFGroup.ANY;
+ private final static Set<OFFlowModFlags> DEFAULT_FLAGS = ImmutableSet.<OFFlowModFlags>of();
+ private final static Match DEFAULT_MATCH = OFFactoryVer13.MATCH_WILDCARD_ALL;
+ private final static List<OFInstruction> DEFAULT_INSTRUCTIONS = ImmutableList.<OFInstruction>of();
+
+ // OF message fields
+ private final long xid;
+ private final U64 cookie;
+ private final U64 cookieMask;
+ private final TableId tableId;
+ private final int idleTimeout;
+ private final int hardTimeout;
+ private final int priority;
+ private final OFBufferId bufferId;
+ private final OFPort outPort;
+ private final OFGroup outGroup;
+ private final Set<OFFlowModFlags> flags;
+ private final Match match;
+ private final List<OFInstruction> instructions;
+//
+ // Immutable default instance
+ final static OFFlowDeleteVer13 DEFAULT = new OFFlowDeleteVer13(
+ DEFAULT_XID, DEFAULT_COOKIE, DEFAULT_COOKIE_MASK, DEFAULT_TABLE_ID, DEFAULT_IDLE_TIMEOUT, DEFAULT_HARD_TIMEOUT, DEFAULT_PRIORITY, DEFAULT_BUFFER_ID, DEFAULT_OUT_PORT, DEFAULT_OUT_GROUP, DEFAULT_FLAGS, DEFAULT_MATCH, DEFAULT_INSTRUCTIONS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFFlowDeleteVer13(long xid, U64 cookie, U64 cookieMask, TableId tableId, int idleTimeout, int hardTimeout, int priority, OFBufferId bufferId, OFPort outPort, OFGroup outGroup, Set<OFFlowModFlags> flags, Match match, List<OFInstruction> instructions) {
+ this.xid = xid;
+ this.cookie = cookie;
+ this.cookieMask = cookieMask;
+ this.tableId = tableId;
+ this.idleTimeout = idleTimeout;
+ this.hardTimeout = hardTimeout;
+ this.priority = priority;
+ this.bufferId = bufferId;
+ this.outPort = outPort;
+ this.outGroup = outGroup;
+ this.flags = flags;
+ this.match = match;
+ this.instructions = instructions;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.FLOW_MOD;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public U64 getCookie() {
+ return cookie;
+ }
+
+ @Override
+ public U64 getCookieMask() {
+ return cookieMask;
+ }
+
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFFlowModCommand getCommand() {
+ return OFFlowModCommand.DELETE;
+ }
+
+ @Override
+ public int getIdleTimeout() {
+ return idleTimeout;
+ }
+
+ @Override
+ public int getHardTimeout() {
+ return hardTimeout;
+ }
+
+ @Override
+ public int getPriority() {
+ return priority;
+ }
+
+ @Override
+ public OFBufferId getBufferId() {
+ return bufferId;
+ }
+
+ @Override
+ public OFPort getOutPort() {
+ return outPort;
+ }
+
+ @Override
+ public OFGroup getOutGroup() {
+ return outGroup;
+ }
+
+ @Override
+ public Set<OFFlowModFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public Match getMatch() {
+ return match;
+ }
+
+ @Override
+ public List<OFInstruction> getInstructions() {
+ return instructions;
+ }
+
+
+ @Override
+ public List<OFAction> getActions()throws UnsupportedOperationException {
+ for (OFInstruction inst : this.instructions) {
+ if (inst instanceof OFInstructionApplyActions) {
+ OFInstructionApplyActions iap = (OFInstructionApplyActions)inst;
+ return iap.getActions();
+ }
+ }
+ return Collections.emptyList();
+ }
+
+
+ public OFFlowDelete.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFFlowDelete.Builder {
+ final OFFlowDeleteVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean cookieSet;
+ private U64 cookie;
+ private boolean cookieMaskSet;
+ private U64 cookieMask;
+ private boolean tableIdSet;
+ private TableId tableId;
+ private boolean idleTimeoutSet;
+ private int idleTimeout;
+ private boolean hardTimeoutSet;
+ private int hardTimeout;
+ private boolean prioritySet;
+ private int priority;
+ private boolean bufferIdSet;
+ private OFBufferId bufferId;
+ private boolean outPortSet;
+ private OFPort outPort;
+ private boolean outGroupSet;
+ private OFGroup outGroup;
+ private boolean flagsSet;
+ private Set<OFFlowModFlags> flags;
+ private boolean matchSet;
+ private Match match;
+ private boolean instructionsSet;
+ private List<OFInstruction> instructions;
+
+ BuilderWithParent(OFFlowDeleteVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.FLOW_MOD;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFFlowDelete.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public U64 getCookie() {
+ return cookie;
+ }
+
+ @Override
+ public OFFlowDelete.Builder setCookie(U64 cookie) {
+ this.cookie = cookie;
+ this.cookieSet = true;
+ return this;
+ }
+ @Override
+ public U64 getCookieMask() {
+ return cookieMask;
+ }
+
+ @Override
+ public OFFlowDelete.Builder setCookieMask(U64 cookieMask) {
+ this.cookieMask = cookieMask;
+ this.cookieMaskSet = true;
+ return this;
+ }
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFFlowDelete.Builder setTableId(TableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+ @Override
+ public OFFlowModCommand getCommand() {
+ return OFFlowModCommand.DELETE;
+ }
+
+ @Override
+ public int getIdleTimeout() {
+ return idleTimeout;
+ }
+
+ @Override
+ public OFFlowDelete.Builder setIdleTimeout(int idleTimeout) {
+ this.idleTimeout = idleTimeout;
+ this.idleTimeoutSet = true;
+ return this;
+ }
+ @Override
+ public int getHardTimeout() {
+ return hardTimeout;
+ }
+
+ @Override
+ public OFFlowDelete.Builder setHardTimeout(int hardTimeout) {
+ this.hardTimeout = hardTimeout;
+ this.hardTimeoutSet = true;
+ return this;
+ }
+ @Override
+ public int getPriority() {
+ return priority;
+ }
+
+ @Override
+ public OFFlowDelete.Builder setPriority(int priority) {
+ this.priority = priority;
+ this.prioritySet = true;
+ return this;
+ }
+ @Override
+ public OFBufferId getBufferId() {
+ return bufferId;
+ }
+
+ @Override
+ public OFFlowDelete.Builder setBufferId(OFBufferId bufferId) {
+ this.bufferId = bufferId;
+ this.bufferIdSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getOutPort() {
+ return outPort;
+ }
+
+ @Override
+ public OFFlowDelete.Builder setOutPort(OFPort outPort) {
+ this.outPort = outPort;
+ this.outPortSet = true;
+ return this;
+ }
+ @Override
+ public OFGroup getOutGroup() {
+ return outGroup;
+ }
+
+ @Override
+ public OFFlowDelete.Builder setOutGroup(OFGroup outGroup) {
+ this.outGroup = outGroup;
+ this.outGroupSet = true;
+ return this;
+ }
+ @Override
+ public Set<OFFlowModFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFFlowDelete.Builder setFlags(Set<OFFlowModFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public Match getMatch() {
+ return match;
+ }
+
+ @Override
+ public OFFlowDelete.Builder setMatch(Match match) {
+ this.match = match;
+ this.matchSet = true;
+ return this;
+ }
+ @Override
+ public List<OFInstruction> getInstructions() {
+ return instructions;
+ }
+
+ @Override
+ public OFFlowDelete.Builder setInstructions(List<OFInstruction> instructions) {
+ this.instructions = instructions;
+ this.instructionsSet = true;
+ return this;
+ }
+
+ @Override
+ public List<OFAction> getActions()throws UnsupportedOperationException {
+ if (!this.instructionsSet)
+ return parentMessage.getActions();
+ for (OFInstruction inst : this.instructions) {
+ if (inst instanceof OFInstructionApplyActions) {
+ OFInstructionApplyActions iap = (OFInstructionApplyActions)inst;
+ return iap.getActions();
+ }
+ }
+ return Collections.emptyList();
+ }
+
+ @Override
+ public OFFlowDelete.Builder setActions(List<OFAction> actions) throws UnsupportedOperationException {
+ OFInstructionApplyActionsVer13.Builder builder = new OFInstructionApplyActionsVer13.Builder();
+ builder.setActions(actions);
+ this.instructions = Collections.singletonList((OFInstruction)builder.build());
+ this.instructionsSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFFlowDelete build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ U64 cookie = this.cookieSet ? this.cookie : parentMessage.cookie;
+ if(cookie == null)
+ throw new NullPointerException("Property cookie must not be null");
+ U64 cookieMask = this.cookieMaskSet ? this.cookieMask : parentMessage.cookieMask;
+ if(cookieMask == null)
+ throw new NullPointerException("Property cookieMask must not be null");
+ TableId tableId = this.tableIdSet ? this.tableId : parentMessage.tableId;
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+ int idleTimeout = this.idleTimeoutSet ? this.idleTimeout : parentMessage.idleTimeout;
+ int hardTimeout = this.hardTimeoutSet ? this.hardTimeout : parentMessage.hardTimeout;
+ int priority = this.prioritySet ? this.priority : parentMessage.priority;
+ OFBufferId bufferId = this.bufferIdSet ? this.bufferId : parentMessage.bufferId;
+ if(bufferId == null)
+ throw new NullPointerException("Property bufferId must not be null");
+ OFPort outPort = this.outPortSet ? this.outPort : parentMessage.outPort;
+ if(outPort == null)
+ throw new NullPointerException("Property outPort must not be null");
+ OFGroup outGroup = this.outGroupSet ? this.outGroup : parentMessage.outGroup;
+ if(outGroup == null)
+ throw new NullPointerException("Property outGroup must not be null");
+ Set<OFFlowModFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ Match match = this.matchSet ? this.match : parentMessage.match;
+ if(match == null)
+ throw new NullPointerException("Property match must not be null");
+ List<OFInstruction> instructions = this.instructionsSet ? this.instructions : parentMessage.instructions;
+ if(instructions == null)
+ throw new NullPointerException("Property instructions must not be null");
+
+ //
+ return new OFFlowDeleteVer13(
+ xid,
+ cookie,
+ cookieMask,
+ tableId,
+ idleTimeout,
+ hardTimeout,
+ priority,
+ bufferId,
+ outPort,
+ outGroup,
+ flags,
+ match,
+ instructions
+ );
+ }
+
+ }
+
+ static class Builder implements OFFlowDelete.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean cookieSet;
+ private U64 cookie;
+ private boolean cookieMaskSet;
+ private U64 cookieMask;
+ private boolean tableIdSet;
+ private TableId tableId;
+ private boolean idleTimeoutSet;
+ private int idleTimeout;
+ private boolean hardTimeoutSet;
+ private int hardTimeout;
+ private boolean prioritySet;
+ private int priority;
+ private boolean bufferIdSet;
+ private OFBufferId bufferId;
+ private boolean outPortSet;
+ private OFPort outPort;
+ private boolean outGroupSet;
+ private OFGroup outGroup;
+ private boolean flagsSet;
+ private Set<OFFlowModFlags> flags;
+ private boolean matchSet;
+ private Match match;
+ private boolean instructionsSet;
+ private List<OFInstruction> instructions;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.FLOW_MOD;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFFlowDelete.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public U64 getCookie() {
+ return cookie;
+ }
+
+ @Override
+ public OFFlowDelete.Builder setCookie(U64 cookie) {
+ this.cookie = cookie;
+ this.cookieSet = true;
+ return this;
+ }
+ @Override
+ public U64 getCookieMask() {
+ return cookieMask;
+ }
+
+ @Override
+ public OFFlowDelete.Builder setCookieMask(U64 cookieMask) {
+ this.cookieMask = cookieMask;
+ this.cookieMaskSet = true;
+ return this;
+ }
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFFlowDelete.Builder setTableId(TableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+ @Override
+ public OFFlowModCommand getCommand() {
+ return OFFlowModCommand.DELETE;
+ }
+
+ @Override
+ public int getIdleTimeout() {
+ return idleTimeout;
+ }
+
+ @Override
+ public OFFlowDelete.Builder setIdleTimeout(int idleTimeout) {
+ this.idleTimeout = idleTimeout;
+ this.idleTimeoutSet = true;
+ return this;
+ }
+ @Override
+ public int getHardTimeout() {
+ return hardTimeout;
+ }
+
+ @Override
+ public OFFlowDelete.Builder setHardTimeout(int hardTimeout) {
+ this.hardTimeout = hardTimeout;
+ this.hardTimeoutSet = true;
+ return this;
+ }
+ @Override
+ public int getPriority() {
+ return priority;
+ }
+
+ @Override
+ public OFFlowDelete.Builder setPriority(int priority) {
+ this.priority = priority;
+ this.prioritySet = true;
+ return this;
+ }
+ @Override
+ public OFBufferId getBufferId() {
+ return bufferId;
+ }
+
+ @Override
+ public OFFlowDelete.Builder setBufferId(OFBufferId bufferId) {
+ this.bufferId = bufferId;
+ this.bufferIdSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getOutPort() {
+ return outPort;
+ }
+
+ @Override
+ public OFFlowDelete.Builder setOutPort(OFPort outPort) {
+ this.outPort = outPort;
+ this.outPortSet = true;
+ return this;
+ }
+ @Override
+ public OFGroup getOutGroup() {
+ return outGroup;
+ }
+
+ @Override
+ public OFFlowDelete.Builder setOutGroup(OFGroup outGroup) {
+ this.outGroup = outGroup;
+ this.outGroupSet = true;
+ return this;
+ }
+ @Override
+ public Set<OFFlowModFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFFlowDelete.Builder setFlags(Set<OFFlowModFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public Match getMatch() {
+ return match;
+ }
+
+ @Override
+ public OFFlowDelete.Builder setMatch(Match match) {
+ this.match = match;
+ this.matchSet = true;
+ return this;
+ }
+ @Override
+ public List<OFInstruction> getInstructions() {
+ return instructions;
+ }
+
+ @Override
+ public OFFlowDelete.Builder setInstructions(List<OFInstruction> instructions) {
+ this.instructions = instructions;
+ this.instructionsSet = true;
+ return this;
+ }
+
+ @Override
+ public List<OFAction> getActions()throws UnsupportedOperationException {
+ if (!this.instructionsSet)
+ return Collections.emptyList();
+ for (OFInstruction inst : this.instructions) {
+ if (inst instanceof OFInstructionApplyActions) {
+ OFInstructionApplyActions iap = (OFInstructionApplyActions)inst;
+ return iap.getActions();
+ }
+ }
+ return Collections.emptyList();
+ }
+
+ @Override
+ public OFFlowDelete.Builder setActions(List<OFAction> actions) throws UnsupportedOperationException {
+ OFInstructionApplyActionsVer13.Builder builder = new OFInstructionApplyActionsVer13.Builder();
+ builder.setActions(actions);
+ this.instructions = Collections.singletonList((OFInstruction)builder.build());
+ this.instructionsSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFFlowDelete build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ U64 cookie = this.cookieSet ? this.cookie : DEFAULT_COOKIE;
+ if(cookie == null)
+ throw new NullPointerException("Property cookie must not be null");
+ U64 cookieMask = this.cookieMaskSet ? this.cookieMask : DEFAULT_COOKIE_MASK;
+ if(cookieMask == null)
+ throw new NullPointerException("Property cookieMask must not be null");
+ TableId tableId = this.tableIdSet ? this.tableId : DEFAULT_TABLE_ID;
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+ int idleTimeout = this.idleTimeoutSet ? this.idleTimeout : DEFAULT_IDLE_TIMEOUT;
+ int hardTimeout = this.hardTimeoutSet ? this.hardTimeout : DEFAULT_HARD_TIMEOUT;
+ int priority = this.prioritySet ? this.priority : DEFAULT_PRIORITY;
+ OFBufferId bufferId = this.bufferIdSet ? this.bufferId : DEFAULT_BUFFER_ID;
+ if(bufferId == null)
+ throw new NullPointerException("Property bufferId must not be null");
+ OFPort outPort = this.outPortSet ? this.outPort : DEFAULT_OUT_PORT;
+ if(outPort == null)
+ throw new NullPointerException("Property outPort must not be null");
+ OFGroup outGroup = this.outGroupSet ? this.outGroup : DEFAULT_OUT_GROUP;
+ if(outGroup == null)
+ throw new NullPointerException("Property outGroup must not be null");
+ Set<OFFlowModFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ Match match = this.matchSet ? this.match : DEFAULT_MATCH;
+ if(match == null)
+ throw new NullPointerException("Property match must not be null");
+ List<OFInstruction> instructions = this.instructionsSet ? this.instructions : DEFAULT_INSTRUCTIONS;
+ if(instructions == null)
+ throw new NullPointerException("Property instructions must not be null");
+
+
+ return new OFFlowDeleteVer13(
+ xid,
+ cookie,
+ cookieMask,
+ tableId,
+ idleTimeout,
+ hardTimeout,
+ priority,
+ bufferId,
+ outPort,
+ outGroup,
+ flags,
+ match,
+ instructions
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFFlowDelete> {
+ @Override
+ public OFFlowDelete readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 14
+ byte type = bb.readByte();
+ if(type != (byte) 0xe)
+ throw new OFParseError("Wrong type: Expected=OFType.FLOW_MOD(14), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ U64 cookie = U64.ofRaw(bb.readLong());
+ U64 cookieMask = U64.ofRaw(bb.readLong());
+ TableId tableId = TableId.readByte(bb);
+ // fixed value property command == 3
+ short command = bb.readByte();
+ if(command != (short) 0x3)
+ throw new OFParseError("Wrong command: Expected=OFFlowModCommand.DELETE(3), got="+command);
+ int idleTimeout = U16.f(bb.readShort());
+ int hardTimeout = U16.f(bb.readShort());
+ int priority = U16.f(bb.readShort());
+ OFBufferId bufferId = OFBufferId.of(bb.readInt());
+ OFPort outPort = OFPort.read4Bytes(bb);
+ OFGroup outGroup = OFGroup.read4Bytes(bb);
+ Set<OFFlowModFlags> flags = OFFlowModFlagsSerializerVer13.readFrom(bb);
+ // pad: 2 bytes
+ bb.skipBytes(2);
+ Match match = ChannelUtilsVer13.readOFMatch(bb);
+ List<OFInstruction> instructions = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFInstructionVer13.READER);
+
+ OFFlowDeleteVer13 flowDeleteVer13 = new OFFlowDeleteVer13(
+ xid,
+ cookie,
+ cookieMask,
+ tableId,
+ idleTimeout,
+ hardTimeout,
+ priority,
+ bufferId,
+ outPort,
+ outGroup,
+ flags,
+ match,
+ instructions
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", flowDeleteVer13);
+ return flowDeleteVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFFlowDeleteVer13Funnel FUNNEL = new OFFlowDeleteVer13Funnel();
+ static class OFFlowDeleteVer13Funnel implements Funnel<OFFlowDeleteVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFFlowDeleteVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 14
+ sink.putByte((byte) 0xe);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ message.cookie.putTo(sink);
+ message.cookieMask.putTo(sink);
+ message.tableId.putTo(sink);
+ // fixed value property command = 3
+ sink.putShort((short) 0x3);
+ sink.putInt(message.idleTimeout);
+ sink.putInt(message.hardTimeout);
+ sink.putInt(message.priority);
+ message.bufferId.putTo(sink);
+ message.outPort.putTo(sink);
+ message.outGroup.putTo(sink);
+ OFFlowModFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (2 bytes)
+ message.match.putTo(sink);
+ FunnelUtils.putList(message.instructions, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFFlowDeleteVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFFlowDeleteVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 14
+ bb.writeByte((byte) 0xe);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ bb.writeLong(message.cookie.getValue());
+ bb.writeLong(message.cookieMask.getValue());
+ message.tableId.writeByte(bb);
+ // fixed value property command = 3
+ bb.writeByte((short) 0x3);
+ bb.writeShort(U16.t(message.idleTimeout));
+ bb.writeShort(U16.t(message.hardTimeout));
+ bb.writeShort(U16.t(message.priority));
+ bb.writeInt(message.bufferId.getInt());
+ message.outPort.write4Bytes(bb);
+ message.outGroup.write4Bytes(bb);
+ OFFlowModFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 2 bytes
+ bb.writeZero(2);
+ message.match.writeTo(bb);
+ ChannelUtils.writeList(bb, message.instructions);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFFlowDeleteVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("cookie=").append(cookie);
+ b.append(", ");
+ b.append("cookieMask=").append(cookieMask);
+ b.append(", ");
+ b.append("tableId=").append(tableId);
+ b.append(", ");
+ b.append("idleTimeout=").append(idleTimeout);
+ b.append(", ");
+ b.append("hardTimeout=").append(hardTimeout);
+ b.append(", ");
+ b.append("priority=").append(priority);
+ b.append(", ");
+ b.append("bufferId=").append(bufferId);
+ b.append(", ");
+ b.append("outPort=").append(outPort);
+ b.append(", ");
+ b.append("outGroup=").append(outGroup);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("match=").append(match);
+ b.append(", ");
+ b.append("instructions=").append(instructions);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFFlowDeleteVer13 other = (OFFlowDeleteVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (cookie == null) {
+ if (other.cookie != null)
+ return false;
+ } else if (!cookie.equals(other.cookie))
+ return false;
+ if (cookieMask == null) {
+ if (other.cookieMask != null)
+ return false;
+ } else if (!cookieMask.equals(other.cookieMask))
+ return false;
+ if (tableId == null) {
+ if (other.tableId != null)
+ return false;
+ } else if (!tableId.equals(other.tableId))
+ return false;
+ if( idleTimeout != other.idleTimeout)
+ return false;
+ if( hardTimeout != other.hardTimeout)
+ return false;
+ if( priority != other.priority)
+ return false;
+ if (bufferId == null) {
+ if (other.bufferId != null)
+ return false;
+ } else if (!bufferId.equals(other.bufferId))
+ return false;
+ if (outPort == null) {
+ if (other.outPort != null)
+ return false;
+ } else if (!outPort.equals(other.outPort))
+ return false;
+ if (outGroup == null) {
+ if (other.outGroup != null)
+ return false;
+ } else if (!outGroup.equals(other.outGroup))
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if (match == null) {
+ if (other.match != null)
+ return false;
+ } else if (!match.equals(other.match))
+ return false;
+ if (instructions == null) {
+ if (other.instructions != null)
+ return false;
+ } else if (!instructions.equals(other.instructions))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((cookie == null) ? 0 : cookie.hashCode());
+ result = prime * result + ((cookieMask == null) ? 0 : cookieMask.hashCode());
+ result = prime * result + ((tableId == null) ? 0 : tableId.hashCode());
+ result = prime * result + idleTimeout;
+ result = prime * result + hardTimeout;
+ result = prime * result + priority;
+ result = prime * result + ((bufferId == null) ? 0 : bufferId.hashCode());
+ result = prime * result + ((outPort == null) ? 0 : outPort.hashCode());
+ result = prime * result + ((outGroup == null) ? 0 : outGroup.hashCode());
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * result + ((match == null) ? 0 : match.hashCode());
+ result = prime * result + ((instructions == null) ? 0 : instructions.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowModCommandSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowModCommandSerializerVer13.java
new file mode 100644
index 0000000..acc2ee7
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowModCommandSerializerVer13.java
@@ -0,0 +1,89 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFFlowModCommand;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+
+public class OFFlowModCommandSerializerVer13 {
+
+ public final static byte ADD_VAL = (byte) 0x0;
+ public final static byte MODIFY_VAL = (byte) 0x1;
+ public final static byte MODIFY_STRICT_VAL = (byte) 0x2;
+ public final static byte DELETE_VAL = (byte) 0x3;
+ public final static byte DELETE_STRICT_VAL = (byte) 0x4;
+
+ public static OFFlowModCommand readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readByte());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, OFFlowModCommand e) {
+ bb.writeByte(toWireValue(e));
+ }
+
+ public static void putTo(OFFlowModCommand e, PrimitiveSink sink) {
+ sink.putByte(toWireValue(e));
+ }
+
+ public static OFFlowModCommand ofWireValue(byte val) {
+ switch(val) {
+ case ADD_VAL:
+ return OFFlowModCommand.ADD;
+ case MODIFY_VAL:
+ return OFFlowModCommand.MODIFY;
+ case MODIFY_STRICT_VAL:
+ return OFFlowModCommand.MODIFY_STRICT;
+ case DELETE_VAL:
+ return OFFlowModCommand.DELETE;
+ case DELETE_STRICT_VAL:
+ return OFFlowModCommand.DELETE_STRICT;
+ default:
+ throw new IllegalArgumentException("Illegal wire value for type OFFlowModCommand in version 1.3: " + val);
+ }
+ }
+
+
+ public static byte toWireValue(OFFlowModCommand e) {
+ switch(e) {
+ case ADD:
+ return ADD_VAL;
+ case MODIFY:
+ return MODIFY_VAL;
+ case MODIFY_STRICT:
+ return MODIFY_STRICT_VAL;
+ case DELETE:
+ return DELETE_VAL;
+ case DELETE_STRICT:
+ return DELETE_STRICT_VAL;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFFlowModCommand in version 1.3: " + e);
+ }
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowModFailedCodeSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowModFailedCodeSerializerVer13.java
new file mode 100644
index 0000000..cb3e72d
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowModFailedCodeSerializerVer13.java
@@ -0,0 +1,104 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFFlowModFailedCode;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+
+public class OFFlowModFailedCodeSerializerVer13 {
+
+ public final static short UNKNOWN_VAL = (short) 0x0;
+ public final static short TABLE_FULL_VAL = (short) 0x1;
+ public final static short BAD_TABLE_ID_VAL = (short) 0x2;
+ public final static short OVERLAP_VAL = (short) 0x3;
+ public final static short EPERM_VAL = (short) 0x4;
+ public final static short BAD_TIMEOUT_VAL = (short) 0x5;
+ public final static short BAD_COMMAND_VAL = (short) 0x6;
+ public final static short BAD_FLAGS_VAL = (short) 0x7;
+
+ public static OFFlowModFailedCode readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readShort());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, OFFlowModFailedCode e) {
+ bb.writeShort(toWireValue(e));
+ }
+
+ public static void putTo(OFFlowModFailedCode e, PrimitiveSink sink) {
+ sink.putShort(toWireValue(e));
+ }
+
+ public static OFFlowModFailedCode ofWireValue(short val) {
+ switch(val) {
+ case UNKNOWN_VAL:
+ return OFFlowModFailedCode.UNKNOWN;
+ case TABLE_FULL_VAL:
+ return OFFlowModFailedCode.TABLE_FULL;
+ case BAD_TABLE_ID_VAL:
+ return OFFlowModFailedCode.BAD_TABLE_ID;
+ case OVERLAP_VAL:
+ return OFFlowModFailedCode.OVERLAP;
+ case EPERM_VAL:
+ return OFFlowModFailedCode.EPERM;
+ case BAD_TIMEOUT_VAL:
+ return OFFlowModFailedCode.BAD_TIMEOUT;
+ case BAD_COMMAND_VAL:
+ return OFFlowModFailedCode.BAD_COMMAND;
+ case BAD_FLAGS_VAL:
+ return OFFlowModFailedCode.BAD_FLAGS;
+ default:
+ throw new IllegalArgumentException("Illegal wire value for type OFFlowModFailedCode in version 1.3: " + val);
+ }
+ }
+
+
+ public static short toWireValue(OFFlowModFailedCode e) {
+ switch(e) {
+ case UNKNOWN:
+ return UNKNOWN_VAL;
+ case TABLE_FULL:
+ return TABLE_FULL_VAL;
+ case BAD_TABLE_ID:
+ return BAD_TABLE_ID_VAL;
+ case OVERLAP:
+ return OVERLAP_VAL;
+ case EPERM:
+ return EPERM_VAL;
+ case BAD_TIMEOUT:
+ return BAD_TIMEOUT_VAL;
+ case BAD_COMMAND:
+ return BAD_COMMAND_VAL;
+ case BAD_FLAGS:
+ return BAD_FLAGS_VAL;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFFlowModFailedCode in version 1.3: " + e);
+ }
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowModFailedErrorMsgVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowModFailedErrorMsgVer13.java
new file mode 100644
index 0000000..20cf7b3
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowModFailedErrorMsgVer13.java
@@ -0,0 +1,400 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFFlowModFailedErrorMsgVer13 implements OFFlowModFailedErrorMsg {
+ private static final Logger logger = LoggerFactory.getLogger(OFFlowModFailedErrorMsgVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 12;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static OFErrorCauseData DEFAULT_DATA = OFErrorCauseData.NONE;
+
+ // OF message fields
+ private final long xid;
+ private final OFFlowModFailedCode code;
+ private final OFErrorCauseData data;
+//
+
+ // package private constructor - used by readers, builders, and factory
+ OFFlowModFailedErrorMsgVer13(long xid, OFFlowModFailedCode code, OFErrorCauseData data) {
+ this.xid = xid;
+ this.code = code;
+ this.data = data;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ERROR;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFErrorType getErrType() {
+ return OFErrorType.FLOW_MOD_FAILED;
+ }
+
+ @Override
+ public OFFlowModFailedCode getCode() {
+ return code;
+ }
+
+ @Override
+ public OFErrorCauseData getData() {
+ return data;
+ }
+
+
+
+ public OFFlowModFailedErrorMsg.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFFlowModFailedErrorMsg.Builder {
+ final OFFlowModFailedErrorMsgVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean codeSet;
+ private OFFlowModFailedCode code;
+ private boolean dataSet;
+ private OFErrorCauseData data;
+
+ BuilderWithParent(OFFlowModFailedErrorMsgVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ERROR;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFFlowModFailedErrorMsg.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorType getErrType() {
+ return OFErrorType.FLOW_MOD_FAILED;
+ }
+
+ @Override
+ public OFFlowModFailedCode getCode() {
+ return code;
+ }
+
+ @Override
+ public OFFlowModFailedErrorMsg.Builder setCode(OFFlowModFailedCode code) {
+ this.code = code;
+ this.codeSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorCauseData getData() {
+ return data;
+ }
+
+ @Override
+ public OFFlowModFailedErrorMsg.Builder setData(OFErrorCauseData data) {
+ this.data = data;
+ this.dataSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFFlowModFailedErrorMsg build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ OFFlowModFailedCode code = this.codeSet ? this.code : parentMessage.code;
+ if(code == null)
+ throw new NullPointerException("Property code must not be null");
+ OFErrorCauseData data = this.dataSet ? this.data : parentMessage.data;
+ if(data == null)
+ throw new NullPointerException("Property data must not be null");
+
+ //
+ return new OFFlowModFailedErrorMsgVer13(
+ xid,
+ code,
+ data
+ );
+ }
+
+ }
+
+ static class Builder implements OFFlowModFailedErrorMsg.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean codeSet;
+ private OFFlowModFailedCode code;
+ private boolean dataSet;
+ private OFErrorCauseData data;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ERROR;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFFlowModFailedErrorMsg.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorType getErrType() {
+ return OFErrorType.FLOW_MOD_FAILED;
+ }
+
+ @Override
+ public OFFlowModFailedCode getCode() {
+ return code;
+ }
+
+ @Override
+ public OFFlowModFailedErrorMsg.Builder setCode(OFFlowModFailedCode code) {
+ this.code = code;
+ this.codeSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorCauseData getData() {
+ return data;
+ }
+
+ @Override
+ public OFFlowModFailedErrorMsg.Builder setData(OFErrorCauseData data) {
+ this.data = data;
+ this.dataSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFFlowModFailedErrorMsg build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ if(!this.codeSet)
+ throw new IllegalStateException("Property code doesn't have default value -- must be set");
+ if(code == null)
+ throw new NullPointerException("Property code must not be null");
+ OFErrorCauseData data = this.dataSet ? this.data : DEFAULT_DATA;
+ if(data == null)
+ throw new NullPointerException("Property data must not be null");
+
+
+ return new OFFlowModFailedErrorMsgVer13(
+ xid,
+ code,
+ data
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFFlowModFailedErrorMsg> {
+ @Override
+ public OFFlowModFailedErrorMsg readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 1
+ byte type = bb.readByte();
+ if(type != (byte) 0x1)
+ throw new OFParseError("Wrong type: Expected=OFType.ERROR(1), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property errType == 5
+ short errType = bb.readShort();
+ if(errType != (short) 0x5)
+ throw new OFParseError("Wrong errType: Expected=OFErrorType.FLOW_MOD_FAILED(5), got="+errType);
+ OFFlowModFailedCode code = OFFlowModFailedCodeSerializerVer13.readFrom(bb);
+ OFErrorCauseData data = OFErrorCauseData.read(bb, length - (bb.readerIndex() - start), OFVersion.OF_13);
+
+ OFFlowModFailedErrorMsgVer13 flowModFailedErrorMsgVer13 = new OFFlowModFailedErrorMsgVer13(
+ xid,
+ code,
+ data
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", flowModFailedErrorMsgVer13);
+ return flowModFailedErrorMsgVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFFlowModFailedErrorMsgVer13Funnel FUNNEL = new OFFlowModFailedErrorMsgVer13Funnel();
+ static class OFFlowModFailedErrorMsgVer13Funnel implements Funnel<OFFlowModFailedErrorMsgVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFFlowModFailedErrorMsgVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 1
+ sink.putByte((byte) 0x1);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property errType = 5
+ sink.putShort((short) 0x5);
+ OFFlowModFailedCodeSerializerVer13.putTo(message.code, sink);
+ message.data.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFFlowModFailedErrorMsgVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFFlowModFailedErrorMsgVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 1
+ bb.writeByte((byte) 0x1);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property errType = 5
+ bb.writeShort((short) 0x5);
+ OFFlowModFailedCodeSerializerVer13.writeTo(bb, message.code);
+ message.data.writeTo(bb);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFFlowModFailedErrorMsgVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("code=").append(code);
+ b.append(", ");
+ b.append("data=").append(data);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFFlowModFailedErrorMsgVer13 other = (OFFlowModFailedErrorMsgVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (code == null) {
+ if (other.code != null)
+ return false;
+ } else if (!code.equals(other.code))
+ return false;
+ if (data == null) {
+ if (other.data != null)
+ return false;
+ } else if (!data.equals(other.data))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((code == null) ? 0 : code.hashCode());
+ result = prime * result + ((data == null) ? 0 : data.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowModFlagsSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowModFlagsSerializerVer13.java
new file mode 100644
index 0000000..128609b
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowModFlagsSerializerVer13.java
@@ -0,0 +1,108 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_set_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFFlowModFlags;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import java.util.EnumSet;
+import java.util.Collections;
+
+
+public class OFFlowModFlagsSerializerVer13 {
+
+ public final static short SEND_FLOW_REM_VAL = (short) 0x1;
+ public final static short CHECK_OVERLAP_VAL = (short) 0x2;
+ public final static short RESET_COUNTS_VAL = (short) 0x4;
+ public final static short NO_PKT_COUNTS_VAL = (short) 0x8;
+ public final static short NO_BYT_COUNTS_VAL = (short) 0x10;
+ public final static short BSN_SEND_IDLE_VAL = (short) 0x80;
+
+ public static Set<OFFlowModFlags> readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readShort());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, Set<OFFlowModFlags> set) {
+ bb.writeShort(toWireValue(set));
+ }
+
+ public static void putTo(Set<OFFlowModFlags> set, PrimitiveSink sink) {
+ sink.putShort(toWireValue(set));
+ }
+
+
+ public static Set<OFFlowModFlags> ofWireValue(short val) {
+ EnumSet<OFFlowModFlags> set = EnumSet.noneOf(OFFlowModFlags.class);
+
+ if((val & SEND_FLOW_REM_VAL) != 0)
+ set.add(OFFlowModFlags.SEND_FLOW_REM);
+ if((val & CHECK_OVERLAP_VAL) != 0)
+ set.add(OFFlowModFlags.CHECK_OVERLAP);
+ if((val & RESET_COUNTS_VAL) != 0)
+ set.add(OFFlowModFlags.RESET_COUNTS);
+ if((val & NO_PKT_COUNTS_VAL) != 0)
+ set.add(OFFlowModFlags.NO_PKT_COUNTS);
+ if((val & NO_BYT_COUNTS_VAL) != 0)
+ set.add(OFFlowModFlags.NO_BYT_COUNTS);
+ if((val & BSN_SEND_IDLE_VAL) != 0)
+ set.add(OFFlowModFlags.BSN_SEND_IDLE);
+ return Collections.unmodifiableSet(set);
+ }
+
+ public static short toWireValue(Set<OFFlowModFlags> set) {
+ short wireValue = 0;
+
+ for(OFFlowModFlags e: set) {
+ switch(e) {
+ case SEND_FLOW_REM:
+ wireValue |= SEND_FLOW_REM_VAL;
+ break;
+ case CHECK_OVERLAP:
+ wireValue |= CHECK_OVERLAP_VAL;
+ break;
+ case RESET_COUNTS:
+ wireValue |= RESET_COUNTS_VAL;
+ break;
+ case NO_PKT_COUNTS:
+ wireValue |= NO_PKT_COUNTS_VAL;
+ break;
+ case NO_BYT_COUNTS:
+ wireValue |= NO_BYT_COUNTS_VAL;
+ break;
+ case BSN_SEND_IDLE:
+ wireValue |= BSN_SEND_IDLE_VAL;
+ break;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFFlowModFlags in version 1.3: " + e);
+ }
+ }
+ return wireValue;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowModVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowModVer13.java
new file mode 100644
index 0000000..a49a546
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowModVer13.java
@@ -0,0 +1,80 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_virtual_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.jboss.netty.buffer.ChannelBuffer;
+
+abstract class OFFlowModVer13 {
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 56;
+
+
+ public final static OFFlowModVer13.Reader READER = new Reader();
+
+ static class Reader implements OFMessageReader<OFFlowMod> {
+ @Override
+ public OFFlowMod readFrom(ChannelBuffer bb) throws OFParseError {
+ if(bb.readableBytes() < MINIMUM_LENGTH)
+ return null;
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 14
+ byte type = bb.readByte();
+ if(type != (byte) 0xe)
+ throw new OFParseError("Wrong type: Expected=OFType.FLOW_MOD(14), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ U32.f(bb.readInt());
+ U64.ofRaw(bb.readLong());
+ U64.ofRaw(bb.readLong());
+ TableId.readByte(bb);
+ short command = bb.readByte();
+ bb.readerIndex(start);
+ switch(command) {
+ case (short) 0x0:
+ // discriminator value OFFlowModCommand.ADD=0 for class OFFlowAddVer13
+ return OFFlowAddVer13.READER.readFrom(bb);
+ case (short) 0x3:
+ // discriminator value OFFlowModCommand.DELETE=3 for class OFFlowDeleteVer13
+ return OFFlowDeleteVer13.READER.readFrom(bb);
+ case (short) 0x4:
+ // discriminator value OFFlowModCommand.DELETE_STRICT=4 for class OFFlowDeleteStrictVer13
+ return OFFlowDeleteStrictVer13.READER.readFrom(bb);
+ case (short) 0x1:
+ // discriminator value OFFlowModCommand.MODIFY=1 for class OFFlowModifyVer13
+ return OFFlowModifyVer13.READER.readFrom(bb);
+ case (short) 0x2:
+ // discriminator value OFFlowModCommand.MODIFY_STRICT=2 for class OFFlowModifyStrictVer13
+ return OFFlowModifyStrictVer13.READER.readFrom(bb);
+ default:
+ throw new OFParseError("Unknown value for discriminator command of class OFFlowModVer13: " + command);
+ }
+ }
+ }
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowModifyStrictVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowModifyStrictVer13.java
new file mode 100644
index 0000000..40299fe
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowModifyStrictVer13.java
@@ -0,0 +1,987 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import java.util.Collections;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFFlowModifyStrictVer13 implements OFFlowModifyStrict {
+ private static final Logger logger = LoggerFactory.getLogger(OFFlowModifyStrictVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 56;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static U64 DEFAULT_COOKIE = U64.ZERO;
+ private final static U64 DEFAULT_COOKIE_MASK = U64.ZERO;
+ private final static TableId DEFAULT_TABLE_ID = TableId.ZERO;
+ private final static int DEFAULT_IDLE_TIMEOUT = 0x0;
+ private final static int DEFAULT_HARD_TIMEOUT = 0x0;
+ private final static int DEFAULT_PRIORITY = 0x0;
+ private final static OFBufferId DEFAULT_BUFFER_ID = OFBufferId.NO_BUFFER;
+ private final static OFPort DEFAULT_OUT_PORT = OFPort.ANY;
+ private final static OFGroup DEFAULT_OUT_GROUP = OFGroup.ANY;
+ private final static Set<OFFlowModFlags> DEFAULT_FLAGS = ImmutableSet.<OFFlowModFlags>of();
+ private final static Match DEFAULT_MATCH = OFFactoryVer13.MATCH_WILDCARD_ALL;
+ private final static List<OFInstruction> DEFAULT_INSTRUCTIONS = ImmutableList.<OFInstruction>of();
+
+ // OF message fields
+ private final long xid;
+ private final U64 cookie;
+ private final U64 cookieMask;
+ private final TableId tableId;
+ private final int idleTimeout;
+ private final int hardTimeout;
+ private final int priority;
+ private final OFBufferId bufferId;
+ private final OFPort outPort;
+ private final OFGroup outGroup;
+ private final Set<OFFlowModFlags> flags;
+ private final Match match;
+ private final List<OFInstruction> instructions;
+//
+ // Immutable default instance
+ final static OFFlowModifyStrictVer13 DEFAULT = new OFFlowModifyStrictVer13(
+ DEFAULT_XID, DEFAULT_COOKIE, DEFAULT_COOKIE_MASK, DEFAULT_TABLE_ID, DEFAULT_IDLE_TIMEOUT, DEFAULT_HARD_TIMEOUT, DEFAULT_PRIORITY, DEFAULT_BUFFER_ID, DEFAULT_OUT_PORT, DEFAULT_OUT_GROUP, DEFAULT_FLAGS, DEFAULT_MATCH, DEFAULT_INSTRUCTIONS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFFlowModifyStrictVer13(long xid, U64 cookie, U64 cookieMask, TableId tableId, int idleTimeout, int hardTimeout, int priority, OFBufferId bufferId, OFPort outPort, OFGroup outGroup, Set<OFFlowModFlags> flags, Match match, List<OFInstruction> instructions) {
+ this.xid = xid;
+ this.cookie = cookie;
+ this.cookieMask = cookieMask;
+ this.tableId = tableId;
+ this.idleTimeout = idleTimeout;
+ this.hardTimeout = hardTimeout;
+ this.priority = priority;
+ this.bufferId = bufferId;
+ this.outPort = outPort;
+ this.outGroup = outGroup;
+ this.flags = flags;
+ this.match = match;
+ this.instructions = instructions;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.FLOW_MOD;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public U64 getCookie() {
+ return cookie;
+ }
+
+ @Override
+ public U64 getCookieMask() {
+ return cookieMask;
+ }
+
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFFlowModCommand getCommand() {
+ return OFFlowModCommand.MODIFY_STRICT;
+ }
+
+ @Override
+ public int getIdleTimeout() {
+ return idleTimeout;
+ }
+
+ @Override
+ public int getHardTimeout() {
+ return hardTimeout;
+ }
+
+ @Override
+ public int getPriority() {
+ return priority;
+ }
+
+ @Override
+ public OFBufferId getBufferId() {
+ return bufferId;
+ }
+
+ @Override
+ public OFPort getOutPort() {
+ return outPort;
+ }
+
+ @Override
+ public OFGroup getOutGroup() {
+ return outGroup;
+ }
+
+ @Override
+ public Set<OFFlowModFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public Match getMatch() {
+ return match;
+ }
+
+ @Override
+ public List<OFInstruction> getInstructions() {
+ return instructions;
+ }
+
+
+ @Override
+ public List<OFAction> getActions()throws UnsupportedOperationException {
+ for (OFInstruction inst : this.instructions) {
+ if (inst instanceof OFInstructionApplyActions) {
+ OFInstructionApplyActions iap = (OFInstructionApplyActions)inst;
+ return iap.getActions();
+ }
+ }
+ return Collections.emptyList();
+ }
+
+
+ public OFFlowModifyStrict.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFFlowModifyStrict.Builder {
+ final OFFlowModifyStrictVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean cookieSet;
+ private U64 cookie;
+ private boolean cookieMaskSet;
+ private U64 cookieMask;
+ private boolean tableIdSet;
+ private TableId tableId;
+ private boolean idleTimeoutSet;
+ private int idleTimeout;
+ private boolean hardTimeoutSet;
+ private int hardTimeout;
+ private boolean prioritySet;
+ private int priority;
+ private boolean bufferIdSet;
+ private OFBufferId bufferId;
+ private boolean outPortSet;
+ private OFPort outPort;
+ private boolean outGroupSet;
+ private OFGroup outGroup;
+ private boolean flagsSet;
+ private Set<OFFlowModFlags> flags;
+ private boolean matchSet;
+ private Match match;
+ private boolean instructionsSet;
+ private List<OFInstruction> instructions;
+
+ BuilderWithParent(OFFlowModifyStrictVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.FLOW_MOD;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFFlowModifyStrict.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public U64 getCookie() {
+ return cookie;
+ }
+
+ @Override
+ public OFFlowModifyStrict.Builder setCookie(U64 cookie) {
+ this.cookie = cookie;
+ this.cookieSet = true;
+ return this;
+ }
+ @Override
+ public U64 getCookieMask() {
+ return cookieMask;
+ }
+
+ @Override
+ public OFFlowModifyStrict.Builder setCookieMask(U64 cookieMask) {
+ this.cookieMask = cookieMask;
+ this.cookieMaskSet = true;
+ return this;
+ }
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFFlowModifyStrict.Builder setTableId(TableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+ @Override
+ public OFFlowModCommand getCommand() {
+ return OFFlowModCommand.MODIFY_STRICT;
+ }
+
+ @Override
+ public int getIdleTimeout() {
+ return idleTimeout;
+ }
+
+ @Override
+ public OFFlowModifyStrict.Builder setIdleTimeout(int idleTimeout) {
+ this.idleTimeout = idleTimeout;
+ this.idleTimeoutSet = true;
+ return this;
+ }
+ @Override
+ public int getHardTimeout() {
+ return hardTimeout;
+ }
+
+ @Override
+ public OFFlowModifyStrict.Builder setHardTimeout(int hardTimeout) {
+ this.hardTimeout = hardTimeout;
+ this.hardTimeoutSet = true;
+ return this;
+ }
+ @Override
+ public int getPriority() {
+ return priority;
+ }
+
+ @Override
+ public OFFlowModifyStrict.Builder setPriority(int priority) {
+ this.priority = priority;
+ this.prioritySet = true;
+ return this;
+ }
+ @Override
+ public OFBufferId getBufferId() {
+ return bufferId;
+ }
+
+ @Override
+ public OFFlowModifyStrict.Builder setBufferId(OFBufferId bufferId) {
+ this.bufferId = bufferId;
+ this.bufferIdSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getOutPort() {
+ return outPort;
+ }
+
+ @Override
+ public OFFlowModifyStrict.Builder setOutPort(OFPort outPort) {
+ this.outPort = outPort;
+ this.outPortSet = true;
+ return this;
+ }
+ @Override
+ public OFGroup getOutGroup() {
+ return outGroup;
+ }
+
+ @Override
+ public OFFlowModifyStrict.Builder setOutGroup(OFGroup outGroup) {
+ this.outGroup = outGroup;
+ this.outGroupSet = true;
+ return this;
+ }
+ @Override
+ public Set<OFFlowModFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFFlowModifyStrict.Builder setFlags(Set<OFFlowModFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public Match getMatch() {
+ return match;
+ }
+
+ @Override
+ public OFFlowModifyStrict.Builder setMatch(Match match) {
+ this.match = match;
+ this.matchSet = true;
+ return this;
+ }
+ @Override
+ public List<OFInstruction> getInstructions() {
+ return instructions;
+ }
+
+ @Override
+ public OFFlowModifyStrict.Builder setInstructions(List<OFInstruction> instructions) {
+ this.instructions = instructions;
+ this.instructionsSet = true;
+ return this;
+ }
+
+ @Override
+ public List<OFAction> getActions()throws UnsupportedOperationException {
+ if (!this.instructionsSet)
+ return parentMessage.getActions();
+ for (OFInstruction inst : this.instructions) {
+ if (inst instanceof OFInstructionApplyActions) {
+ OFInstructionApplyActions iap = (OFInstructionApplyActions)inst;
+ return iap.getActions();
+ }
+ }
+ return Collections.emptyList();
+ }
+
+ @Override
+ public OFFlowModifyStrict.Builder setActions(List<OFAction> actions) throws UnsupportedOperationException {
+ OFInstructionApplyActionsVer13.Builder builder = new OFInstructionApplyActionsVer13.Builder();
+ builder.setActions(actions);
+ this.instructions = Collections.singletonList((OFInstruction)builder.build());
+ this.instructionsSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFFlowModifyStrict build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ U64 cookie = this.cookieSet ? this.cookie : parentMessage.cookie;
+ if(cookie == null)
+ throw new NullPointerException("Property cookie must not be null");
+ U64 cookieMask = this.cookieMaskSet ? this.cookieMask : parentMessage.cookieMask;
+ if(cookieMask == null)
+ throw new NullPointerException("Property cookieMask must not be null");
+ TableId tableId = this.tableIdSet ? this.tableId : parentMessage.tableId;
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+ int idleTimeout = this.idleTimeoutSet ? this.idleTimeout : parentMessage.idleTimeout;
+ int hardTimeout = this.hardTimeoutSet ? this.hardTimeout : parentMessage.hardTimeout;
+ int priority = this.prioritySet ? this.priority : parentMessage.priority;
+ OFBufferId bufferId = this.bufferIdSet ? this.bufferId : parentMessage.bufferId;
+ if(bufferId == null)
+ throw new NullPointerException("Property bufferId must not be null");
+ OFPort outPort = this.outPortSet ? this.outPort : parentMessage.outPort;
+ if(outPort == null)
+ throw new NullPointerException("Property outPort must not be null");
+ OFGroup outGroup = this.outGroupSet ? this.outGroup : parentMessage.outGroup;
+ if(outGroup == null)
+ throw new NullPointerException("Property outGroup must not be null");
+ Set<OFFlowModFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ Match match = this.matchSet ? this.match : parentMessage.match;
+ if(match == null)
+ throw new NullPointerException("Property match must not be null");
+ List<OFInstruction> instructions = this.instructionsSet ? this.instructions : parentMessage.instructions;
+ if(instructions == null)
+ throw new NullPointerException("Property instructions must not be null");
+
+ //
+ return new OFFlowModifyStrictVer13(
+ xid,
+ cookie,
+ cookieMask,
+ tableId,
+ idleTimeout,
+ hardTimeout,
+ priority,
+ bufferId,
+ outPort,
+ outGroup,
+ flags,
+ match,
+ instructions
+ );
+ }
+
+ }
+
+ static class Builder implements OFFlowModifyStrict.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean cookieSet;
+ private U64 cookie;
+ private boolean cookieMaskSet;
+ private U64 cookieMask;
+ private boolean tableIdSet;
+ private TableId tableId;
+ private boolean idleTimeoutSet;
+ private int idleTimeout;
+ private boolean hardTimeoutSet;
+ private int hardTimeout;
+ private boolean prioritySet;
+ private int priority;
+ private boolean bufferIdSet;
+ private OFBufferId bufferId;
+ private boolean outPortSet;
+ private OFPort outPort;
+ private boolean outGroupSet;
+ private OFGroup outGroup;
+ private boolean flagsSet;
+ private Set<OFFlowModFlags> flags;
+ private boolean matchSet;
+ private Match match;
+ private boolean instructionsSet;
+ private List<OFInstruction> instructions;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.FLOW_MOD;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFFlowModifyStrict.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public U64 getCookie() {
+ return cookie;
+ }
+
+ @Override
+ public OFFlowModifyStrict.Builder setCookie(U64 cookie) {
+ this.cookie = cookie;
+ this.cookieSet = true;
+ return this;
+ }
+ @Override
+ public U64 getCookieMask() {
+ return cookieMask;
+ }
+
+ @Override
+ public OFFlowModifyStrict.Builder setCookieMask(U64 cookieMask) {
+ this.cookieMask = cookieMask;
+ this.cookieMaskSet = true;
+ return this;
+ }
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFFlowModifyStrict.Builder setTableId(TableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+ @Override
+ public OFFlowModCommand getCommand() {
+ return OFFlowModCommand.MODIFY_STRICT;
+ }
+
+ @Override
+ public int getIdleTimeout() {
+ return idleTimeout;
+ }
+
+ @Override
+ public OFFlowModifyStrict.Builder setIdleTimeout(int idleTimeout) {
+ this.idleTimeout = idleTimeout;
+ this.idleTimeoutSet = true;
+ return this;
+ }
+ @Override
+ public int getHardTimeout() {
+ return hardTimeout;
+ }
+
+ @Override
+ public OFFlowModifyStrict.Builder setHardTimeout(int hardTimeout) {
+ this.hardTimeout = hardTimeout;
+ this.hardTimeoutSet = true;
+ return this;
+ }
+ @Override
+ public int getPriority() {
+ return priority;
+ }
+
+ @Override
+ public OFFlowModifyStrict.Builder setPriority(int priority) {
+ this.priority = priority;
+ this.prioritySet = true;
+ return this;
+ }
+ @Override
+ public OFBufferId getBufferId() {
+ return bufferId;
+ }
+
+ @Override
+ public OFFlowModifyStrict.Builder setBufferId(OFBufferId bufferId) {
+ this.bufferId = bufferId;
+ this.bufferIdSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getOutPort() {
+ return outPort;
+ }
+
+ @Override
+ public OFFlowModifyStrict.Builder setOutPort(OFPort outPort) {
+ this.outPort = outPort;
+ this.outPortSet = true;
+ return this;
+ }
+ @Override
+ public OFGroup getOutGroup() {
+ return outGroup;
+ }
+
+ @Override
+ public OFFlowModifyStrict.Builder setOutGroup(OFGroup outGroup) {
+ this.outGroup = outGroup;
+ this.outGroupSet = true;
+ return this;
+ }
+ @Override
+ public Set<OFFlowModFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFFlowModifyStrict.Builder setFlags(Set<OFFlowModFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public Match getMatch() {
+ return match;
+ }
+
+ @Override
+ public OFFlowModifyStrict.Builder setMatch(Match match) {
+ this.match = match;
+ this.matchSet = true;
+ return this;
+ }
+ @Override
+ public List<OFInstruction> getInstructions() {
+ return instructions;
+ }
+
+ @Override
+ public OFFlowModifyStrict.Builder setInstructions(List<OFInstruction> instructions) {
+ this.instructions = instructions;
+ this.instructionsSet = true;
+ return this;
+ }
+
+ @Override
+ public List<OFAction> getActions()throws UnsupportedOperationException {
+ if (!this.instructionsSet)
+ return Collections.emptyList();
+ for (OFInstruction inst : this.instructions) {
+ if (inst instanceof OFInstructionApplyActions) {
+ OFInstructionApplyActions iap = (OFInstructionApplyActions)inst;
+ return iap.getActions();
+ }
+ }
+ return Collections.emptyList();
+ }
+
+ @Override
+ public OFFlowModifyStrict.Builder setActions(List<OFAction> actions) throws UnsupportedOperationException {
+ OFInstructionApplyActionsVer13.Builder builder = new OFInstructionApplyActionsVer13.Builder();
+ builder.setActions(actions);
+ this.instructions = Collections.singletonList((OFInstruction)builder.build());
+ this.instructionsSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFFlowModifyStrict build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ U64 cookie = this.cookieSet ? this.cookie : DEFAULT_COOKIE;
+ if(cookie == null)
+ throw new NullPointerException("Property cookie must not be null");
+ U64 cookieMask = this.cookieMaskSet ? this.cookieMask : DEFAULT_COOKIE_MASK;
+ if(cookieMask == null)
+ throw new NullPointerException("Property cookieMask must not be null");
+ TableId tableId = this.tableIdSet ? this.tableId : DEFAULT_TABLE_ID;
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+ int idleTimeout = this.idleTimeoutSet ? this.idleTimeout : DEFAULT_IDLE_TIMEOUT;
+ int hardTimeout = this.hardTimeoutSet ? this.hardTimeout : DEFAULT_HARD_TIMEOUT;
+ int priority = this.prioritySet ? this.priority : DEFAULT_PRIORITY;
+ OFBufferId bufferId = this.bufferIdSet ? this.bufferId : DEFAULT_BUFFER_ID;
+ if(bufferId == null)
+ throw new NullPointerException("Property bufferId must not be null");
+ OFPort outPort = this.outPortSet ? this.outPort : DEFAULT_OUT_PORT;
+ if(outPort == null)
+ throw new NullPointerException("Property outPort must not be null");
+ OFGroup outGroup = this.outGroupSet ? this.outGroup : DEFAULT_OUT_GROUP;
+ if(outGroup == null)
+ throw new NullPointerException("Property outGroup must not be null");
+ Set<OFFlowModFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ Match match = this.matchSet ? this.match : DEFAULT_MATCH;
+ if(match == null)
+ throw new NullPointerException("Property match must not be null");
+ List<OFInstruction> instructions = this.instructionsSet ? this.instructions : DEFAULT_INSTRUCTIONS;
+ if(instructions == null)
+ throw new NullPointerException("Property instructions must not be null");
+
+
+ return new OFFlowModifyStrictVer13(
+ xid,
+ cookie,
+ cookieMask,
+ tableId,
+ idleTimeout,
+ hardTimeout,
+ priority,
+ bufferId,
+ outPort,
+ outGroup,
+ flags,
+ match,
+ instructions
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFFlowModifyStrict> {
+ @Override
+ public OFFlowModifyStrict readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 14
+ byte type = bb.readByte();
+ if(type != (byte) 0xe)
+ throw new OFParseError("Wrong type: Expected=OFType.FLOW_MOD(14), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ U64 cookie = U64.ofRaw(bb.readLong());
+ U64 cookieMask = U64.ofRaw(bb.readLong());
+ TableId tableId = TableId.readByte(bb);
+ // fixed value property command == 2
+ short command = bb.readByte();
+ if(command != (short) 0x2)
+ throw new OFParseError("Wrong command: Expected=OFFlowModCommand.MODIFY_STRICT(2), got="+command);
+ int idleTimeout = U16.f(bb.readShort());
+ int hardTimeout = U16.f(bb.readShort());
+ int priority = U16.f(bb.readShort());
+ OFBufferId bufferId = OFBufferId.of(bb.readInt());
+ OFPort outPort = OFPort.read4Bytes(bb);
+ OFGroup outGroup = OFGroup.read4Bytes(bb);
+ Set<OFFlowModFlags> flags = OFFlowModFlagsSerializerVer13.readFrom(bb);
+ // pad: 2 bytes
+ bb.skipBytes(2);
+ Match match = ChannelUtilsVer13.readOFMatch(bb);
+ List<OFInstruction> instructions = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFInstructionVer13.READER);
+
+ OFFlowModifyStrictVer13 flowModifyStrictVer13 = new OFFlowModifyStrictVer13(
+ xid,
+ cookie,
+ cookieMask,
+ tableId,
+ idleTimeout,
+ hardTimeout,
+ priority,
+ bufferId,
+ outPort,
+ outGroup,
+ flags,
+ match,
+ instructions
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", flowModifyStrictVer13);
+ return flowModifyStrictVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFFlowModifyStrictVer13Funnel FUNNEL = new OFFlowModifyStrictVer13Funnel();
+ static class OFFlowModifyStrictVer13Funnel implements Funnel<OFFlowModifyStrictVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFFlowModifyStrictVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 14
+ sink.putByte((byte) 0xe);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ message.cookie.putTo(sink);
+ message.cookieMask.putTo(sink);
+ message.tableId.putTo(sink);
+ // fixed value property command = 2
+ sink.putShort((short) 0x2);
+ sink.putInt(message.idleTimeout);
+ sink.putInt(message.hardTimeout);
+ sink.putInt(message.priority);
+ message.bufferId.putTo(sink);
+ message.outPort.putTo(sink);
+ message.outGroup.putTo(sink);
+ OFFlowModFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (2 bytes)
+ message.match.putTo(sink);
+ FunnelUtils.putList(message.instructions, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFFlowModifyStrictVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFFlowModifyStrictVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 14
+ bb.writeByte((byte) 0xe);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ bb.writeLong(message.cookie.getValue());
+ bb.writeLong(message.cookieMask.getValue());
+ message.tableId.writeByte(bb);
+ // fixed value property command = 2
+ bb.writeByte((short) 0x2);
+ bb.writeShort(U16.t(message.idleTimeout));
+ bb.writeShort(U16.t(message.hardTimeout));
+ bb.writeShort(U16.t(message.priority));
+ bb.writeInt(message.bufferId.getInt());
+ message.outPort.write4Bytes(bb);
+ message.outGroup.write4Bytes(bb);
+ OFFlowModFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 2 bytes
+ bb.writeZero(2);
+ message.match.writeTo(bb);
+ ChannelUtils.writeList(bb, message.instructions);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFFlowModifyStrictVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("cookie=").append(cookie);
+ b.append(", ");
+ b.append("cookieMask=").append(cookieMask);
+ b.append(", ");
+ b.append("tableId=").append(tableId);
+ b.append(", ");
+ b.append("idleTimeout=").append(idleTimeout);
+ b.append(", ");
+ b.append("hardTimeout=").append(hardTimeout);
+ b.append(", ");
+ b.append("priority=").append(priority);
+ b.append(", ");
+ b.append("bufferId=").append(bufferId);
+ b.append(", ");
+ b.append("outPort=").append(outPort);
+ b.append(", ");
+ b.append("outGroup=").append(outGroup);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("match=").append(match);
+ b.append(", ");
+ b.append("instructions=").append(instructions);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFFlowModifyStrictVer13 other = (OFFlowModifyStrictVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (cookie == null) {
+ if (other.cookie != null)
+ return false;
+ } else if (!cookie.equals(other.cookie))
+ return false;
+ if (cookieMask == null) {
+ if (other.cookieMask != null)
+ return false;
+ } else if (!cookieMask.equals(other.cookieMask))
+ return false;
+ if (tableId == null) {
+ if (other.tableId != null)
+ return false;
+ } else if (!tableId.equals(other.tableId))
+ return false;
+ if( idleTimeout != other.idleTimeout)
+ return false;
+ if( hardTimeout != other.hardTimeout)
+ return false;
+ if( priority != other.priority)
+ return false;
+ if (bufferId == null) {
+ if (other.bufferId != null)
+ return false;
+ } else if (!bufferId.equals(other.bufferId))
+ return false;
+ if (outPort == null) {
+ if (other.outPort != null)
+ return false;
+ } else if (!outPort.equals(other.outPort))
+ return false;
+ if (outGroup == null) {
+ if (other.outGroup != null)
+ return false;
+ } else if (!outGroup.equals(other.outGroup))
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if (match == null) {
+ if (other.match != null)
+ return false;
+ } else if (!match.equals(other.match))
+ return false;
+ if (instructions == null) {
+ if (other.instructions != null)
+ return false;
+ } else if (!instructions.equals(other.instructions))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((cookie == null) ? 0 : cookie.hashCode());
+ result = prime * result + ((cookieMask == null) ? 0 : cookieMask.hashCode());
+ result = prime * result + ((tableId == null) ? 0 : tableId.hashCode());
+ result = prime * result + idleTimeout;
+ result = prime * result + hardTimeout;
+ result = prime * result + priority;
+ result = prime * result + ((bufferId == null) ? 0 : bufferId.hashCode());
+ result = prime * result + ((outPort == null) ? 0 : outPort.hashCode());
+ result = prime * result + ((outGroup == null) ? 0 : outGroup.hashCode());
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * result + ((match == null) ? 0 : match.hashCode());
+ result = prime * result + ((instructions == null) ? 0 : instructions.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowModifyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowModifyVer13.java
new file mode 100644
index 0000000..ad38926
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowModifyVer13.java
@@ -0,0 +1,987 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import java.util.Collections;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFFlowModifyVer13 implements OFFlowModify {
+ private static final Logger logger = LoggerFactory.getLogger(OFFlowModifyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 56;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static U64 DEFAULT_COOKIE = U64.ZERO;
+ private final static U64 DEFAULT_COOKIE_MASK = U64.ZERO;
+ private final static TableId DEFAULT_TABLE_ID = TableId.ZERO;
+ private final static int DEFAULT_IDLE_TIMEOUT = 0x0;
+ private final static int DEFAULT_HARD_TIMEOUT = 0x0;
+ private final static int DEFAULT_PRIORITY = 0x0;
+ private final static OFBufferId DEFAULT_BUFFER_ID = OFBufferId.NO_BUFFER;
+ private final static OFPort DEFAULT_OUT_PORT = OFPort.ANY;
+ private final static OFGroup DEFAULT_OUT_GROUP = OFGroup.ANY;
+ private final static Set<OFFlowModFlags> DEFAULT_FLAGS = ImmutableSet.<OFFlowModFlags>of();
+ private final static Match DEFAULT_MATCH = OFFactoryVer13.MATCH_WILDCARD_ALL;
+ private final static List<OFInstruction> DEFAULT_INSTRUCTIONS = ImmutableList.<OFInstruction>of();
+
+ // OF message fields
+ private final long xid;
+ private final U64 cookie;
+ private final U64 cookieMask;
+ private final TableId tableId;
+ private final int idleTimeout;
+ private final int hardTimeout;
+ private final int priority;
+ private final OFBufferId bufferId;
+ private final OFPort outPort;
+ private final OFGroup outGroup;
+ private final Set<OFFlowModFlags> flags;
+ private final Match match;
+ private final List<OFInstruction> instructions;
+//
+ // Immutable default instance
+ final static OFFlowModifyVer13 DEFAULT = new OFFlowModifyVer13(
+ DEFAULT_XID, DEFAULT_COOKIE, DEFAULT_COOKIE_MASK, DEFAULT_TABLE_ID, DEFAULT_IDLE_TIMEOUT, DEFAULT_HARD_TIMEOUT, DEFAULT_PRIORITY, DEFAULT_BUFFER_ID, DEFAULT_OUT_PORT, DEFAULT_OUT_GROUP, DEFAULT_FLAGS, DEFAULT_MATCH, DEFAULT_INSTRUCTIONS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFFlowModifyVer13(long xid, U64 cookie, U64 cookieMask, TableId tableId, int idleTimeout, int hardTimeout, int priority, OFBufferId bufferId, OFPort outPort, OFGroup outGroup, Set<OFFlowModFlags> flags, Match match, List<OFInstruction> instructions) {
+ this.xid = xid;
+ this.cookie = cookie;
+ this.cookieMask = cookieMask;
+ this.tableId = tableId;
+ this.idleTimeout = idleTimeout;
+ this.hardTimeout = hardTimeout;
+ this.priority = priority;
+ this.bufferId = bufferId;
+ this.outPort = outPort;
+ this.outGroup = outGroup;
+ this.flags = flags;
+ this.match = match;
+ this.instructions = instructions;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.FLOW_MOD;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public U64 getCookie() {
+ return cookie;
+ }
+
+ @Override
+ public U64 getCookieMask() {
+ return cookieMask;
+ }
+
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFFlowModCommand getCommand() {
+ return OFFlowModCommand.MODIFY;
+ }
+
+ @Override
+ public int getIdleTimeout() {
+ return idleTimeout;
+ }
+
+ @Override
+ public int getHardTimeout() {
+ return hardTimeout;
+ }
+
+ @Override
+ public int getPriority() {
+ return priority;
+ }
+
+ @Override
+ public OFBufferId getBufferId() {
+ return bufferId;
+ }
+
+ @Override
+ public OFPort getOutPort() {
+ return outPort;
+ }
+
+ @Override
+ public OFGroup getOutGroup() {
+ return outGroup;
+ }
+
+ @Override
+ public Set<OFFlowModFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public Match getMatch() {
+ return match;
+ }
+
+ @Override
+ public List<OFInstruction> getInstructions() {
+ return instructions;
+ }
+
+
+ @Override
+ public List<OFAction> getActions()throws UnsupportedOperationException {
+ for (OFInstruction inst : this.instructions) {
+ if (inst instanceof OFInstructionApplyActions) {
+ OFInstructionApplyActions iap = (OFInstructionApplyActions)inst;
+ return iap.getActions();
+ }
+ }
+ return Collections.emptyList();
+ }
+
+
+ public OFFlowModify.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFFlowModify.Builder {
+ final OFFlowModifyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean cookieSet;
+ private U64 cookie;
+ private boolean cookieMaskSet;
+ private U64 cookieMask;
+ private boolean tableIdSet;
+ private TableId tableId;
+ private boolean idleTimeoutSet;
+ private int idleTimeout;
+ private boolean hardTimeoutSet;
+ private int hardTimeout;
+ private boolean prioritySet;
+ private int priority;
+ private boolean bufferIdSet;
+ private OFBufferId bufferId;
+ private boolean outPortSet;
+ private OFPort outPort;
+ private boolean outGroupSet;
+ private OFGroup outGroup;
+ private boolean flagsSet;
+ private Set<OFFlowModFlags> flags;
+ private boolean matchSet;
+ private Match match;
+ private boolean instructionsSet;
+ private List<OFInstruction> instructions;
+
+ BuilderWithParent(OFFlowModifyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.FLOW_MOD;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFFlowModify.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public U64 getCookie() {
+ return cookie;
+ }
+
+ @Override
+ public OFFlowModify.Builder setCookie(U64 cookie) {
+ this.cookie = cookie;
+ this.cookieSet = true;
+ return this;
+ }
+ @Override
+ public U64 getCookieMask() {
+ return cookieMask;
+ }
+
+ @Override
+ public OFFlowModify.Builder setCookieMask(U64 cookieMask) {
+ this.cookieMask = cookieMask;
+ this.cookieMaskSet = true;
+ return this;
+ }
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFFlowModify.Builder setTableId(TableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+ @Override
+ public OFFlowModCommand getCommand() {
+ return OFFlowModCommand.MODIFY;
+ }
+
+ @Override
+ public int getIdleTimeout() {
+ return idleTimeout;
+ }
+
+ @Override
+ public OFFlowModify.Builder setIdleTimeout(int idleTimeout) {
+ this.idleTimeout = idleTimeout;
+ this.idleTimeoutSet = true;
+ return this;
+ }
+ @Override
+ public int getHardTimeout() {
+ return hardTimeout;
+ }
+
+ @Override
+ public OFFlowModify.Builder setHardTimeout(int hardTimeout) {
+ this.hardTimeout = hardTimeout;
+ this.hardTimeoutSet = true;
+ return this;
+ }
+ @Override
+ public int getPriority() {
+ return priority;
+ }
+
+ @Override
+ public OFFlowModify.Builder setPriority(int priority) {
+ this.priority = priority;
+ this.prioritySet = true;
+ return this;
+ }
+ @Override
+ public OFBufferId getBufferId() {
+ return bufferId;
+ }
+
+ @Override
+ public OFFlowModify.Builder setBufferId(OFBufferId bufferId) {
+ this.bufferId = bufferId;
+ this.bufferIdSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getOutPort() {
+ return outPort;
+ }
+
+ @Override
+ public OFFlowModify.Builder setOutPort(OFPort outPort) {
+ this.outPort = outPort;
+ this.outPortSet = true;
+ return this;
+ }
+ @Override
+ public OFGroup getOutGroup() {
+ return outGroup;
+ }
+
+ @Override
+ public OFFlowModify.Builder setOutGroup(OFGroup outGroup) {
+ this.outGroup = outGroup;
+ this.outGroupSet = true;
+ return this;
+ }
+ @Override
+ public Set<OFFlowModFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFFlowModify.Builder setFlags(Set<OFFlowModFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public Match getMatch() {
+ return match;
+ }
+
+ @Override
+ public OFFlowModify.Builder setMatch(Match match) {
+ this.match = match;
+ this.matchSet = true;
+ return this;
+ }
+ @Override
+ public List<OFInstruction> getInstructions() {
+ return instructions;
+ }
+
+ @Override
+ public OFFlowModify.Builder setInstructions(List<OFInstruction> instructions) {
+ this.instructions = instructions;
+ this.instructionsSet = true;
+ return this;
+ }
+
+ @Override
+ public List<OFAction> getActions()throws UnsupportedOperationException {
+ if (!this.instructionsSet)
+ return parentMessage.getActions();
+ for (OFInstruction inst : this.instructions) {
+ if (inst instanceof OFInstructionApplyActions) {
+ OFInstructionApplyActions iap = (OFInstructionApplyActions)inst;
+ return iap.getActions();
+ }
+ }
+ return Collections.emptyList();
+ }
+
+ @Override
+ public OFFlowModify.Builder setActions(List<OFAction> actions) throws UnsupportedOperationException {
+ OFInstructionApplyActionsVer13.Builder builder = new OFInstructionApplyActionsVer13.Builder();
+ builder.setActions(actions);
+ this.instructions = Collections.singletonList((OFInstruction)builder.build());
+ this.instructionsSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFFlowModify build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ U64 cookie = this.cookieSet ? this.cookie : parentMessage.cookie;
+ if(cookie == null)
+ throw new NullPointerException("Property cookie must not be null");
+ U64 cookieMask = this.cookieMaskSet ? this.cookieMask : parentMessage.cookieMask;
+ if(cookieMask == null)
+ throw new NullPointerException("Property cookieMask must not be null");
+ TableId tableId = this.tableIdSet ? this.tableId : parentMessage.tableId;
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+ int idleTimeout = this.idleTimeoutSet ? this.idleTimeout : parentMessage.idleTimeout;
+ int hardTimeout = this.hardTimeoutSet ? this.hardTimeout : parentMessage.hardTimeout;
+ int priority = this.prioritySet ? this.priority : parentMessage.priority;
+ OFBufferId bufferId = this.bufferIdSet ? this.bufferId : parentMessage.bufferId;
+ if(bufferId == null)
+ throw new NullPointerException("Property bufferId must not be null");
+ OFPort outPort = this.outPortSet ? this.outPort : parentMessage.outPort;
+ if(outPort == null)
+ throw new NullPointerException("Property outPort must not be null");
+ OFGroup outGroup = this.outGroupSet ? this.outGroup : parentMessage.outGroup;
+ if(outGroup == null)
+ throw new NullPointerException("Property outGroup must not be null");
+ Set<OFFlowModFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ Match match = this.matchSet ? this.match : parentMessage.match;
+ if(match == null)
+ throw new NullPointerException("Property match must not be null");
+ List<OFInstruction> instructions = this.instructionsSet ? this.instructions : parentMessage.instructions;
+ if(instructions == null)
+ throw new NullPointerException("Property instructions must not be null");
+
+ //
+ return new OFFlowModifyVer13(
+ xid,
+ cookie,
+ cookieMask,
+ tableId,
+ idleTimeout,
+ hardTimeout,
+ priority,
+ bufferId,
+ outPort,
+ outGroup,
+ flags,
+ match,
+ instructions
+ );
+ }
+
+ }
+
+ static class Builder implements OFFlowModify.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean cookieSet;
+ private U64 cookie;
+ private boolean cookieMaskSet;
+ private U64 cookieMask;
+ private boolean tableIdSet;
+ private TableId tableId;
+ private boolean idleTimeoutSet;
+ private int idleTimeout;
+ private boolean hardTimeoutSet;
+ private int hardTimeout;
+ private boolean prioritySet;
+ private int priority;
+ private boolean bufferIdSet;
+ private OFBufferId bufferId;
+ private boolean outPortSet;
+ private OFPort outPort;
+ private boolean outGroupSet;
+ private OFGroup outGroup;
+ private boolean flagsSet;
+ private Set<OFFlowModFlags> flags;
+ private boolean matchSet;
+ private Match match;
+ private boolean instructionsSet;
+ private List<OFInstruction> instructions;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.FLOW_MOD;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFFlowModify.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public U64 getCookie() {
+ return cookie;
+ }
+
+ @Override
+ public OFFlowModify.Builder setCookie(U64 cookie) {
+ this.cookie = cookie;
+ this.cookieSet = true;
+ return this;
+ }
+ @Override
+ public U64 getCookieMask() {
+ return cookieMask;
+ }
+
+ @Override
+ public OFFlowModify.Builder setCookieMask(U64 cookieMask) {
+ this.cookieMask = cookieMask;
+ this.cookieMaskSet = true;
+ return this;
+ }
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFFlowModify.Builder setTableId(TableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+ @Override
+ public OFFlowModCommand getCommand() {
+ return OFFlowModCommand.MODIFY;
+ }
+
+ @Override
+ public int getIdleTimeout() {
+ return idleTimeout;
+ }
+
+ @Override
+ public OFFlowModify.Builder setIdleTimeout(int idleTimeout) {
+ this.idleTimeout = idleTimeout;
+ this.idleTimeoutSet = true;
+ return this;
+ }
+ @Override
+ public int getHardTimeout() {
+ return hardTimeout;
+ }
+
+ @Override
+ public OFFlowModify.Builder setHardTimeout(int hardTimeout) {
+ this.hardTimeout = hardTimeout;
+ this.hardTimeoutSet = true;
+ return this;
+ }
+ @Override
+ public int getPriority() {
+ return priority;
+ }
+
+ @Override
+ public OFFlowModify.Builder setPriority(int priority) {
+ this.priority = priority;
+ this.prioritySet = true;
+ return this;
+ }
+ @Override
+ public OFBufferId getBufferId() {
+ return bufferId;
+ }
+
+ @Override
+ public OFFlowModify.Builder setBufferId(OFBufferId bufferId) {
+ this.bufferId = bufferId;
+ this.bufferIdSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getOutPort() {
+ return outPort;
+ }
+
+ @Override
+ public OFFlowModify.Builder setOutPort(OFPort outPort) {
+ this.outPort = outPort;
+ this.outPortSet = true;
+ return this;
+ }
+ @Override
+ public OFGroup getOutGroup() {
+ return outGroup;
+ }
+
+ @Override
+ public OFFlowModify.Builder setOutGroup(OFGroup outGroup) {
+ this.outGroup = outGroup;
+ this.outGroupSet = true;
+ return this;
+ }
+ @Override
+ public Set<OFFlowModFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFFlowModify.Builder setFlags(Set<OFFlowModFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public Match getMatch() {
+ return match;
+ }
+
+ @Override
+ public OFFlowModify.Builder setMatch(Match match) {
+ this.match = match;
+ this.matchSet = true;
+ return this;
+ }
+ @Override
+ public List<OFInstruction> getInstructions() {
+ return instructions;
+ }
+
+ @Override
+ public OFFlowModify.Builder setInstructions(List<OFInstruction> instructions) {
+ this.instructions = instructions;
+ this.instructionsSet = true;
+ return this;
+ }
+
+ @Override
+ public List<OFAction> getActions()throws UnsupportedOperationException {
+ if (!this.instructionsSet)
+ return Collections.emptyList();
+ for (OFInstruction inst : this.instructions) {
+ if (inst instanceof OFInstructionApplyActions) {
+ OFInstructionApplyActions iap = (OFInstructionApplyActions)inst;
+ return iap.getActions();
+ }
+ }
+ return Collections.emptyList();
+ }
+
+ @Override
+ public OFFlowModify.Builder setActions(List<OFAction> actions) throws UnsupportedOperationException {
+ OFInstructionApplyActionsVer13.Builder builder = new OFInstructionApplyActionsVer13.Builder();
+ builder.setActions(actions);
+ this.instructions = Collections.singletonList((OFInstruction)builder.build());
+ this.instructionsSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFFlowModify build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ U64 cookie = this.cookieSet ? this.cookie : DEFAULT_COOKIE;
+ if(cookie == null)
+ throw new NullPointerException("Property cookie must not be null");
+ U64 cookieMask = this.cookieMaskSet ? this.cookieMask : DEFAULT_COOKIE_MASK;
+ if(cookieMask == null)
+ throw new NullPointerException("Property cookieMask must not be null");
+ TableId tableId = this.tableIdSet ? this.tableId : DEFAULT_TABLE_ID;
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+ int idleTimeout = this.idleTimeoutSet ? this.idleTimeout : DEFAULT_IDLE_TIMEOUT;
+ int hardTimeout = this.hardTimeoutSet ? this.hardTimeout : DEFAULT_HARD_TIMEOUT;
+ int priority = this.prioritySet ? this.priority : DEFAULT_PRIORITY;
+ OFBufferId bufferId = this.bufferIdSet ? this.bufferId : DEFAULT_BUFFER_ID;
+ if(bufferId == null)
+ throw new NullPointerException("Property bufferId must not be null");
+ OFPort outPort = this.outPortSet ? this.outPort : DEFAULT_OUT_PORT;
+ if(outPort == null)
+ throw new NullPointerException("Property outPort must not be null");
+ OFGroup outGroup = this.outGroupSet ? this.outGroup : DEFAULT_OUT_GROUP;
+ if(outGroup == null)
+ throw new NullPointerException("Property outGroup must not be null");
+ Set<OFFlowModFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ Match match = this.matchSet ? this.match : DEFAULT_MATCH;
+ if(match == null)
+ throw new NullPointerException("Property match must not be null");
+ List<OFInstruction> instructions = this.instructionsSet ? this.instructions : DEFAULT_INSTRUCTIONS;
+ if(instructions == null)
+ throw new NullPointerException("Property instructions must not be null");
+
+
+ return new OFFlowModifyVer13(
+ xid,
+ cookie,
+ cookieMask,
+ tableId,
+ idleTimeout,
+ hardTimeout,
+ priority,
+ bufferId,
+ outPort,
+ outGroup,
+ flags,
+ match,
+ instructions
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFFlowModify> {
+ @Override
+ public OFFlowModify readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 14
+ byte type = bb.readByte();
+ if(type != (byte) 0xe)
+ throw new OFParseError("Wrong type: Expected=OFType.FLOW_MOD(14), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ U64 cookie = U64.ofRaw(bb.readLong());
+ U64 cookieMask = U64.ofRaw(bb.readLong());
+ TableId tableId = TableId.readByte(bb);
+ // fixed value property command == 1
+ short command = bb.readByte();
+ if(command != (short) 0x1)
+ throw new OFParseError("Wrong command: Expected=OFFlowModCommand.MODIFY(1), got="+command);
+ int idleTimeout = U16.f(bb.readShort());
+ int hardTimeout = U16.f(bb.readShort());
+ int priority = U16.f(bb.readShort());
+ OFBufferId bufferId = OFBufferId.of(bb.readInt());
+ OFPort outPort = OFPort.read4Bytes(bb);
+ OFGroup outGroup = OFGroup.read4Bytes(bb);
+ Set<OFFlowModFlags> flags = OFFlowModFlagsSerializerVer13.readFrom(bb);
+ // pad: 2 bytes
+ bb.skipBytes(2);
+ Match match = ChannelUtilsVer13.readOFMatch(bb);
+ List<OFInstruction> instructions = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFInstructionVer13.READER);
+
+ OFFlowModifyVer13 flowModifyVer13 = new OFFlowModifyVer13(
+ xid,
+ cookie,
+ cookieMask,
+ tableId,
+ idleTimeout,
+ hardTimeout,
+ priority,
+ bufferId,
+ outPort,
+ outGroup,
+ flags,
+ match,
+ instructions
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", flowModifyVer13);
+ return flowModifyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFFlowModifyVer13Funnel FUNNEL = new OFFlowModifyVer13Funnel();
+ static class OFFlowModifyVer13Funnel implements Funnel<OFFlowModifyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFFlowModifyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 14
+ sink.putByte((byte) 0xe);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ message.cookie.putTo(sink);
+ message.cookieMask.putTo(sink);
+ message.tableId.putTo(sink);
+ // fixed value property command = 1
+ sink.putShort((short) 0x1);
+ sink.putInt(message.idleTimeout);
+ sink.putInt(message.hardTimeout);
+ sink.putInt(message.priority);
+ message.bufferId.putTo(sink);
+ message.outPort.putTo(sink);
+ message.outGroup.putTo(sink);
+ OFFlowModFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (2 bytes)
+ message.match.putTo(sink);
+ FunnelUtils.putList(message.instructions, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFFlowModifyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFFlowModifyVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 14
+ bb.writeByte((byte) 0xe);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ bb.writeLong(message.cookie.getValue());
+ bb.writeLong(message.cookieMask.getValue());
+ message.tableId.writeByte(bb);
+ // fixed value property command = 1
+ bb.writeByte((short) 0x1);
+ bb.writeShort(U16.t(message.idleTimeout));
+ bb.writeShort(U16.t(message.hardTimeout));
+ bb.writeShort(U16.t(message.priority));
+ bb.writeInt(message.bufferId.getInt());
+ message.outPort.write4Bytes(bb);
+ message.outGroup.write4Bytes(bb);
+ OFFlowModFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 2 bytes
+ bb.writeZero(2);
+ message.match.writeTo(bb);
+ ChannelUtils.writeList(bb, message.instructions);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFFlowModifyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("cookie=").append(cookie);
+ b.append(", ");
+ b.append("cookieMask=").append(cookieMask);
+ b.append(", ");
+ b.append("tableId=").append(tableId);
+ b.append(", ");
+ b.append("idleTimeout=").append(idleTimeout);
+ b.append(", ");
+ b.append("hardTimeout=").append(hardTimeout);
+ b.append(", ");
+ b.append("priority=").append(priority);
+ b.append(", ");
+ b.append("bufferId=").append(bufferId);
+ b.append(", ");
+ b.append("outPort=").append(outPort);
+ b.append(", ");
+ b.append("outGroup=").append(outGroup);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("match=").append(match);
+ b.append(", ");
+ b.append("instructions=").append(instructions);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFFlowModifyVer13 other = (OFFlowModifyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (cookie == null) {
+ if (other.cookie != null)
+ return false;
+ } else if (!cookie.equals(other.cookie))
+ return false;
+ if (cookieMask == null) {
+ if (other.cookieMask != null)
+ return false;
+ } else if (!cookieMask.equals(other.cookieMask))
+ return false;
+ if (tableId == null) {
+ if (other.tableId != null)
+ return false;
+ } else if (!tableId.equals(other.tableId))
+ return false;
+ if( idleTimeout != other.idleTimeout)
+ return false;
+ if( hardTimeout != other.hardTimeout)
+ return false;
+ if( priority != other.priority)
+ return false;
+ if (bufferId == null) {
+ if (other.bufferId != null)
+ return false;
+ } else if (!bufferId.equals(other.bufferId))
+ return false;
+ if (outPort == null) {
+ if (other.outPort != null)
+ return false;
+ } else if (!outPort.equals(other.outPort))
+ return false;
+ if (outGroup == null) {
+ if (other.outGroup != null)
+ return false;
+ } else if (!outGroup.equals(other.outGroup))
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if (match == null) {
+ if (other.match != null)
+ return false;
+ } else if (!match.equals(other.match))
+ return false;
+ if (instructions == null) {
+ if (other.instructions != null)
+ return false;
+ } else if (!instructions.equals(other.instructions))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((cookie == null) ? 0 : cookie.hashCode());
+ result = prime * result + ((cookieMask == null) ? 0 : cookieMask.hashCode());
+ result = prime * result + ((tableId == null) ? 0 : tableId.hashCode());
+ result = prime * result + idleTimeout;
+ result = prime * result + hardTimeout;
+ result = prime * result + priority;
+ result = prime * result + ((bufferId == null) ? 0 : bufferId.hashCode());
+ result = prime * result + ((outPort == null) ? 0 : outPort.hashCode());
+ result = prime * result + ((outGroup == null) ? 0 : outGroup.hashCode());
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * result + ((match == null) ? 0 : match.hashCode());
+ result = prime * result + ((instructions == null) ? 0 : instructions.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowRemovedReasonSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowRemovedReasonSerializerVer13.java
new file mode 100644
index 0000000..da6b10d
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowRemovedReasonSerializerVer13.java
@@ -0,0 +1,84 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFFlowRemovedReason;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+
+public class OFFlowRemovedReasonSerializerVer13 {
+
+ public final static byte IDLE_TIMEOUT_VAL = (byte) 0x0;
+ public final static byte HARD_TIMEOUT_VAL = (byte) 0x1;
+ public final static byte DELETE_VAL = (byte) 0x2;
+ public final static byte GROUP_DELETE_VAL = (byte) 0x3;
+
+ public static OFFlowRemovedReason readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readByte());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, OFFlowRemovedReason e) {
+ bb.writeByte(toWireValue(e));
+ }
+
+ public static void putTo(OFFlowRemovedReason e, PrimitiveSink sink) {
+ sink.putByte(toWireValue(e));
+ }
+
+ public static OFFlowRemovedReason ofWireValue(byte val) {
+ switch(val) {
+ case IDLE_TIMEOUT_VAL:
+ return OFFlowRemovedReason.IDLE_TIMEOUT;
+ case HARD_TIMEOUT_VAL:
+ return OFFlowRemovedReason.HARD_TIMEOUT;
+ case DELETE_VAL:
+ return OFFlowRemovedReason.DELETE;
+ case GROUP_DELETE_VAL:
+ return OFFlowRemovedReason.GROUP_DELETE;
+ default:
+ throw new IllegalArgumentException("Illegal wire value for type OFFlowRemovedReason in version 1.3: " + val);
+ }
+ }
+
+
+ public static byte toWireValue(OFFlowRemovedReason e) {
+ switch(e) {
+ case IDLE_TIMEOUT:
+ return IDLE_TIMEOUT_VAL;
+ case HARD_TIMEOUT:
+ return HARD_TIMEOUT_VAL;
+ case DELETE:
+ return DELETE_VAL;
+ case GROUP_DELETE:
+ return GROUP_DELETE_VAL;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFFlowRemovedReason in version 1.3: " + e);
+ }
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowRemovedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowRemovedVer13.java
new file mode 100644
index 0000000..4850443
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowRemovedVer13.java
@@ -0,0 +1,825 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFFlowRemovedVer13 implements OFFlowRemoved {
+ private static final Logger logger = LoggerFactory.getLogger(OFFlowRemovedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 56;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static U64 DEFAULT_COOKIE = U64.ZERO;
+ private final static int DEFAULT_PRIORITY = 0x0;
+ private final static short DEFAULT_REASON = (short) 0x0;
+ private final static TableId DEFAULT_TABLE_ID = TableId.ALL;
+ private final static long DEFAULT_DURATION_SEC = 0x0L;
+ private final static long DEFAULT_DURATION_NSEC = 0x0L;
+ private final static int DEFAULT_IDLE_TIMEOUT = 0x0;
+ private final static int DEFAULT_HARD_TIMEOUT = 0x0;
+ private final static U64 DEFAULT_PACKET_COUNT = U64.ZERO;
+ private final static U64 DEFAULT_BYTE_COUNT = U64.ZERO;
+ private final static Match DEFAULT_MATCH = OFFactoryVer13.MATCH_WILDCARD_ALL;
+
+ // OF message fields
+ private final long xid;
+ private final U64 cookie;
+ private final int priority;
+ private final short reason;
+ private final TableId tableId;
+ private final long durationSec;
+ private final long durationNsec;
+ private final int idleTimeout;
+ private final int hardTimeout;
+ private final U64 packetCount;
+ private final U64 byteCount;
+ private final Match match;
+//
+ // Immutable default instance
+ final static OFFlowRemovedVer13 DEFAULT = new OFFlowRemovedVer13(
+ DEFAULT_XID, DEFAULT_COOKIE, DEFAULT_PRIORITY, DEFAULT_REASON, DEFAULT_TABLE_ID, DEFAULT_DURATION_SEC, DEFAULT_DURATION_NSEC, DEFAULT_IDLE_TIMEOUT, DEFAULT_HARD_TIMEOUT, DEFAULT_PACKET_COUNT, DEFAULT_BYTE_COUNT, DEFAULT_MATCH
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFFlowRemovedVer13(long xid, U64 cookie, int priority, short reason, TableId tableId, long durationSec, long durationNsec, int idleTimeout, int hardTimeout, U64 packetCount, U64 byteCount, Match match) {
+ this.xid = xid;
+ this.cookie = cookie;
+ this.priority = priority;
+ this.reason = reason;
+ this.tableId = tableId;
+ this.durationSec = durationSec;
+ this.durationNsec = durationNsec;
+ this.idleTimeout = idleTimeout;
+ this.hardTimeout = hardTimeout;
+ this.packetCount = packetCount;
+ this.byteCount = byteCount;
+ this.match = match;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.FLOW_REMOVED;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public U64 getCookie() {
+ return cookie;
+ }
+
+ @Override
+ public int getPriority() {
+ return priority;
+ }
+
+ @Override
+ public short getReason() {
+ return reason;
+ }
+
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public long getDurationSec() {
+ return durationSec;
+ }
+
+ @Override
+ public long getDurationNsec() {
+ return durationNsec;
+ }
+
+ @Override
+ public int getIdleTimeout() {
+ return idleTimeout;
+ }
+
+ @Override
+ public int getHardTimeout() {
+ return hardTimeout;
+ }
+
+ @Override
+ public U64 getPacketCount() {
+ return packetCount;
+ }
+
+ @Override
+ public U64 getByteCount() {
+ return byteCount;
+ }
+
+ @Override
+ public Match getMatch() {
+ return match;
+ }
+
+
+
+ public OFFlowRemoved.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFFlowRemoved.Builder {
+ final OFFlowRemovedVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean cookieSet;
+ private U64 cookie;
+ private boolean prioritySet;
+ private int priority;
+ private boolean reasonSet;
+ private short reason;
+ private boolean tableIdSet;
+ private TableId tableId;
+ private boolean durationSecSet;
+ private long durationSec;
+ private boolean durationNsecSet;
+ private long durationNsec;
+ private boolean idleTimeoutSet;
+ private int idleTimeout;
+ private boolean hardTimeoutSet;
+ private int hardTimeout;
+ private boolean packetCountSet;
+ private U64 packetCount;
+ private boolean byteCountSet;
+ private U64 byteCount;
+ private boolean matchSet;
+ private Match match;
+
+ BuilderWithParent(OFFlowRemovedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.FLOW_REMOVED;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFFlowRemoved.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public U64 getCookie() {
+ return cookie;
+ }
+
+ @Override
+ public OFFlowRemoved.Builder setCookie(U64 cookie) {
+ this.cookie = cookie;
+ this.cookieSet = true;
+ return this;
+ }
+ @Override
+ public int getPriority() {
+ return priority;
+ }
+
+ @Override
+ public OFFlowRemoved.Builder setPriority(int priority) {
+ this.priority = priority;
+ this.prioritySet = true;
+ return this;
+ }
+ @Override
+ public short getReason() {
+ return reason;
+ }
+
+ @Override
+ public OFFlowRemoved.Builder setReason(short reason) {
+ this.reason = reason;
+ this.reasonSet = true;
+ return this;
+ }
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFFlowRemoved.Builder setTableId(TableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+ @Override
+ public long getDurationSec() {
+ return durationSec;
+ }
+
+ @Override
+ public OFFlowRemoved.Builder setDurationSec(long durationSec) {
+ this.durationSec = durationSec;
+ this.durationSecSet = true;
+ return this;
+ }
+ @Override
+ public long getDurationNsec() {
+ return durationNsec;
+ }
+
+ @Override
+ public OFFlowRemoved.Builder setDurationNsec(long durationNsec) {
+ this.durationNsec = durationNsec;
+ this.durationNsecSet = true;
+ return this;
+ }
+ @Override
+ public int getIdleTimeout() {
+ return idleTimeout;
+ }
+
+ @Override
+ public OFFlowRemoved.Builder setIdleTimeout(int idleTimeout) {
+ this.idleTimeout = idleTimeout;
+ this.idleTimeoutSet = true;
+ return this;
+ }
+ @Override
+ public int getHardTimeout() {
+ return hardTimeout;
+ }
+
+ @Override
+ public OFFlowRemoved.Builder setHardTimeout(int hardTimeout) {
+ this.hardTimeout = hardTimeout;
+ this.hardTimeoutSet = true;
+ return this;
+ }
+ @Override
+ public U64 getPacketCount() {
+ return packetCount;
+ }
+
+ @Override
+ public OFFlowRemoved.Builder setPacketCount(U64 packetCount) {
+ this.packetCount = packetCount;
+ this.packetCountSet = true;
+ return this;
+ }
+ @Override
+ public U64 getByteCount() {
+ return byteCount;
+ }
+
+ @Override
+ public OFFlowRemoved.Builder setByteCount(U64 byteCount) {
+ this.byteCount = byteCount;
+ this.byteCountSet = true;
+ return this;
+ }
+ @Override
+ public Match getMatch() {
+ return match;
+ }
+
+ @Override
+ public OFFlowRemoved.Builder setMatch(Match match) {
+ this.match = match;
+ this.matchSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFFlowRemoved build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ U64 cookie = this.cookieSet ? this.cookie : parentMessage.cookie;
+ if(cookie == null)
+ throw new NullPointerException("Property cookie must not be null");
+ int priority = this.prioritySet ? this.priority : parentMessage.priority;
+ short reason = this.reasonSet ? this.reason : parentMessage.reason;
+ TableId tableId = this.tableIdSet ? this.tableId : parentMessage.tableId;
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+ long durationSec = this.durationSecSet ? this.durationSec : parentMessage.durationSec;
+ long durationNsec = this.durationNsecSet ? this.durationNsec : parentMessage.durationNsec;
+ int idleTimeout = this.idleTimeoutSet ? this.idleTimeout : parentMessage.idleTimeout;
+ int hardTimeout = this.hardTimeoutSet ? this.hardTimeout : parentMessage.hardTimeout;
+ U64 packetCount = this.packetCountSet ? this.packetCount : parentMessage.packetCount;
+ if(packetCount == null)
+ throw new NullPointerException("Property packetCount must not be null");
+ U64 byteCount = this.byteCountSet ? this.byteCount : parentMessage.byteCount;
+ if(byteCount == null)
+ throw new NullPointerException("Property byteCount must not be null");
+ Match match = this.matchSet ? this.match : parentMessage.match;
+ if(match == null)
+ throw new NullPointerException("Property match must not be null");
+
+ //
+ return new OFFlowRemovedVer13(
+ xid,
+ cookie,
+ priority,
+ reason,
+ tableId,
+ durationSec,
+ durationNsec,
+ idleTimeout,
+ hardTimeout,
+ packetCount,
+ byteCount,
+ match
+ );
+ }
+
+ }
+
+ static class Builder implements OFFlowRemoved.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean cookieSet;
+ private U64 cookie;
+ private boolean prioritySet;
+ private int priority;
+ private boolean reasonSet;
+ private short reason;
+ private boolean tableIdSet;
+ private TableId tableId;
+ private boolean durationSecSet;
+ private long durationSec;
+ private boolean durationNsecSet;
+ private long durationNsec;
+ private boolean idleTimeoutSet;
+ private int idleTimeout;
+ private boolean hardTimeoutSet;
+ private int hardTimeout;
+ private boolean packetCountSet;
+ private U64 packetCount;
+ private boolean byteCountSet;
+ private U64 byteCount;
+ private boolean matchSet;
+ private Match match;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.FLOW_REMOVED;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFFlowRemoved.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public U64 getCookie() {
+ return cookie;
+ }
+
+ @Override
+ public OFFlowRemoved.Builder setCookie(U64 cookie) {
+ this.cookie = cookie;
+ this.cookieSet = true;
+ return this;
+ }
+ @Override
+ public int getPriority() {
+ return priority;
+ }
+
+ @Override
+ public OFFlowRemoved.Builder setPriority(int priority) {
+ this.priority = priority;
+ this.prioritySet = true;
+ return this;
+ }
+ @Override
+ public short getReason() {
+ return reason;
+ }
+
+ @Override
+ public OFFlowRemoved.Builder setReason(short reason) {
+ this.reason = reason;
+ this.reasonSet = true;
+ return this;
+ }
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFFlowRemoved.Builder setTableId(TableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+ @Override
+ public long getDurationSec() {
+ return durationSec;
+ }
+
+ @Override
+ public OFFlowRemoved.Builder setDurationSec(long durationSec) {
+ this.durationSec = durationSec;
+ this.durationSecSet = true;
+ return this;
+ }
+ @Override
+ public long getDurationNsec() {
+ return durationNsec;
+ }
+
+ @Override
+ public OFFlowRemoved.Builder setDurationNsec(long durationNsec) {
+ this.durationNsec = durationNsec;
+ this.durationNsecSet = true;
+ return this;
+ }
+ @Override
+ public int getIdleTimeout() {
+ return idleTimeout;
+ }
+
+ @Override
+ public OFFlowRemoved.Builder setIdleTimeout(int idleTimeout) {
+ this.idleTimeout = idleTimeout;
+ this.idleTimeoutSet = true;
+ return this;
+ }
+ @Override
+ public int getHardTimeout() {
+ return hardTimeout;
+ }
+
+ @Override
+ public OFFlowRemoved.Builder setHardTimeout(int hardTimeout) {
+ this.hardTimeout = hardTimeout;
+ this.hardTimeoutSet = true;
+ return this;
+ }
+ @Override
+ public U64 getPacketCount() {
+ return packetCount;
+ }
+
+ @Override
+ public OFFlowRemoved.Builder setPacketCount(U64 packetCount) {
+ this.packetCount = packetCount;
+ this.packetCountSet = true;
+ return this;
+ }
+ @Override
+ public U64 getByteCount() {
+ return byteCount;
+ }
+
+ @Override
+ public OFFlowRemoved.Builder setByteCount(U64 byteCount) {
+ this.byteCount = byteCount;
+ this.byteCountSet = true;
+ return this;
+ }
+ @Override
+ public Match getMatch() {
+ return match;
+ }
+
+ @Override
+ public OFFlowRemoved.Builder setMatch(Match match) {
+ this.match = match;
+ this.matchSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFFlowRemoved build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ U64 cookie = this.cookieSet ? this.cookie : DEFAULT_COOKIE;
+ if(cookie == null)
+ throw new NullPointerException("Property cookie must not be null");
+ int priority = this.prioritySet ? this.priority : DEFAULT_PRIORITY;
+ short reason = this.reasonSet ? this.reason : DEFAULT_REASON;
+ TableId tableId = this.tableIdSet ? this.tableId : DEFAULT_TABLE_ID;
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+ long durationSec = this.durationSecSet ? this.durationSec : DEFAULT_DURATION_SEC;
+ long durationNsec = this.durationNsecSet ? this.durationNsec : DEFAULT_DURATION_NSEC;
+ int idleTimeout = this.idleTimeoutSet ? this.idleTimeout : DEFAULT_IDLE_TIMEOUT;
+ int hardTimeout = this.hardTimeoutSet ? this.hardTimeout : DEFAULT_HARD_TIMEOUT;
+ U64 packetCount = this.packetCountSet ? this.packetCount : DEFAULT_PACKET_COUNT;
+ if(packetCount == null)
+ throw new NullPointerException("Property packetCount must not be null");
+ U64 byteCount = this.byteCountSet ? this.byteCount : DEFAULT_BYTE_COUNT;
+ if(byteCount == null)
+ throw new NullPointerException("Property byteCount must not be null");
+ Match match = this.matchSet ? this.match : DEFAULT_MATCH;
+ if(match == null)
+ throw new NullPointerException("Property match must not be null");
+
+
+ return new OFFlowRemovedVer13(
+ xid,
+ cookie,
+ priority,
+ reason,
+ tableId,
+ durationSec,
+ durationNsec,
+ idleTimeout,
+ hardTimeout,
+ packetCount,
+ byteCount,
+ match
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFFlowRemoved> {
+ @Override
+ public OFFlowRemoved readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 11
+ byte type = bb.readByte();
+ if(type != (byte) 0xb)
+ throw new OFParseError("Wrong type: Expected=OFType.FLOW_REMOVED(11), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ U64 cookie = U64.ofRaw(bb.readLong());
+ int priority = U16.f(bb.readShort());
+ short reason = U8.f(bb.readByte());
+ TableId tableId = TableId.readByte(bb);
+ long durationSec = U32.f(bb.readInt());
+ long durationNsec = U32.f(bb.readInt());
+ int idleTimeout = U16.f(bb.readShort());
+ int hardTimeout = U16.f(bb.readShort());
+ U64 packetCount = U64.ofRaw(bb.readLong());
+ U64 byteCount = U64.ofRaw(bb.readLong());
+ Match match = ChannelUtilsVer13.readOFMatch(bb);
+
+ OFFlowRemovedVer13 flowRemovedVer13 = new OFFlowRemovedVer13(
+ xid,
+ cookie,
+ priority,
+ reason,
+ tableId,
+ durationSec,
+ durationNsec,
+ idleTimeout,
+ hardTimeout,
+ packetCount,
+ byteCount,
+ match
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", flowRemovedVer13);
+ return flowRemovedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFFlowRemovedVer13Funnel FUNNEL = new OFFlowRemovedVer13Funnel();
+ static class OFFlowRemovedVer13Funnel implements Funnel<OFFlowRemovedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFFlowRemovedVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 11
+ sink.putByte((byte) 0xb);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ message.cookie.putTo(sink);
+ sink.putInt(message.priority);
+ sink.putShort(message.reason);
+ message.tableId.putTo(sink);
+ sink.putLong(message.durationSec);
+ sink.putLong(message.durationNsec);
+ sink.putInt(message.idleTimeout);
+ sink.putInt(message.hardTimeout);
+ message.packetCount.putTo(sink);
+ message.byteCount.putTo(sink);
+ message.match.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFFlowRemovedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFFlowRemovedVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 11
+ bb.writeByte((byte) 0xb);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ bb.writeLong(message.cookie.getValue());
+ bb.writeShort(U16.t(message.priority));
+ bb.writeByte(U8.t(message.reason));
+ message.tableId.writeByte(bb);
+ bb.writeInt(U32.t(message.durationSec));
+ bb.writeInt(U32.t(message.durationNsec));
+ bb.writeShort(U16.t(message.idleTimeout));
+ bb.writeShort(U16.t(message.hardTimeout));
+ bb.writeLong(message.packetCount.getValue());
+ bb.writeLong(message.byteCount.getValue());
+ message.match.writeTo(bb);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFFlowRemovedVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("cookie=").append(cookie);
+ b.append(", ");
+ b.append("priority=").append(priority);
+ b.append(", ");
+ b.append("reason=").append(reason);
+ b.append(", ");
+ b.append("tableId=").append(tableId);
+ b.append(", ");
+ b.append("durationSec=").append(durationSec);
+ b.append(", ");
+ b.append("durationNsec=").append(durationNsec);
+ b.append(", ");
+ b.append("idleTimeout=").append(idleTimeout);
+ b.append(", ");
+ b.append("hardTimeout=").append(hardTimeout);
+ b.append(", ");
+ b.append("packetCount=").append(packetCount);
+ b.append(", ");
+ b.append("byteCount=").append(byteCount);
+ b.append(", ");
+ b.append("match=").append(match);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFFlowRemovedVer13 other = (OFFlowRemovedVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (cookie == null) {
+ if (other.cookie != null)
+ return false;
+ } else if (!cookie.equals(other.cookie))
+ return false;
+ if( priority != other.priority)
+ return false;
+ if( reason != other.reason)
+ return false;
+ if (tableId == null) {
+ if (other.tableId != null)
+ return false;
+ } else if (!tableId.equals(other.tableId))
+ return false;
+ if( durationSec != other.durationSec)
+ return false;
+ if( durationNsec != other.durationNsec)
+ return false;
+ if( idleTimeout != other.idleTimeout)
+ return false;
+ if( hardTimeout != other.hardTimeout)
+ return false;
+ if (packetCount == null) {
+ if (other.packetCount != null)
+ return false;
+ } else if (!packetCount.equals(other.packetCount))
+ return false;
+ if (byteCount == null) {
+ if (other.byteCount != null)
+ return false;
+ } else if (!byteCount.equals(other.byteCount))
+ return false;
+ if (match == null) {
+ if (other.match != null)
+ return false;
+ } else if (!match.equals(other.match))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((cookie == null) ? 0 : cookie.hashCode());
+ result = prime * result + priority;
+ result = prime * result + reason;
+ result = prime * result + ((tableId == null) ? 0 : tableId.hashCode());
+ result = prime * (int) (durationSec ^ (durationSec >>> 32));
+ result = prime * (int) (durationNsec ^ (durationNsec >>> 32));
+ result = prime * result + idleTimeout;
+ result = prime * result + hardTimeout;
+ result = prime * result + ((packetCount == null) ? 0 : packetCount.hashCode());
+ result = prime * result + ((byteCount == null) ? 0 : byteCount.hashCode());
+ result = prime * result + ((match == null) ? 0 : match.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowStatsEntryVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowStatsEntryVer13.java
new file mode 100644
index 0000000..8dccc1d
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowStatsEntryVer13.java
@@ -0,0 +1,844 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFFlowStatsEntryVer13 implements OFFlowStatsEntry {
+ private static final Logger logger = LoggerFactory.getLogger(OFFlowStatsEntryVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 56;
+
+ private final static TableId DEFAULT_TABLE_ID = TableId.ALL;
+ private final static long DEFAULT_DURATION_SEC = 0x0L;
+ private final static long DEFAULT_DURATION_NSEC = 0x0L;
+ private final static int DEFAULT_PRIORITY = 0x0;
+ private final static int DEFAULT_IDLE_TIMEOUT = 0x0;
+ private final static int DEFAULT_HARD_TIMEOUT = 0x0;
+ private final static Set<OFFlowModFlags> DEFAULT_FLAGS = ImmutableSet.<OFFlowModFlags>of();
+ private final static U64 DEFAULT_COOKIE = U64.ZERO;
+ private final static U64 DEFAULT_PACKET_COUNT = U64.ZERO;
+ private final static U64 DEFAULT_BYTE_COUNT = U64.ZERO;
+ private final static Match DEFAULT_MATCH = OFFactoryVer13.MATCH_WILDCARD_ALL;
+ private final static List<OFInstruction> DEFAULT_INSTRUCTIONS = ImmutableList.<OFInstruction>of();
+
+ // OF message fields
+ private final TableId tableId;
+ private final long durationSec;
+ private final long durationNsec;
+ private final int priority;
+ private final int idleTimeout;
+ private final int hardTimeout;
+ private final Set<OFFlowModFlags> flags;
+ private final U64 cookie;
+ private final U64 packetCount;
+ private final U64 byteCount;
+ private final Match match;
+ private final List<OFInstruction> instructions;
+//
+ // Immutable default instance
+ final static OFFlowStatsEntryVer13 DEFAULT = new OFFlowStatsEntryVer13(
+ DEFAULT_TABLE_ID, DEFAULT_DURATION_SEC, DEFAULT_DURATION_NSEC, DEFAULT_PRIORITY, DEFAULT_IDLE_TIMEOUT, DEFAULT_HARD_TIMEOUT, DEFAULT_FLAGS, DEFAULT_COOKIE, DEFAULT_PACKET_COUNT, DEFAULT_BYTE_COUNT, DEFAULT_MATCH, DEFAULT_INSTRUCTIONS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFFlowStatsEntryVer13(TableId tableId, long durationSec, long durationNsec, int priority, int idleTimeout, int hardTimeout, Set<OFFlowModFlags> flags, U64 cookie, U64 packetCount, U64 byteCount, Match match, List<OFInstruction> instructions) {
+ this.tableId = tableId;
+ this.durationSec = durationSec;
+ this.durationNsec = durationNsec;
+ this.priority = priority;
+ this.idleTimeout = idleTimeout;
+ this.hardTimeout = hardTimeout;
+ this.flags = flags;
+ this.cookie = cookie;
+ this.packetCount = packetCount;
+ this.byteCount = byteCount;
+ this.match = match;
+ this.instructions = instructions;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public long getDurationSec() {
+ return durationSec;
+ }
+
+ @Override
+ public long getDurationNsec() {
+ return durationNsec;
+ }
+
+ @Override
+ public int getPriority() {
+ return priority;
+ }
+
+ @Override
+ public int getIdleTimeout() {
+ return idleTimeout;
+ }
+
+ @Override
+ public int getHardTimeout() {
+ return hardTimeout;
+ }
+
+ @Override
+ public U64 getCookie() {
+ return cookie;
+ }
+
+ @Override
+ public U64 getPacketCount() {
+ return packetCount;
+ }
+
+ @Override
+ public U64 getByteCount() {
+ return byteCount;
+ }
+
+ @Override
+ public Match getMatch() {
+ return match;
+ }
+
+ @Override
+ public List<OFInstruction> getInstructions() {
+ return instructions;
+ }
+
+ @Override
+ public List<OFAction> getActions()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property actions not supported in version 1.3");
+ }
+
+ @Override
+ public Set<OFFlowModFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFFlowStatsEntry.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFFlowStatsEntry.Builder {
+ final OFFlowStatsEntryVer13 parentMessage;
+
+ // OF message fields
+ private boolean tableIdSet;
+ private TableId tableId;
+ private boolean durationSecSet;
+ private long durationSec;
+ private boolean durationNsecSet;
+ private long durationNsec;
+ private boolean prioritySet;
+ private int priority;
+ private boolean idleTimeoutSet;
+ private int idleTimeout;
+ private boolean hardTimeoutSet;
+ private int hardTimeout;
+ private boolean flagsSet;
+ private Set<OFFlowModFlags> flags;
+ private boolean cookieSet;
+ private U64 cookie;
+ private boolean packetCountSet;
+ private U64 packetCount;
+ private boolean byteCountSet;
+ private U64 byteCount;
+ private boolean matchSet;
+ private Match match;
+ private boolean instructionsSet;
+ private List<OFInstruction> instructions;
+
+ BuilderWithParent(OFFlowStatsEntryVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFFlowStatsEntry.Builder setTableId(TableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+ @Override
+ public long getDurationSec() {
+ return durationSec;
+ }
+
+ @Override
+ public OFFlowStatsEntry.Builder setDurationSec(long durationSec) {
+ this.durationSec = durationSec;
+ this.durationSecSet = true;
+ return this;
+ }
+ @Override
+ public long getDurationNsec() {
+ return durationNsec;
+ }
+
+ @Override
+ public OFFlowStatsEntry.Builder setDurationNsec(long durationNsec) {
+ this.durationNsec = durationNsec;
+ this.durationNsecSet = true;
+ return this;
+ }
+ @Override
+ public int getPriority() {
+ return priority;
+ }
+
+ @Override
+ public OFFlowStatsEntry.Builder setPriority(int priority) {
+ this.priority = priority;
+ this.prioritySet = true;
+ return this;
+ }
+ @Override
+ public int getIdleTimeout() {
+ return idleTimeout;
+ }
+
+ @Override
+ public OFFlowStatsEntry.Builder setIdleTimeout(int idleTimeout) {
+ this.idleTimeout = idleTimeout;
+ this.idleTimeoutSet = true;
+ return this;
+ }
+ @Override
+ public int getHardTimeout() {
+ return hardTimeout;
+ }
+
+ @Override
+ public OFFlowStatsEntry.Builder setHardTimeout(int hardTimeout) {
+ this.hardTimeout = hardTimeout;
+ this.hardTimeoutSet = true;
+ return this;
+ }
+ @Override
+ public U64 getCookie() {
+ return cookie;
+ }
+
+ @Override
+ public OFFlowStatsEntry.Builder setCookie(U64 cookie) {
+ this.cookie = cookie;
+ this.cookieSet = true;
+ return this;
+ }
+ @Override
+ public U64 getPacketCount() {
+ return packetCount;
+ }
+
+ @Override
+ public OFFlowStatsEntry.Builder setPacketCount(U64 packetCount) {
+ this.packetCount = packetCount;
+ this.packetCountSet = true;
+ return this;
+ }
+ @Override
+ public U64 getByteCount() {
+ return byteCount;
+ }
+
+ @Override
+ public OFFlowStatsEntry.Builder setByteCount(U64 byteCount) {
+ this.byteCount = byteCount;
+ this.byteCountSet = true;
+ return this;
+ }
+ @Override
+ public Match getMatch() {
+ return match;
+ }
+
+ @Override
+ public OFFlowStatsEntry.Builder setMatch(Match match) {
+ this.match = match;
+ this.matchSet = true;
+ return this;
+ }
+ @Override
+ public List<OFInstruction> getInstructions() {
+ return instructions;
+ }
+
+ @Override
+ public OFFlowStatsEntry.Builder setInstructions(List<OFInstruction> instructions) {
+ this.instructions = instructions;
+ this.instructionsSet = true;
+ return this;
+ }
+ @Override
+ public List<OFAction> getActions()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property actions not supported in version 1.3");
+ }
+
+ @Override
+ public OFFlowStatsEntry.Builder setActions(List<OFAction> actions) throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property actions not supported in version 1.3");
+ }
+ @Override
+ public Set<OFFlowModFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFFlowStatsEntry.Builder setFlags(Set<OFFlowModFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFFlowStatsEntry build() {
+ TableId tableId = this.tableIdSet ? this.tableId : parentMessage.tableId;
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+ long durationSec = this.durationSecSet ? this.durationSec : parentMessage.durationSec;
+ long durationNsec = this.durationNsecSet ? this.durationNsec : parentMessage.durationNsec;
+ int priority = this.prioritySet ? this.priority : parentMessage.priority;
+ int idleTimeout = this.idleTimeoutSet ? this.idleTimeout : parentMessage.idleTimeout;
+ int hardTimeout = this.hardTimeoutSet ? this.hardTimeout : parentMessage.hardTimeout;
+ Set<OFFlowModFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ U64 cookie = this.cookieSet ? this.cookie : parentMessage.cookie;
+ if(cookie == null)
+ throw new NullPointerException("Property cookie must not be null");
+ U64 packetCount = this.packetCountSet ? this.packetCount : parentMessage.packetCount;
+ if(packetCount == null)
+ throw new NullPointerException("Property packetCount must not be null");
+ U64 byteCount = this.byteCountSet ? this.byteCount : parentMessage.byteCount;
+ if(byteCount == null)
+ throw new NullPointerException("Property byteCount must not be null");
+ Match match = this.matchSet ? this.match : parentMessage.match;
+ if(match == null)
+ throw new NullPointerException("Property match must not be null");
+ List<OFInstruction> instructions = this.instructionsSet ? this.instructions : parentMessage.instructions;
+ if(instructions == null)
+ throw new NullPointerException("Property instructions must not be null");
+
+ //
+ return new OFFlowStatsEntryVer13(
+ tableId,
+ durationSec,
+ durationNsec,
+ priority,
+ idleTimeout,
+ hardTimeout,
+ flags,
+ cookie,
+ packetCount,
+ byteCount,
+ match,
+ instructions
+ );
+ }
+
+ }
+
+ static class Builder implements OFFlowStatsEntry.Builder {
+ // OF message fields
+ private boolean tableIdSet;
+ private TableId tableId;
+ private boolean durationSecSet;
+ private long durationSec;
+ private boolean durationNsecSet;
+ private long durationNsec;
+ private boolean prioritySet;
+ private int priority;
+ private boolean idleTimeoutSet;
+ private int idleTimeout;
+ private boolean hardTimeoutSet;
+ private int hardTimeout;
+ private boolean flagsSet;
+ private Set<OFFlowModFlags> flags;
+ private boolean cookieSet;
+ private U64 cookie;
+ private boolean packetCountSet;
+ private U64 packetCount;
+ private boolean byteCountSet;
+ private U64 byteCount;
+ private boolean matchSet;
+ private Match match;
+ private boolean instructionsSet;
+ private List<OFInstruction> instructions;
+
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFFlowStatsEntry.Builder setTableId(TableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+ @Override
+ public long getDurationSec() {
+ return durationSec;
+ }
+
+ @Override
+ public OFFlowStatsEntry.Builder setDurationSec(long durationSec) {
+ this.durationSec = durationSec;
+ this.durationSecSet = true;
+ return this;
+ }
+ @Override
+ public long getDurationNsec() {
+ return durationNsec;
+ }
+
+ @Override
+ public OFFlowStatsEntry.Builder setDurationNsec(long durationNsec) {
+ this.durationNsec = durationNsec;
+ this.durationNsecSet = true;
+ return this;
+ }
+ @Override
+ public int getPriority() {
+ return priority;
+ }
+
+ @Override
+ public OFFlowStatsEntry.Builder setPriority(int priority) {
+ this.priority = priority;
+ this.prioritySet = true;
+ return this;
+ }
+ @Override
+ public int getIdleTimeout() {
+ return idleTimeout;
+ }
+
+ @Override
+ public OFFlowStatsEntry.Builder setIdleTimeout(int idleTimeout) {
+ this.idleTimeout = idleTimeout;
+ this.idleTimeoutSet = true;
+ return this;
+ }
+ @Override
+ public int getHardTimeout() {
+ return hardTimeout;
+ }
+
+ @Override
+ public OFFlowStatsEntry.Builder setHardTimeout(int hardTimeout) {
+ this.hardTimeout = hardTimeout;
+ this.hardTimeoutSet = true;
+ return this;
+ }
+ @Override
+ public U64 getCookie() {
+ return cookie;
+ }
+
+ @Override
+ public OFFlowStatsEntry.Builder setCookie(U64 cookie) {
+ this.cookie = cookie;
+ this.cookieSet = true;
+ return this;
+ }
+ @Override
+ public U64 getPacketCount() {
+ return packetCount;
+ }
+
+ @Override
+ public OFFlowStatsEntry.Builder setPacketCount(U64 packetCount) {
+ this.packetCount = packetCount;
+ this.packetCountSet = true;
+ return this;
+ }
+ @Override
+ public U64 getByteCount() {
+ return byteCount;
+ }
+
+ @Override
+ public OFFlowStatsEntry.Builder setByteCount(U64 byteCount) {
+ this.byteCount = byteCount;
+ this.byteCountSet = true;
+ return this;
+ }
+ @Override
+ public Match getMatch() {
+ return match;
+ }
+
+ @Override
+ public OFFlowStatsEntry.Builder setMatch(Match match) {
+ this.match = match;
+ this.matchSet = true;
+ return this;
+ }
+ @Override
+ public List<OFInstruction> getInstructions() {
+ return instructions;
+ }
+
+ @Override
+ public OFFlowStatsEntry.Builder setInstructions(List<OFInstruction> instructions) {
+ this.instructions = instructions;
+ this.instructionsSet = true;
+ return this;
+ }
+ @Override
+ public List<OFAction> getActions()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property actions not supported in version 1.3");
+ }
+
+ @Override
+ public OFFlowStatsEntry.Builder setActions(List<OFAction> actions) throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property actions not supported in version 1.3");
+ }
+ @Override
+ public Set<OFFlowModFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFFlowStatsEntry.Builder setFlags(Set<OFFlowModFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFFlowStatsEntry build() {
+ TableId tableId = this.tableIdSet ? this.tableId : DEFAULT_TABLE_ID;
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+ long durationSec = this.durationSecSet ? this.durationSec : DEFAULT_DURATION_SEC;
+ long durationNsec = this.durationNsecSet ? this.durationNsec : DEFAULT_DURATION_NSEC;
+ int priority = this.prioritySet ? this.priority : DEFAULT_PRIORITY;
+ int idleTimeout = this.idleTimeoutSet ? this.idleTimeout : DEFAULT_IDLE_TIMEOUT;
+ int hardTimeout = this.hardTimeoutSet ? this.hardTimeout : DEFAULT_HARD_TIMEOUT;
+ Set<OFFlowModFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ U64 cookie = this.cookieSet ? this.cookie : DEFAULT_COOKIE;
+ if(cookie == null)
+ throw new NullPointerException("Property cookie must not be null");
+ U64 packetCount = this.packetCountSet ? this.packetCount : DEFAULT_PACKET_COUNT;
+ if(packetCount == null)
+ throw new NullPointerException("Property packetCount must not be null");
+ U64 byteCount = this.byteCountSet ? this.byteCount : DEFAULT_BYTE_COUNT;
+ if(byteCount == null)
+ throw new NullPointerException("Property byteCount must not be null");
+ Match match = this.matchSet ? this.match : DEFAULT_MATCH;
+ if(match == null)
+ throw new NullPointerException("Property match must not be null");
+ List<OFInstruction> instructions = this.instructionsSet ? this.instructions : DEFAULT_INSTRUCTIONS;
+ if(instructions == null)
+ throw new NullPointerException("Property instructions must not be null");
+
+
+ return new OFFlowStatsEntryVer13(
+ tableId,
+ durationSec,
+ durationNsec,
+ priority,
+ idleTimeout,
+ hardTimeout,
+ flags,
+ cookie,
+ packetCount,
+ byteCount,
+ match,
+ instructions
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFFlowStatsEntry> {
+ @Override
+ public OFFlowStatsEntry readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ TableId tableId = TableId.readByte(bb);
+ // pad: 1 bytes
+ bb.skipBytes(1);
+ long durationSec = U32.f(bb.readInt());
+ long durationNsec = U32.f(bb.readInt());
+ int priority = U16.f(bb.readShort());
+ int idleTimeout = U16.f(bb.readShort());
+ int hardTimeout = U16.f(bb.readShort());
+ Set<OFFlowModFlags> flags = OFFlowModFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ U64 cookie = U64.ofRaw(bb.readLong());
+ U64 packetCount = U64.ofRaw(bb.readLong());
+ U64 byteCount = U64.ofRaw(bb.readLong());
+ Match match = ChannelUtilsVer13.readOFMatch(bb);
+ List<OFInstruction> instructions = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFInstructionVer13.READER);
+
+ OFFlowStatsEntryVer13 flowStatsEntryVer13 = new OFFlowStatsEntryVer13(
+ tableId,
+ durationSec,
+ durationNsec,
+ priority,
+ idleTimeout,
+ hardTimeout,
+ flags,
+ cookie,
+ packetCount,
+ byteCount,
+ match,
+ instructions
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", flowStatsEntryVer13);
+ return flowStatsEntryVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFFlowStatsEntryVer13Funnel FUNNEL = new OFFlowStatsEntryVer13Funnel();
+ static class OFFlowStatsEntryVer13Funnel implements Funnel<OFFlowStatsEntryVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFFlowStatsEntryVer13 message, PrimitiveSink sink) {
+ // FIXME: skip funnel of length
+ message.tableId.putTo(sink);
+ // skip pad (1 bytes)
+ sink.putLong(message.durationSec);
+ sink.putLong(message.durationNsec);
+ sink.putInt(message.priority);
+ sink.putInt(message.idleTimeout);
+ sink.putInt(message.hardTimeout);
+ OFFlowModFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ message.cookie.putTo(sink);
+ message.packetCount.putTo(sink);
+ message.byteCount.putTo(sink);
+ message.match.putTo(sink);
+ FunnelUtils.putList(message.instructions, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFFlowStatsEntryVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFFlowStatsEntryVer13 message) {
+ int startIndex = bb.writerIndex();
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ message.tableId.writeByte(bb);
+ // pad: 1 bytes
+ bb.writeZero(1);
+ bb.writeInt(U32.t(message.durationSec));
+ bb.writeInt(U32.t(message.durationNsec));
+ bb.writeShort(U16.t(message.priority));
+ bb.writeShort(U16.t(message.idleTimeout));
+ bb.writeShort(U16.t(message.hardTimeout));
+ OFFlowModFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ bb.writeLong(message.cookie.getValue());
+ bb.writeLong(message.packetCount.getValue());
+ bb.writeLong(message.byteCount.getValue());
+ message.match.writeTo(bb);
+ ChannelUtils.writeList(bb, message.instructions);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFFlowStatsEntryVer13(");
+ b.append("tableId=").append(tableId);
+ b.append(", ");
+ b.append("durationSec=").append(durationSec);
+ b.append(", ");
+ b.append("durationNsec=").append(durationNsec);
+ b.append(", ");
+ b.append("priority=").append(priority);
+ b.append(", ");
+ b.append("idleTimeout=").append(idleTimeout);
+ b.append(", ");
+ b.append("hardTimeout=").append(hardTimeout);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("cookie=").append(cookie);
+ b.append(", ");
+ b.append("packetCount=").append(packetCount);
+ b.append(", ");
+ b.append("byteCount=").append(byteCount);
+ b.append(", ");
+ b.append("match=").append(match);
+ b.append(", ");
+ b.append("instructions=").append(instructions);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFFlowStatsEntryVer13 other = (OFFlowStatsEntryVer13) obj;
+
+ if (tableId == null) {
+ if (other.tableId != null)
+ return false;
+ } else if (!tableId.equals(other.tableId))
+ return false;
+ if( durationSec != other.durationSec)
+ return false;
+ if( durationNsec != other.durationNsec)
+ return false;
+ if( priority != other.priority)
+ return false;
+ if( idleTimeout != other.idleTimeout)
+ return false;
+ if( hardTimeout != other.hardTimeout)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if (cookie == null) {
+ if (other.cookie != null)
+ return false;
+ } else if (!cookie.equals(other.cookie))
+ return false;
+ if (packetCount == null) {
+ if (other.packetCount != null)
+ return false;
+ } else if (!packetCount.equals(other.packetCount))
+ return false;
+ if (byteCount == null) {
+ if (other.byteCount != null)
+ return false;
+ } else if (!byteCount.equals(other.byteCount))
+ return false;
+ if (match == null) {
+ if (other.match != null)
+ return false;
+ } else if (!match.equals(other.match))
+ return false;
+ if (instructions == null) {
+ if (other.instructions != null)
+ return false;
+ } else if (!instructions.equals(other.instructions))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((tableId == null) ? 0 : tableId.hashCode());
+ result = prime * (int) (durationSec ^ (durationSec >>> 32));
+ result = prime * (int) (durationNsec ^ (durationNsec >>> 32));
+ result = prime * result + priority;
+ result = prime * result + idleTimeout;
+ result = prime * result + hardTimeout;
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * result + ((cookie == null) ? 0 : cookie.hashCode());
+ result = prime * result + ((packetCount == null) ? 0 : packetCount.hashCode());
+ result = prime * result + ((byteCount == null) ? 0 : byteCount.hashCode());
+ result = prime * result + ((match == null) ? 0 : match.hashCode());
+ result = prime * result + ((instructions == null) ? 0 : instructions.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowStatsReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowStatsReplyVer13.java
new file mode 100644
index 0000000..f6ccc56
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowStatsReplyVer13.java
@@ -0,0 +1,412 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFFlowStatsReplyVer13 implements OFFlowStatsReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFFlowStatsReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 16;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsReplyFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsReplyFlags>of();
+ private final static List<OFFlowStatsEntry> DEFAULT_ENTRIES = ImmutableList.<OFFlowStatsEntry>of();
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsReplyFlags> flags;
+ private final List<OFFlowStatsEntry> entries;
+//
+ // Immutable default instance
+ final static OFFlowStatsReplyVer13 DEFAULT = new OFFlowStatsReplyVer13(
+ DEFAULT_XID, DEFAULT_FLAGS, DEFAULT_ENTRIES
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFFlowStatsReplyVer13(long xid, Set<OFStatsReplyFlags> flags, List<OFFlowStatsEntry> entries) {
+ this.xid = xid;
+ this.flags = flags;
+ this.entries = entries;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.FLOW;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public List<OFFlowStatsEntry> getEntries() {
+ return entries;
+ }
+
+
+
+ public OFFlowStatsReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFFlowStatsReply.Builder {
+ final OFFlowStatsReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean entriesSet;
+ private List<OFFlowStatsEntry> entries;
+
+ BuilderWithParent(OFFlowStatsReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFFlowStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.FLOW;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFFlowStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public List<OFFlowStatsEntry> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFFlowStatsReply.Builder setEntries(List<OFFlowStatsEntry> entries) {
+ this.entries = entries;
+ this.entriesSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFFlowStatsReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ List<OFFlowStatsEntry> entries = this.entriesSet ? this.entries : parentMessage.entries;
+ if(entries == null)
+ throw new NullPointerException("Property entries must not be null");
+
+ //
+ return new OFFlowStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ }
+
+ }
+
+ static class Builder implements OFFlowStatsReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean entriesSet;
+ private List<OFFlowStatsEntry> entries;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFFlowStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.FLOW;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFFlowStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public List<OFFlowStatsEntry> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFFlowStatsReply.Builder setEntries(List<OFFlowStatsEntry> entries) {
+ this.entries = entries;
+ this.entriesSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFFlowStatsReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ List<OFFlowStatsEntry> entries = this.entriesSet ? this.entries : DEFAULT_ENTRIES;
+ if(entries == null)
+ throw new NullPointerException("Property entries must not be null");
+
+
+ return new OFFlowStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFFlowStatsReply> {
+ @Override
+ public OFFlowStatsReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 19
+ byte type = bb.readByte();
+ if(type != (byte) 0x13)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REPLY(19), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 1
+ short statsType = bb.readShort();
+ if(statsType != (short) 0x1)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.FLOW(1), got="+statsType);
+ Set<OFStatsReplyFlags> flags = OFStatsReplyFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ List<OFFlowStatsEntry> entries = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFFlowStatsEntryVer13.READER);
+
+ OFFlowStatsReplyVer13 flowStatsReplyVer13 = new OFFlowStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", flowStatsReplyVer13);
+ return flowStatsReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFFlowStatsReplyVer13Funnel FUNNEL = new OFFlowStatsReplyVer13Funnel();
+ static class OFFlowStatsReplyVer13Funnel implements Funnel<OFFlowStatsReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFFlowStatsReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 19
+ sink.putByte((byte) 0x13);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property statsType = 1
+ sink.putShort((short) 0x1);
+ OFStatsReplyFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ FunnelUtils.putList(message.entries, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFFlowStatsReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFFlowStatsReplyVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 19
+ bb.writeByte((byte) 0x13);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 1
+ bb.writeShort((short) 0x1);
+ OFStatsReplyFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ ChannelUtils.writeList(bb, message.entries);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFFlowStatsReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("entries=").append(entries);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFFlowStatsReplyVer13 other = (OFFlowStatsReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if (entries == null) {
+ if (other.entries != null)
+ return false;
+ } else if (!entries.equals(other.entries))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * result + ((entries == null) ? 0 : entries.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowStatsRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowStatsRequestVer13.java
new file mode 100644
index 0000000..ebf2cb9
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowStatsRequestVer13.java
@@ -0,0 +1,690 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFFlowStatsRequestVer13 implements OFFlowStatsRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFFlowStatsRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 56;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsRequestFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsRequestFlags>of();
+ private final static TableId DEFAULT_TABLE_ID = TableId.ALL;
+ private final static OFPort DEFAULT_OUT_PORT = OFPort.ANY;
+ private final static OFGroup DEFAULT_OUT_GROUP = OFGroup.ANY;
+ private final static U64 DEFAULT_COOKIE = U64.ZERO;
+ private final static U64 DEFAULT_COOKIE_MASK = U64.ZERO;
+ private final static Match DEFAULT_MATCH = OFFactoryVer13.MATCH_WILDCARD_ALL;
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsRequestFlags> flags;
+ private final TableId tableId;
+ private final OFPort outPort;
+ private final OFGroup outGroup;
+ private final U64 cookie;
+ private final U64 cookieMask;
+ private final Match match;
+//
+ // Immutable default instance
+ final static OFFlowStatsRequestVer13 DEFAULT = new OFFlowStatsRequestVer13(
+ DEFAULT_XID, DEFAULT_FLAGS, DEFAULT_TABLE_ID, DEFAULT_OUT_PORT, DEFAULT_OUT_GROUP, DEFAULT_COOKIE, DEFAULT_COOKIE_MASK, DEFAULT_MATCH
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFFlowStatsRequestVer13(long xid, Set<OFStatsRequestFlags> flags, TableId tableId, OFPort outPort, OFGroup outGroup, U64 cookie, U64 cookieMask, Match match) {
+ this.xid = xid;
+ this.flags = flags;
+ this.tableId = tableId;
+ this.outPort = outPort;
+ this.outGroup = outGroup;
+ this.cookie = cookie;
+ this.cookieMask = cookieMask;
+ this.match = match;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.FLOW;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFPort getOutPort() {
+ return outPort;
+ }
+
+ @Override
+ public OFGroup getOutGroup() {
+ return outGroup;
+ }
+
+ @Override
+ public U64 getCookie() {
+ return cookie;
+ }
+
+ @Override
+ public U64 getCookieMask() {
+ return cookieMask;
+ }
+
+ @Override
+ public Match getMatch() {
+ return match;
+ }
+
+
+
+ public OFFlowStatsRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFFlowStatsRequest.Builder {
+ final OFFlowStatsRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+ private boolean tableIdSet;
+ private TableId tableId;
+ private boolean outPortSet;
+ private OFPort outPort;
+ private boolean outGroupSet;
+ private OFGroup outGroup;
+ private boolean cookieSet;
+ private U64 cookie;
+ private boolean cookieMaskSet;
+ private U64 cookieMask;
+ private boolean matchSet;
+ private Match match;
+
+ BuilderWithParent(OFFlowStatsRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFFlowStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.FLOW;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFFlowStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFFlowStatsRequest.Builder setTableId(TableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getOutPort() {
+ return outPort;
+ }
+
+ @Override
+ public OFFlowStatsRequest.Builder setOutPort(OFPort outPort) {
+ this.outPort = outPort;
+ this.outPortSet = true;
+ return this;
+ }
+ @Override
+ public OFGroup getOutGroup() {
+ return outGroup;
+ }
+
+ @Override
+ public OFFlowStatsRequest.Builder setOutGroup(OFGroup outGroup) {
+ this.outGroup = outGroup;
+ this.outGroupSet = true;
+ return this;
+ }
+ @Override
+ public U64 getCookie() {
+ return cookie;
+ }
+
+ @Override
+ public OFFlowStatsRequest.Builder setCookie(U64 cookie) {
+ this.cookie = cookie;
+ this.cookieSet = true;
+ return this;
+ }
+ @Override
+ public U64 getCookieMask() {
+ return cookieMask;
+ }
+
+ @Override
+ public OFFlowStatsRequest.Builder setCookieMask(U64 cookieMask) {
+ this.cookieMask = cookieMask;
+ this.cookieMaskSet = true;
+ return this;
+ }
+ @Override
+ public Match getMatch() {
+ return match;
+ }
+
+ @Override
+ public OFFlowStatsRequest.Builder setMatch(Match match) {
+ this.match = match;
+ this.matchSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFFlowStatsRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ TableId tableId = this.tableIdSet ? this.tableId : parentMessage.tableId;
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+ OFPort outPort = this.outPortSet ? this.outPort : parentMessage.outPort;
+ if(outPort == null)
+ throw new NullPointerException("Property outPort must not be null");
+ OFGroup outGroup = this.outGroupSet ? this.outGroup : parentMessage.outGroup;
+ if(outGroup == null)
+ throw new NullPointerException("Property outGroup must not be null");
+ U64 cookie = this.cookieSet ? this.cookie : parentMessage.cookie;
+ if(cookie == null)
+ throw new NullPointerException("Property cookie must not be null");
+ U64 cookieMask = this.cookieMaskSet ? this.cookieMask : parentMessage.cookieMask;
+ if(cookieMask == null)
+ throw new NullPointerException("Property cookieMask must not be null");
+ Match match = this.matchSet ? this.match : parentMessage.match;
+ if(match == null)
+ throw new NullPointerException("Property match must not be null");
+
+ //
+ return new OFFlowStatsRequestVer13(
+ xid,
+ flags,
+ tableId,
+ outPort,
+ outGroup,
+ cookie,
+ cookieMask,
+ match
+ );
+ }
+
+ }
+
+ static class Builder implements OFFlowStatsRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+ private boolean tableIdSet;
+ private TableId tableId;
+ private boolean outPortSet;
+ private OFPort outPort;
+ private boolean outGroupSet;
+ private OFGroup outGroup;
+ private boolean cookieSet;
+ private U64 cookie;
+ private boolean cookieMaskSet;
+ private U64 cookieMask;
+ private boolean matchSet;
+ private Match match;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFFlowStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.FLOW;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFFlowStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFFlowStatsRequest.Builder setTableId(TableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getOutPort() {
+ return outPort;
+ }
+
+ @Override
+ public OFFlowStatsRequest.Builder setOutPort(OFPort outPort) {
+ this.outPort = outPort;
+ this.outPortSet = true;
+ return this;
+ }
+ @Override
+ public OFGroup getOutGroup() {
+ return outGroup;
+ }
+
+ @Override
+ public OFFlowStatsRequest.Builder setOutGroup(OFGroup outGroup) {
+ this.outGroup = outGroup;
+ this.outGroupSet = true;
+ return this;
+ }
+ @Override
+ public U64 getCookie() {
+ return cookie;
+ }
+
+ @Override
+ public OFFlowStatsRequest.Builder setCookie(U64 cookie) {
+ this.cookie = cookie;
+ this.cookieSet = true;
+ return this;
+ }
+ @Override
+ public U64 getCookieMask() {
+ return cookieMask;
+ }
+
+ @Override
+ public OFFlowStatsRequest.Builder setCookieMask(U64 cookieMask) {
+ this.cookieMask = cookieMask;
+ this.cookieMaskSet = true;
+ return this;
+ }
+ @Override
+ public Match getMatch() {
+ return match;
+ }
+
+ @Override
+ public OFFlowStatsRequest.Builder setMatch(Match match) {
+ this.match = match;
+ this.matchSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFFlowStatsRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ TableId tableId = this.tableIdSet ? this.tableId : DEFAULT_TABLE_ID;
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+ OFPort outPort = this.outPortSet ? this.outPort : DEFAULT_OUT_PORT;
+ if(outPort == null)
+ throw new NullPointerException("Property outPort must not be null");
+ OFGroup outGroup = this.outGroupSet ? this.outGroup : DEFAULT_OUT_GROUP;
+ if(outGroup == null)
+ throw new NullPointerException("Property outGroup must not be null");
+ U64 cookie = this.cookieSet ? this.cookie : DEFAULT_COOKIE;
+ if(cookie == null)
+ throw new NullPointerException("Property cookie must not be null");
+ U64 cookieMask = this.cookieMaskSet ? this.cookieMask : DEFAULT_COOKIE_MASK;
+ if(cookieMask == null)
+ throw new NullPointerException("Property cookieMask must not be null");
+ Match match = this.matchSet ? this.match : DEFAULT_MATCH;
+ if(match == null)
+ throw new NullPointerException("Property match must not be null");
+
+
+ return new OFFlowStatsRequestVer13(
+ xid,
+ flags,
+ tableId,
+ outPort,
+ outGroup,
+ cookie,
+ cookieMask,
+ match
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFFlowStatsRequest> {
+ @Override
+ public OFFlowStatsRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 18
+ byte type = bb.readByte();
+ if(type != (byte) 0x12)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REQUEST(18), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 1
+ short statsType = bb.readShort();
+ if(statsType != (short) 0x1)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.FLOW(1), got="+statsType);
+ Set<OFStatsRequestFlags> flags = OFStatsRequestFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ TableId tableId = TableId.readByte(bb);
+ // pad: 3 bytes
+ bb.skipBytes(3);
+ OFPort outPort = OFPort.read4Bytes(bb);
+ OFGroup outGroup = OFGroup.read4Bytes(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ U64 cookie = U64.ofRaw(bb.readLong());
+ U64 cookieMask = U64.ofRaw(bb.readLong());
+ Match match = ChannelUtilsVer13.readOFMatch(bb);
+
+ OFFlowStatsRequestVer13 flowStatsRequestVer13 = new OFFlowStatsRequestVer13(
+ xid,
+ flags,
+ tableId,
+ outPort,
+ outGroup,
+ cookie,
+ cookieMask,
+ match
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", flowStatsRequestVer13);
+ return flowStatsRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFFlowStatsRequestVer13Funnel FUNNEL = new OFFlowStatsRequestVer13Funnel();
+ static class OFFlowStatsRequestVer13Funnel implements Funnel<OFFlowStatsRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFFlowStatsRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 18
+ sink.putByte((byte) 0x12);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property statsType = 1
+ sink.putShort((short) 0x1);
+ OFStatsRequestFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ message.tableId.putTo(sink);
+ // skip pad (3 bytes)
+ message.outPort.putTo(sink);
+ message.outGroup.putTo(sink);
+ // skip pad (4 bytes)
+ message.cookie.putTo(sink);
+ message.cookieMask.putTo(sink);
+ message.match.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFFlowStatsRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFFlowStatsRequestVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 18
+ bb.writeByte((byte) 0x12);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 1
+ bb.writeShort((short) 0x1);
+ OFStatsRequestFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ message.tableId.writeByte(bb);
+ // pad: 3 bytes
+ bb.writeZero(3);
+ message.outPort.write4Bytes(bb);
+ message.outGroup.write4Bytes(bb);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ bb.writeLong(message.cookie.getValue());
+ bb.writeLong(message.cookieMask.getValue());
+ message.match.writeTo(bb);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFFlowStatsRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("tableId=").append(tableId);
+ b.append(", ");
+ b.append("outPort=").append(outPort);
+ b.append(", ");
+ b.append("outGroup=").append(outGroup);
+ b.append(", ");
+ b.append("cookie=").append(cookie);
+ b.append(", ");
+ b.append("cookieMask=").append(cookieMask);
+ b.append(", ");
+ b.append("match=").append(match);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFFlowStatsRequestVer13 other = (OFFlowStatsRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if (tableId == null) {
+ if (other.tableId != null)
+ return false;
+ } else if (!tableId.equals(other.tableId))
+ return false;
+ if (outPort == null) {
+ if (other.outPort != null)
+ return false;
+ } else if (!outPort.equals(other.outPort))
+ return false;
+ if (outGroup == null) {
+ if (other.outGroup != null)
+ return false;
+ } else if (!outGroup.equals(other.outGroup))
+ return false;
+ if (cookie == null) {
+ if (other.cookie != null)
+ return false;
+ } else if (!cookie.equals(other.cookie))
+ return false;
+ if (cookieMask == null) {
+ if (other.cookieMask != null)
+ return false;
+ } else if (!cookieMask.equals(other.cookieMask))
+ return false;
+ if (match == null) {
+ if (other.match != null)
+ return false;
+ } else if (!match.equals(other.match))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * result + ((tableId == null) ? 0 : tableId.hashCode());
+ result = prime * result + ((outPort == null) ? 0 : outPort.hashCode());
+ result = prime * result + ((outGroup == null) ? 0 : outGroup.hashCode());
+ result = prime * result + ((cookie == null) ? 0 : cookie.hashCode());
+ result = prime * result + ((cookieMask == null) ? 0 : cookieMask.hashCode());
+ result = prime * result + ((match == null) ? 0 : match.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGetConfigReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGetConfigReplyVer13.java
new file mode 100644
index 0000000..d24c00c
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGetConfigReplyVer13.java
@@ -0,0 +1,370 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFGetConfigReplyVer13 implements OFGetConfigReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFGetConfigReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 12;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFConfigFlags> DEFAULT_FLAGS = ImmutableSet.<OFConfigFlags>of();
+ private final static int DEFAULT_MISS_SEND_LEN = 0x0;
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFConfigFlags> flags;
+ private final int missSendLen;
+//
+ // Immutable default instance
+ final static OFGetConfigReplyVer13 DEFAULT = new OFGetConfigReplyVer13(
+ DEFAULT_XID, DEFAULT_FLAGS, DEFAULT_MISS_SEND_LEN
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFGetConfigReplyVer13(long xid, Set<OFConfigFlags> flags, int missSendLen) {
+ this.xid = xid;
+ this.flags = flags;
+ this.missSendLen = missSendLen;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.GET_CONFIG_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public Set<OFConfigFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public int getMissSendLen() {
+ return missSendLen;
+ }
+
+
+
+ public OFGetConfigReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFGetConfigReply.Builder {
+ final OFGetConfigReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFConfigFlags> flags;
+ private boolean missSendLenSet;
+ private int missSendLen;
+
+ BuilderWithParent(OFGetConfigReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.GET_CONFIG_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFGetConfigReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public Set<OFConfigFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFGetConfigReply.Builder setFlags(Set<OFConfigFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public int getMissSendLen() {
+ return missSendLen;
+ }
+
+ @Override
+ public OFGetConfigReply.Builder setMissSendLen(int missSendLen) {
+ this.missSendLen = missSendLen;
+ this.missSendLenSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFGetConfigReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFConfigFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ int missSendLen = this.missSendLenSet ? this.missSendLen : parentMessage.missSendLen;
+
+ //
+ return new OFGetConfigReplyVer13(
+ xid,
+ flags,
+ missSendLen
+ );
+ }
+
+ }
+
+ static class Builder implements OFGetConfigReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFConfigFlags> flags;
+ private boolean missSendLenSet;
+ private int missSendLen;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.GET_CONFIG_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFGetConfigReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public Set<OFConfigFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFGetConfigReply.Builder setFlags(Set<OFConfigFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public int getMissSendLen() {
+ return missSendLen;
+ }
+
+ @Override
+ public OFGetConfigReply.Builder setMissSendLen(int missSendLen) {
+ this.missSendLen = missSendLen;
+ this.missSendLenSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFGetConfigReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFConfigFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ int missSendLen = this.missSendLenSet ? this.missSendLen : DEFAULT_MISS_SEND_LEN;
+
+
+ return new OFGetConfigReplyVer13(
+ xid,
+ flags,
+ missSendLen
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFGetConfigReply> {
+ @Override
+ public OFGetConfigReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 8
+ byte type = bb.readByte();
+ if(type != (byte) 0x8)
+ throw new OFParseError("Wrong type: Expected=OFType.GET_CONFIG_REPLY(8), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 12)
+ throw new OFParseError("Wrong length: Expected=12(12), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ Set<OFConfigFlags> flags = OFConfigFlagsSerializerVer13.readFrom(bb);
+ int missSendLen = U16.f(bb.readShort());
+
+ OFGetConfigReplyVer13 getConfigReplyVer13 = new OFGetConfigReplyVer13(
+ xid,
+ flags,
+ missSendLen
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", getConfigReplyVer13);
+ return getConfigReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFGetConfigReplyVer13Funnel FUNNEL = new OFGetConfigReplyVer13Funnel();
+ static class OFGetConfigReplyVer13Funnel implements Funnel<OFGetConfigReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFGetConfigReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 8
+ sink.putByte((byte) 0x8);
+ // fixed value property length = 12
+ sink.putShort((short) 0xc);
+ sink.putLong(message.xid);
+ OFConfigFlagsSerializerVer13.putTo(message.flags, sink);
+ sink.putInt(message.missSendLen);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFGetConfigReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFGetConfigReplyVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 8
+ bb.writeByte((byte) 0x8);
+ // fixed value property length = 12
+ bb.writeShort((short) 0xc);
+ bb.writeInt(U32.t(message.xid));
+ OFConfigFlagsSerializerVer13.writeTo(bb, message.flags);
+ bb.writeShort(U16.t(message.missSendLen));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFGetConfigReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("missSendLen=").append(missSendLen);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFGetConfigReplyVer13 other = (OFGetConfigReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if( missSendLen != other.missSendLen)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * result + missSendLen;
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGetConfigRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGetConfigRequestVer13.java
new file mode 100644
index 0000000..d137df4
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGetConfigRequestVer13.java
@@ -0,0 +1,268 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFGetConfigRequestVer13 implements OFGetConfigRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFGetConfigRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static long DEFAULT_XID = 0x0L;
+
+ // OF message fields
+ private final long xid;
+//
+ // Immutable default instance
+ final static OFGetConfigRequestVer13 DEFAULT = new OFGetConfigRequestVer13(
+ DEFAULT_XID
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFGetConfigRequestVer13(long xid) {
+ this.xid = xid;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.GET_CONFIG_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+
+
+ public OFGetConfigRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFGetConfigRequest.Builder {
+ final OFGetConfigRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+
+ BuilderWithParent(OFGetConfigRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.GET_CONFIG_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFGetConfigRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFGetConfigRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+
+ //
+ return new OFGetConfigRequestVer13(
+ xid
+ );
+ }
+
+ }
+
+ static class Builder implements OFGetConfigRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.GET_CONFIG_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFGetConfigRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFGetConfigRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+
+
+ return new OFGetConfigRequestVer13(
+ xid
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFGetConfigRequest> {
+ @Override
+ public OFGetConfigRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 7
+ byte type = bb.readByte();
+ if(type != (byte) 0x7)
+ throw new OFParseError("Wrong type: Expected=OFType.GET_CONFIG_REQUEST(7), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 8)
+ throw new OFParseError("Wrong length: Expected=8(8), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+
+ OFGetConfigRequestVer13 getConfigRequestVer13 = new OFGetConfigRequestVer13(
+ xid
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", getConfigRequestVer13);
+ return getConfigRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFGetConfigRequestVer13Funnel FUNNEL = new OFGetConfigRequestVer13Funnel();
+ static class OFGetConfigRequestVer13Funnel implements Funnel<OFGetConfigRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFGetConfigRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 7
+ sink.putByte((byte) 0x7);
+ // fixed value property length = 8
+ sink.putShort((short) 0x8);
+ sink.putLong(message.xid);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFGetConfigRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFGetConfigRequestVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 7
+ bb.writeByte((byte) 0x7);
+ // fixed value property length = 8
+ bb.writeShort((short) 0x8);
+ bb.writeInt(U32.t(message.xid));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFGetConfigRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFGetConfigRequestVer13 other = (OFGetConfigRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupAddVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupAddVer13.java
new file mode 100644
index 0000000..0d4cab6
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupAddVer13.java
@@ -0,0 +1,461 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFGroupAddVer13 implements OFGroupAdd {
+ private static final Logger logger = LoggerFactory.getLogger(OFGroupAddVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 16;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static OFGroup DEFAULT_GROUP_ID = OFGroup.ALL;
+ private final static List<OFBucket> DEFAULT_BUCKETS = ImmutableList.<OFBucket>of();
+
+ // OF message fields
+ private final long xid;
+ private final OFGroupType groupType;
+ private final OFGroup group;
+ private final List<OFBucket> buckets;
+//
+
+ // package private constructor - used by readers, builders, and factory
+ OFGroupAddVer13(long xid, OFGroupType groupType, OFGroup group, List<OFBucket> buckets) {
+ this.xid = xid;
+ this.groupType = groupType;
+ this.group = group;
+ this.buckets = buckets;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.GROUP_MOD;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFGroupModCommand getCommand() {
+ return OFGroupModCommand.ADD;
+ }
+
+ @Override
+ public OFGroupType getGroupType() {
+ return groupType;
+ }
+
+ @Override
+ public OFGroup getGroup() {
+ return group;
+ }
+
+ @Override
+ public List<OFBucket> getBuckets() {
+ return buckets;
+ }
+
+
+
+ public OFGroupAdd.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFGroupAdd.Builder {
+ final OFGroupAddVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean groupTypeSet;
+ private OFGroupType groupType;
+ private boolean groupSet;
+ private OFGroup group;
+ private boolean bucketsSet;
+ private List<OFBucket> buckets;
+
+ BuilderWithParent(OFGroupAddVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.GROUP_MOD;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFGroupAdd.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFGroupModCommand getCommand() {
+ return OFGroupModCommand.ADD;
+ }
+
+ @Override
+ public OFGroupType getGroupType() {
+ return groupType;
+ }
+
+ @Override
+ public OFGroupAdd.Builder setGroupType(OFGroupType groupType) {
+ this.groupType = groupType;
+ this.groupTypeSet = true;
+ return this;
+ }
+ @Override
+ public OFGroup getGroup() {
+ return group;
+ }
+
+ @Override
+ public OFGroupAdd.Builder setGroup(OFGroup group) {
+ this.group = group;
+ this.groupSet = true;
+ return this;
+ }
+ @Override
+ public List<OFBucket> getBuckets() {
+ return buckets;
+ }
+
+ @Override
+ public OFGroupAdd.Builder setBuckets(List<OFBucket> buckets) {
+ this.buckets = buckets;
+ this.bucketsSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFGroupAdd build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ OFGroupType groupType = this.groupTypeSet ? this.groupType : parentMessage.groupType;
+ if(groupType == null)
+ throw new NullPointerException("Property groupType must not be null");
+ OFGroup group = this.groupSet ? this.group : parentMessage.group;
+ if(group == null)
+ throw new NullPointerException("Property group must not be null");
+ List<OFBucket> buckets = this.bucketsSet ? this.buckets : parentMessage.buckets;
+ if(buckets == null)
+ throw new NullPointerException("Property buckets must not be null");
+
+ //
+ return new OFGroupAddVer13(
+ xid,
+ groupType,
+ group,
+ buckets
+ );
+ }
+
+ }
+
+ static class Builder implements OFGroupAdd.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean groupTypeSet;
+ private OFGroupType groupType;
+ private boolean groupSet;
+ private OFGroup group;
+ private boolean bucketsSet;
+ private List<OFBucket> buckets;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.GROUP_MOD;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFGroupAdd.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFGroupModCommand getCommand() {
+ return OFGroupModCommand.ADD;
+ }
+
+ @Override
+ public OFGroupType getGroupType() {
+ return groupType;
+ }
+
+ @Override
+ public OFGroupAdd.Builder setGroupType(OFGroupType groupType) {
+ this.groupType = groupType;
+ this.groupTypeSet = true;
+ return this;
+ }
+ @Override
+ public OFGroup getGroup() {
+ return group;
+ }
+
+ @Override
+ public OFGroupAdd.Builder setGroup(OFGroup group) {
+ this.group = group;
+ this.groupSet = true;
+ return this;
+ }
+ @Override
+ public List<OFBucket> getBuckets() {
+ return buckets;
+ }
+
+ @Override
+ public OFGroupAdd.Builder setBuckets(List<OFBucket> buckets) {
+ this.buckets = buckets;
+ this.bucketsSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFGroupAdd build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ if(!this.groupTypeSet)
+ throw new IllegalStateException("Property groupType doesn't have default value -- must be set");
+ if(groupType == null)
+ throw new NullPointerException("Property groupType must not be null");
+ OFGroup group = this.groupSet ? this.group : DEFAULT_GROUP_ID;
+ if(group == null)
+ throw new NullPointerException("Property group must not be null");
+ List<OFBucket> buckets = this.bucketsSet ? this.buckets : DEFAULT_BUCKETS;
+ if(buckets == null)
+ throw new NullPointerException("Property buckets must not be null");
+
+
+ return new OFGroupAddVer13(
+ xid,
+ groupType,
+ group,
+ buckets
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFGroupAdd> {
+ @Override
+ public OFGroupAdd readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 15
+ byte type = bb.readByte();
+ if(type != (byte) 0xf)
+ throw new OFParseError("Wrong type: Expected=OFType.GROUP_MOD(15), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property command == 0
+ short command = bb.readShort();
+ if(command != (short) 0x0)
+ throw new OFParseError("Wrong command: Expected=OFGroupModCommand.ADD(0), got="+command);
+ OFGroupType groupType = OFGroupTypeSerializerVer13.readFrom(bb);
+ // pad: 1 bytes
+ bb.skipBytes(1);
+ OFGroup group = OFGroup.read4Bytes(bb);
+ List<OFBucket> buckets = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFBucketVer13.READER);
+
+ OFGroupAddVer13 groupAddVer13 = new OFGroupAddVer13(
+ xid,
+ groupType,
+ group,
+ buckets
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", groupAddVer13);
+ return groupAddVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFGroupAddVer13Funnel FUNNEL = new OFGroupAddVer13Funnel();
+ static class OFGroupAddVer13Funnel implements Funnel<OFGroupAddVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFGroupAddVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 15
+ sink.putByte((byte) 0xf);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property command = 0
+ sink.putShort((short) 0x0);
+ OFGroupTypeSerializerVer13.putTo(message.groupType, sink);
+ // skip pad (1 bytes)
+ message.group.putTo(sink);
+ FunnelUtils.putList(message.buckets, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFGroupAddVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFGroupAddVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 15
+ bb.writeByte((byte) 0xf);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property command = 0
+ bb.writeShort((short) 0x0);
+ OFGroupTypeSerializerVer13.writeTo(bb, message.groupType);
+ // pad: 1 bytes
+ bb.writeZero(1);
+ message.group.write4Bytes(bb);
+ ChannelUtils.writeList(bb, message.buckets);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFGroupAddVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("groupType=").append(groupType);
+ b.append(", ");
+ b.append("group=").append(group);
+ b.append(", ");
+ b.append("buckets=").append(buckets);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFGroupAddVer13 other = (OFGroupAddVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (groupType == null) {
+ if (other.groupType != null)
+ return false;
+ } else if (!groupType.equals(other.groupType))
+ return false;
+ if (group == null) {
+ if (other.group != null)
+ return false;
+ } else if (!group.equals(other.group))
+ return false;
+ if (buckets == null) {
+ if (other.buckets != null)
+ return false;
+ } else if (!buckets.equals(other.buckets))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((groupType == null) ? 0 : groupType.hashCode());
+ result = prime * result + ((group == null) ? 0 : group.hashCode());
+ result = prime * result + ((buckets == null) ? 0 : buckets.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupCapabilitiesSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupCapabilitiesSerializerVer13.java
new file mode 100644
index 0000000..c8622f5
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupCapabilitiesSerializerVer13.java
@@ -0,0 +1,96 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_set_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFGroupCapabilities;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import java.util.EnumSet;
+import java.util.Collections;
+
+
+public class OFGroupCapabilitiesSerializerVer13 {
+
+ public final static int SELECT_WEIGHT_VAL = 0x1;
+ public final static int SELECT_LIVENESS_VAL = 0x2;
+ public final static int CHAINING_VAL = 0x4;
+ public final static int CHAINING_CHECKS_VAL = 0x8;
+
+ public static Set<OFGroupCapabilities> readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readInt());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, Set<OFGroupCapabilities> set) {
+ bb.writeInt(toWireValue(set));
+ }
+
+ public static void putTo(Set<OFGroupCapabilities> set, PrimitiveSink sink) {
+ sink.putInt(toWireValue(set));
+ }
+
+
+ public static Set<OFGroupCapabilities> ofWireValue(int val) {
+ EnumSet<OFGroupCapabilities> set = EnumSet.noneOf(OFGroupCapabilities.class);
+
+ if((val & SELECT_WEIGHT_VAL) != 0)
+ set.add(OFGroupCapabilities.SELECT_WEIGHT);
+ if((val & SELECT_LIVENESS_VAL) != 0)
+ set.add(OFGroupCapabilities.SELECT_LIVENESS);
+ if((val & CHAINING_VAL) != 0)
+ set.add(OFGroupCapabilities.CHAINING);
+ if((val & CHAINING_CHECKS_VAL) != 0)
+ set.add(OFGroupCapabilities.CHAINING_CHECKS);
+ return Collections.unmodifiableSet(set);
+ }
+
+ public static int toWireValue(Set<OFGroupCapabilities> set) {
+ int wireValue = 0;
+
+ for(OFGroupCapabilities e: set) {
+ switch(e) {
+ case SELECT_WEIGHT:
+ wireValue |= SELECT_WEIGHT_VAL;
+ break;
+ case SELECT_LIVENESS:
+ wireValue |= SELECT_LIVENESS_VAL;
+ break;
+ case CHAINING:
+ wireValue |= CHAINING_VAL;
+ break;
+ case CHAINING_CHECKS:
+ wireValue |= CHAINING_CHECKS_VAL;
+ break;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFGroupCapabilities in version 1.3: " + e);
+ }
+ }
+ return wireValue;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupDeleteVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupDeleteVer13.java
new file mode 100644
index 0000000..c9b62bc
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupDeleteVer13.java
@@ -0,0 +1,461 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFGroupDeleteVer13 implements OFGroupDelete {
+ private static final Logger logger = LoggerFactory.getLogger(OFGroupDeleteVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 16;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static OFGroup DEFAULT_GROUP_ID = OFGroup.ALL;
+ private final static List<OFBucket> DEFAULT_BUCKETS = ImmutableList.<OFBucket>of();
+
+ // OF message fields
+ private final long xid;
+ private final OFGroupType groupType;
+ private final OFGroup group;
+ private final List<OFBucket> buckets;
+//
+
+ // package private constructor - used by readers, builders, and factory
+ OFGroupDeleteVer13(long xid, OFGroupType groupType, OFGroup group, List<OFBucket> buckets) {
+ this.xid = xid;
+ this.groupType = groupType;
+ this.group = group;
+ this.buckets = buckets;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.GROUP_MOD;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFGroupModCommand getCommand() {
+ return OFGroupModCommand.DELETE;
+ }
+
+ @Override
+ public OFGroupType getGroupType() {
+ return groupType;
+ }
+
+ @Override
+ public OFGroup getGroup() {
+ return group;
+ }
+
+ @Override
+ public List<OFBucket> getBuckets() {
+ return buckets;
+ }
+
+
+
+ public OFGroupDelete.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFGroupDelete.Builder {
+ final OFGroupDeleteVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean groupTypeSet;
+ private OFGroupType groupType;
+ private boolean groupSet;
+ private OFGroup group;
+ private boolean bucketsSet;
+ private List<OFBucket> buckets;
+
+ BuilderWithParent(OFGroupDeleteVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.GROUP_MOD;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFGroupDelete.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFGroupModCommand getCommand() {
+ return OFGroupModCommand.DELETE;
+ }
+
+ @Override
+ public OFGroupType getGroupType() {
+ return groupType;
+ }
+
+ @Override
+ public OFGroupDelete.Builder setGroupType(OFGroupType groupType) {
+ this.groupType = groupType;
+ this.groupTypeSet = true;
+ return this;
+ }
+ @Override
+ public OFGroup getGroup() {
+ return group;
+ }
+
+ @Override
+ public OFGroupDelete.Builder setGroup(OFGroup group) {
+ this.group = group;
+ this.groupSet = true;
+ return this;
+ }
+ @Override
+ public List<OFBucket> getBuckets() {
+ return buckets;
+ }
+
+ @Override
+ public OFGroupDelete.Builder setBuckets(List<OFBucket> buckets) {
+ this.buckets = buckets;
+ this.bucketsSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFGroupDelete build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ OFGroupType groupType = this.groupTypeSet ? this.groupType : parentMessage.groupType;
+ if(groupType == null)
+ throw new NullPointerException("Property groupType must not be null");
+ OFGroup group = this.groupSet ? this.group : parentMessage.group;
+ if(group == null)
+ throw new NullPointerException("Property group must not be null");
+ List<OFBucket> buckets = this.bucketsSet ? this.buckets : parentMessage.buckets;
+ if(buckets == null)
+ throw new NullPointerException("Property buckets must not be null");
+
+ //
+ return new OFGroupDeleteVer13(
+ xid,
+ groupType,
+ group,
+ buckets
+ );
+ }
+
+ }
+
+ static class Builder implements OFGroupDelete.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean groupTypeSet;
+ private OFGroupType groupType;
+ private boolean groupSet;
+ private OFGroup group;
+ private boolean bucketsSet;
+ private List<OFBucket> buckets;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.GROUP_MOD;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFGroupDelete.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFGroupModCommand getCommand() {
+ return OFGroupModCommand.DELETE;
+ }
+
+ @Override
+ public OFGroupType getGroupType() {
+ return groupType;
+ }
+
+ @Override
+ public OFGroupDelete.Builder setGroupType(OFGroupType groupType) {
+ this.groupType = groupType;
+ this.groupTypeSet = true;
+ return this;
+ }
+ @Override
+ public OFGroup getGroup() {
+ return group;
+ }
+
+ @Override
+ public OFGroupDelete.Builder setGroup(OFGroup group) {
+ this.group = group;
+ this.groupSet = true;
+ return this;
+ }
+ @Override
+ public List<OFBucket> getBuckets() {
+ return buckets;
+ }
+
+ @Override
+ public OFGroupDelete.Builder setBuckets(List<OFBucket> buckets) {
+ this.buckets = buckets;
+ this.bucketsSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFGroupDelete build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ if(!this.groupTypeSet)
+ throw new IllegalStateException("Property groupType doesn't have default value -- must be set");
+ if(groupType == null)
+ throw new NullPointerException("Property groupType must not be null");
+ OFGroup group = this.groupSet ? this.group : DEFAULT_GROUP_ID;
+ if(group == null)
+ throw new NullPointerException("Property group must not be null");
+ List<OFBucket> buckets = this.bucketsSet ? this.buckets : DEFAULT_BUCKETS;
+ if(buckets == null)
+ throw new NullPointerException("Property buckets must not be null");
+
+
+ return new OFGroupDeleteVer13(
+ xid,
+ groupType,
+ group,
+ buckets
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFGroupDelete> {
+ @Override
+ public OFGroupDelete readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 15
+ byte type = bb.readByte();
+ if(type != (byte) 0xf)
+ throw new OFParseError("Wrong type: Expected=OFType.GROUP_MOD(15), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property command == 2
+ short command = bb.readShort();
+ if(command != (short) 0x2)
+ throw new OFParseError("Wrong command: Expected=OFGroupModCommand.DELETE(2), got="+command);
+ OFGroupType groupType = OFGroupTypeSerializerVer13.readFrom(bb);
+ // pad: 1 bytes
+ bb.skipBytes(1);
+ OFGroup group = OFGroup.read4Bytes(bb);
+ List<OFBucket> buckets = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFBucketVer13.READER);
+
+ OFGroupDeleteVer13 groupDeleteVer13 = new OFGroupDeleteVer13(
+ xid,
+ groupType,
+ group,
+ buckets
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", groupDeleteVer13);
+ return groupDeleteVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFGroupDeleteVer13Funnel FUNNEL = new OFGroupDeleteVer13Funnel();
+ static class OFGroupDeleteVer13Funnel implements Funnel<OFGroupDeleteVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFGroupDeleteVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 15
+ sink.putByte((byte) 0xf);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property command = 2
+ sink.putShort((short) 0x2);
+ OFGroupTypeSerializerVer13.putTo(message.groupType, sink);
+ // skip pad (1 bytes)
+ message.group.putTo(sink);
+ FunnelUtils.putList(message.buckets, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFGroupDeleteVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFGroupDeleteVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 15
+ bb.writeByte((byte) 0xf);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property command = 2
+ bb.writeShort((short) 0x2);
+ OFGroupTypeSerializerVer13.writeTo(bb, message.groupType);
+ // pad: 1 bytes
+ bb.writeZero(1);
+ message.group.write4Bytes(bb);
+ ChannelUtils.writeList(bb, message.buckets);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFGroupDeleteVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("groupType=").append(groupType);
+ b.append(", ");
+ b.append("group=").append(group);
+ b.append(", ");
+ b.append("buckets=").append(buckets);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFGroupDeleteVer13 other = (OFGroupDeleteVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (groupType == null) {
+ if (other.groupType != null)
+ return false;
+ } else if (!groupType.equals(other.groupType))
+ return false;
+ if (group == null) {
+ if (other.group != null)
+ return false;
+ } else if (!group.equals(other.group))
+ return false;
+ if (buckets == null) {
+ if (other.buckets != null)
+ return false;
+ } else if (!buckets.equals(other.buckets))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((groupType == null) ? 0 : groupType.hashCode());
+ result = prime * result + ((group == null) ? 0 : group.hashCode());
+ result = prime * result + ((buckets == null) ? 0 : buckets.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupDescStatsEntryVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupDescStatsEntryVer13.java
new file mode 100644
index 0000000..1a8de91
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupDescStatsEntryVer13.java
@@ -0,0 +1,360 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFGroupDescStatsEntryVer13 implements OFGroupDescStatsEntry {
+ private static final Logger logger = LoggerFactory.getLogger(OFGroupDescStatsEntryVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 8;
+
+ private final static OFGroup DEFAULT_GROUP_ID = OFGroup.ALL;
+ private final static List<OFBucket> DEFAULT_BUCKETS = ImmutableList.<OFBucket>of();
+
+ // OF message fields
+ private final OFGroupType groupType;
+ private final OFGroup group;
+ private final List<OFBucket> buckets;
+//
+
+ // package private constructor - used by readers, builders, and factory
+ OFGroupDescStatsEntryVer13(OFGroupType groupType, OFGroup group, List<OFBucket> buckets) {
+ this.groupType = groupType;
+ this.group = group;
+ this.buckets = buckets;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFGroupType getGroupType() {
+ return groupType;
+ }
+
+ @Override
+ public OFGroup getGroup() {
+ return group;
+ }
+
+ @Override
+ public List<OFBucket> getBuckets() {
+ return buckets;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFGroupDescStatsEntry.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFGroupDescStatsEntry.Builder {
+ final OFGroupDescStatsEntryVer13 parentMessage;
+
+ // OF message fields
+ private boolean groupTypeSet;
+ private OFGroupType groupType;
+ private boolean groupSet;
+ private OFGroup group;
+ private boolean bucketsSet;
+ private List<OFBucket> buckets;
+
+ BuilderWithParent(OFGroupDescStatsEntryVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFGroupType getGroupType() {
+ return groupType;
+ }
+
+ @Override
+ public OFGroupDescStatsEntry.Builder setGroupType(OFGroupType groupType) {
+ this.groupType = groupType;
+ this.groupTypeSet = true;
+ return this;
+ }
+ @Override
+ public OFGroup getGroup() {
+ return group;
+ }
+
+ @Override
+ public OFGroupDescStatsEntry.Builder setGroup(OFGroup group) {
+ this.group = group;
+ this.groupSet = true;
+ return this;
+ }
+ @Override
+ public List<OFBucket> getBuckets() {
+ return buckets;
+ }
+
+ @Override
+ public OFGroupDescStatsEntry.Builder setBuckets(List<OFBucket> buckets) {
+ this.buckets = buckets;
+ this.bucketsSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFGroupDescStatsEntry build() {
+ OFGroupType groupType = this.groupTypeSet ? this.groupType : parentMessage.groupType;
+ if(groupType == null)
+ throw new NullPointerException("Property groupType must not be null");
+ OFGroup group = this.groupSet ? this.group : parentMessage.group;
+ if(group == null)
+ throw new NullPointerException("Property group must not be null");
+ List<OFBucket> buckets = this.bucketsSet ? this.buckets : parentMessage.buckets;
+ if(buckets == null)
+ throw new NullPointerException("Property buckets must not be null");
+
+ //
+ return new OFGroupDescStatsEntryVer13(
+ groupType,
+ group,
+ buckets
+ );
+ }
+
+ }
+
+ static class Builder implements OFGroupDescStatsEntry.Builder {
+ // OF message fields
+ private boolean groupTypeSet;
+ private OFGroupType groupType;
+ private boolean groupSet;
+ private OFGroup group;
+ private boolean bucketsSet;
+ private List<OFBucket> buckets;
+
+ @Override
+ public OFGroupType getGroupType() {
+ return groupType;
+ }
+
+ @Override
+ public OFGroupDescStatsEntry.Builder setGroupType(OFGroupType groupType) {
+ this.groupType = groupType;
+ this.groupTypeSet = true;
+ return this;
+ }
+ @Override
+ public OFGroup getGroup() {
+ return group;
+ }
+
+ @Override
+ public OFGroupDescStatsEntry.Builder setGroup(OFGroup group) {
+ this.group = group;
+ this.groupSet = true;
+ return this;
+ }
+ @Override
+ public List<OFBucket> getBuckets() {
+ return buckets;
+ }
+
+ @Override
+ public OFGroupDescStatsEntry.Builder setBuckets(List<OFBucket> buckets) {
+ this.buckets = buckets;
+ this.bucketsSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFGroupDescStatsEntry build() {
+ if(!this.groupTypeSet)
+ throw new IllegalStateException("Property groupType doesn't have default value -- must be set");
+ if(groupType == null)
+ throw new NullPointerException("Property groupType must not be null");
+ OFGroup group = this.groupSet ? this.group : DEFAULT_GROUP_ID;
+ if(group == null)
+ throw new NullPointerException("Property group must not be null");
+ List<OFBucket> buckets = this.bucketsSet ? this.buckets : DEFAULT_BUCKETS;
+ if(buckets == null)
+ throw new NullPointerException("Property buckets must not be null");
+
+
+ return new OFGroupDescStatsEntryVer13(
+ groupType,
+ group,
+ buckets
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFGroupDescStatsEntry> {
+ @Override
+ public OFGroupDescStatsEntry readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ OFGroupType groupType = OFGroupTypeSerializerVer13.readFrom(bb);
+ // pad: 1 bytes
+ bb.skipBytes(1);
+ OFGroup group = OFGroup.read4Bytes(bb);
+ List<OFBucket> buckets = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFBucketVer13.READER);
+
+ OFGroupDescStatsEntryVer13 groupDescStatsEntryVer13 = new OFGroupDescStatsEntryVer13(
+ groupType,
+ group,
+ buckets
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", groupDescStatsEntryVer13);
+ return groupDescStatsEntryVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFGroupDescStatsEntryVer13Funnel FUNNEL = new OFGroupDescStatsEntryVer13Funnel();
+ static class OFGroupDescStatsEntryVer13Funnel implements Funnel<OFGroupDescStatsEntryVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFGroupDescStatsEntryVer13 message, PrimitiveSink sink) {
+ // FIXME: skip funnel of length
+ OFGroupTypeSerializerVer13.putTo(message.groupType, sink);
+ // skip pad (1 bytes)
+ message.group.putTo(sink);
+ FunnelUtils.putList(message.buckets, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFGroupDescStatsEntryVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFGroupDescStatsEntryVer13 message) {
+ int startIndex = bb.writerIndex();
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ OFGroupTypeSerializerVer13.writeTo(bb, message.groupType);
+ // pad: 1 bytes
+ bb.writeZero(1);
+ message.group.write4Bytes(bb);
+ ChannelUtils.writeList(bb, message.buckets);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFGroupDescStatsEntryVer13(");
+ b.append("groupType=").append(groupType);
+ b.append(", ");
+ b.append("group=").append(group);
+ b.append(", ");
+ b.append("buckets=").append(buckets);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFGroupDescStatsEntryVer13 other = (OFGroupDescStatsEntryVer13) obj;
+
+ if (groupType == null) {
+ if (other.groupType != null)
+ return false;
+ } else if (!groupType.equals(other.groupType))
+ return false;
+ if (group == null) {
+ if (other.group != null)
+ return false;
+ } else if (!group.equals(other.group))
+ return false;
+ if (buckets == null) {
+ if (other.buckets != null)
+ return false;
+ } else if (!buckets.equals(other.buckets))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((groupType == null) ? 0 : groupType.hashCode());
+ result = prime * result + ((group == null) ? 0 : group.hashCode());
+ result = prime * result + ((buckets == null) ? 0 : buckets.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupDescStatsReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupDescStatsReplyVer13.java
new file mode 100644
index 0000000..9faeb31
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupDescStatsReplyVer13.java
@@ -0,0 +1,412 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFGroupDescStatsReplyVer13 implements OFGroupDescStatsReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFGroupDescStatsReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 16;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsReplyFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsReplyFlags>of();
+ private final static List<OFGroupDescStatsEntry> DEFAULT_ENTRIES = ImmutableList.<OFGroupDescStatsEntry>of();
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsReplyFlags> flags;
+ private final List<OFGroupDescStatsEntry> entries;
+//
+ // Immutable default instance
+ final static OFGroupDescStatsReplyVer13 DEFAULT = new OFGroupDescStatsReplyVer13(
+ DEFAULT_XID, DEFAULT_FLAGS, DEFAULT_ENTRIES
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFGroupDescStatsReplyVer13(long xid, Set<OFStatsReplyFlags> flags, List<OFGroupDescStatsEntry> entries) {
+ this.xid = xid;
+ this.flags = flags;
+ this.entries = entries;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.GROUP_DESC;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public List<OFGroupDescStatsEntry> getEntries() {
+ return entries;
+ }
+
+
+
+ public OFGroupDescStatsReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFGroupDescStatsReply.Builder {
+ final OFGroupDescStatsReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean entriesSet;
+ private List<OFGroupDescStatsEntry> entries;
+
+ BuilderWithParent(OFGroupDescStatsReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFGroupDescStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.GROUP_DESC;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFGroupDescStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public List<OFGroupDescStatsEntry> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFGroupDescStatsReply.Builder setEntries(List<OFGroupDescStatsEntry> entries) {
+ this.entries = entries;
+ this.entriesSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFGroupDescStatsReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ List<OFGroupDescStatsEntry> entries = this.entriesSet ? this.entries : parentMessage.entries;
+ if(entries == null)
+ throw new NullPointerException("Property entries must not be null");
+
+ //
+ return new OFGroupDescStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ }
+
+ }
+
+ static class Builder implements OFGroupDescStatsReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean entriesSet;
+ private List<OFGroupDescStatsEntry> entries;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFGroupDescStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.GROUP_DESC;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFGroupDescStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public List<OFGroupDescStatsEntry> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFGroupDescStatsReply.Builder setEntries(List<OFGroupDescStatsEntry> entries) {
+ this.entries = entries;
+ this.entriesSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFGroupDescStatsReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ List<OFGroupDescStatsEntry> entries = this.entriesSet ? this.entries : DEFAULT_ENTRIES;
+ if(entries == null)
+ throw new NullPointerException("Property entries must not be null");
+
+
+ return new OFGroupDescStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFGroupDescStatsReply> {
+ @Override
+ public OFGroupDescStatsReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 19
+ byte type = bb.readByte();
+ if(type != (byte) 0x13)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REPLY(19), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 7
+ short statsType = bb.readShort();
+ if(statsType != (short) 0x7)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.GROUP_DESC(7), got="+statsType);
+ Set<OFStatsReplyFlags> flags = OFStatsReplyFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ List<OFGroupDescStatsEntry> entries = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFGroupDescStatsEntryVer13.READER);
+
+ OFGroupDescStatsReplyVer13 groupDescStatsReplyVer13 = new OFGroupDescStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", groupDescStatsReplyVer13);
+ return groupDescStatsReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFGroupDescStatsReplyVer13Funnel FUNNEL = new OFGroupDescStatsReplyVer13Funnel();
+ static class OFGroupDescStatsReplyVer13Funnel implements Funnel<OFGroupDescStatsReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFGroupDescStatsReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 19
+ sink.putByte((byte) 0x13);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property statsType = 7
+ sink.putShort((short) 0x7);
+ OFStatsReplyFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ FunnelUtils.putList(message.entries, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFGroupDescStatsReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFGroupDescStatsReplyVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 19
+ bb.writeByte((byte) 0x13);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 7
+ bb.writeShort((short) 0x7);
+ OFStatsReplyFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ ChannelUtils.writeList(bb, message.entries);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFGroupDescStatsReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("entries=").append(entries);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFGroupDescStatsReplyVer13 other = (OFGroupDescStatsReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if (entries == null) {
+ if (other.entries != null)
+ return false;
+ } else if (!entries.equals(other.entries))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * result + ((entries == null) ? 0 : entries.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupDescStatsRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupDescStatsRequestVer13.java
new file mode 100644
index 0000000..9feb06d
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupDescStatsRequestVer13.java
@@ -0,0 +1,351 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFGroupDescStatsRequestVer13 implements OFGroupDescStatsRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFGroupDescStatsRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 16;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsRequestFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsRequestFlags>of();
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsRequestFlags> flags;
+//
+ // Immutable default instance
+ final static OFGroupDescStatsRequestVer13 DEFAULT = new OFGroupDescStatsRequestVer13(
+ DEFAULT_XID, DEFAULT_FLAGS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFGroupDescStatsRequestVer13(long xid, Set<OFStatsRequestFlags> flags) {
+ this.xid = xid;
+ this.flags = flags;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.GROUP_DESC;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+
+
+ public OFGroupDescStatsRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFGroupDescStatsRequest.Builder {
+ final OFGroupDescStatsRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+
+ BuilderWithParent(OFGroupDescStatsRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFGroupDescStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.GROUP_DESC;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFGroupDescStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFGroupDescStatsRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+
+ //
+ return new OFGroupDescStatsRequestVer13(
+ xid,
+ flags
+ );
+ }
+
+ }
+
+ static class Builder implements OFGroupDescStatsRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFGroupDescStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.GROUP_DESC;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFGroupDescStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFGroupDescStatsRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+
+
+ return new OFGroupDescStatsRequestVer13(
+ xid,
+ flags
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFGroupDescStatsRequest> {
+ @Override
+ public OFGroupDescStatsRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 18
+ byte type = bb.readByte();
+ if(type != (byte) 0x12)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REQUEST(18), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 16)
+ throw new OFParseError("Wrong length: Expected=16(16), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 7
+ short statsType = bb.readShort();
+ if(statsType != (short) 0x7)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.GROUP_DESC(7), got="+statsType);
+ Set<OFStatsRequestFlags> flags = OFStatsRequestFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+
+ OFGroupDescStatsRequestVer13 groupDescStatsRequestVer13 = new OFGroupDescStatsRequestVer13(
+ xid,
+ flags
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", groupDescStatsRequestVer13);
+ return groupDescStatsRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFGroupDescStatsRequestVer13Funnel FUNNEL = new OFGroupDescStatsRequestVer13Funnel();
+ static class OFGroupDescStatsRequestVer13Funnel implements Funnel<OFGroupDescStatsRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFGroupDescStatsRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 18
+ sink.putByte((byte) 0x12);
+ // fixed value property length = 16
+ sink.putShort((short) 0x10);
+ sink.putLong(message.xid);
+ // fixed value property statsType = 7
+ sink.putShort((short) 0x7);
+ OFStatsRequestFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFGroupDescStatsRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFGroupDescStatsRequestVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 18
+ bb.writeByte((byte) 0x12);
+ // fixed value property length = 16
+ bb.writeShort((short) 0x10);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 7
+ bb.writeShort((short) 0x7);
+ OFStatsRequestFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFGroupDescStatsRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFGroupDescStatsRequestVer13 other = (OFGroupDescStatsRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupFeaturesStatsReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupFeaturesStatsReplyVer13.java
new file mode 100644
index 0000000..0621a58
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupFeaturesStatsReplyVer13.java
@@ -0,0 +1,821 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFGroupFeaturesStatsReplyVer13 implements OFGroupFeaturesStatsReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFGroupFeaturesStatsReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 56;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsReplyFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsReplyFlags>of();
+ private final static long DEFAULT_TYPES = 0x0L;
+ private final static long DEFAULT_CAPABILITIES = 0x0L;
+ private final static long DEFAULT_MAX_GROUPS_ALL = 0x0L;
+ private final static long DEFAULT_MAX_GROUPS_SELECT = 0x0L;
+ private final static long DEFAULT_MAX_GROUPS_INDIRECT = 0x0L;
+ private final static long DEFAULT_MAX_GROUPS_FF = 0x0L;
+ private final static long DEFAULT_ACTIONS_ALL = 0x0L;
+ private final static long DEFAULT_ACTIONS_SELECT = 0x0L;
+ private final static long DEFAULT_ACTIONS_INDIRECT = 0x0L;
+ private final static long DEFAULT_ACTIONS_FF = 0x0L;
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsReplyFlags> flags;
+ private final long types;
+ private final long capabilities;
+ private final long maxGroupsAll;
+ private final long maxGroupsSelect;
+ private final long maxGroupsIndirect;
+ private final long maxGroupsFf;
+ private final long actionsAll;
+ private final long actionsSelect;
+ private final long actionsIndirect;
+ private final long actionsFf;
+//
+ // Immutable default instance
+ final static OFGroupFeaturesStatsReplyVer13 DEFAULT = new OFGroupFeaturesStatsReplyVer13(
+ DEFAULT_XID, DEFAULT_FLAGS, DEFAULT_TYPES, DEFAULT_CAPABILITIES, DEFAULT_MAX_GROUPS_ALL, DEFAULT_MAX_GROUPS_SELECT, DEFAULT_MAX_GROUPS_INDIRECT, DEFAULT_MAX_GROUPS_FF, DEFAULT_ACTIONS_ALL, DEFAULT_ACTIONS_SELECT, DEFAULT_ACTIONS_INDIRECT, DEFAULT_ACTIONS_FF
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFGroupFeaturesStatsReplyVer13(long xid, Set<OFStatsReplyFlags> flags, long types, long capabilities, long maxGroupsAll, long maxGroupsSelect, long maxGroupsIndirect, long maxGroupsFf, long actionsAll, long actionsSelect, long actionsIndirect, long actionsFf) {
+ this.xid = xid;
+ this.flags = flags;
+ this.types = types;
+ this.capabilities = capabilities;
+ this.maxGroupsAll = maxGroupsAll;
+ this.maxGroupsSelect = maxGroupsSelect;
+ this.maxGroupsIndirect = maxGroupsIndirect;
+ this.maxGroupsFf = maxGroupsFf;
+ this.actionsAll = actionsAll;
+ this.actionsSelect = actionsSelect;
+ this.actionsIndirect = actionsIndirect;
+ this.actionsFf = actionsFf;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.GROUP_FEATURES;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public long getTypes() {
+ return types;
+ }
+
+ @Override
+ public long getCapabilities() {
+ return capabilities;
+ }
+
+ @Override
+ public long getMaxGroupsAll() {
+ return maxGroupsAll;
+ }
+
+ @Override
+ public long getMaxGroupsSelect() {
+ return maxGroupsSelect;
+ }
+
+ @Override
+ public long getMaxGroupsIndirect() {
+ return maxGroupsIndirect;
+ }
+
+ @Override
+ public long getMaxGroupsFf() {
+ return maxGroupsFf;
+ }
+
+ @Override
+ public long getActionsAll() {
+ return actionsAll;
+ }
+
+ @Override
+ public long getActionsSelect() {
+ return actionsSelect;
+ }
+
+ @Override
+ public long getActionsIndirect() {
+ return actionsIndirect;
+ }
+
+ @Override
+ public long getActionsFf() {
+ return actionsFf;
+ }
+
+
+
+ public OFGroupFeaturesStatsReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFGroupFeaturesStatsReply.Builder {
+ final OFGroupFeaturesStatsReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean typesSet;
+ private long types;
+ private boolean capabilitiesSet;
+ private long capabilities;
+ private boolean maxGroupsAllSet;
+ private long maxGroupsAll;
+ private boolean maxGroupsSelectSet;
+ private long maxGroupsSelect;
+ private boolean maxGroupsIndirectSet;
+ private long maxGroupsIndirect;
+ private boolean maxGroupsFfSet;
+ private long maxGroupsFf;
+ private boolean actionsAllSet;
+ private long actionsAll;
+ private boolean actionsSelectSet;
+ private long actionsSelect;
+ private boolean actionsIndirectSet;
+ private long actionsIndirect;
+ private boolean actionsFfSet;
+ private long actionsFf;
+
+ BuilderWithParent(OFGroupFeaturesStatsReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFGroupFeaturesStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.GROUP_FEATURES;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFGroupFeaturesStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getTypes() {
+ return types;
+ }
+
+ @Override
+ public OFGroupFeaturesStatsReply.Builder setTypes(long types) {
+ this.types = types;
+ this.typesSet = true;
+ return this;
+ }
+ @Override
+ public long getCapabilities() {
+ return capabilities;
+ }
+
+ @Override
+ public OFGroupFeaturesStatsReply.Builder setCapabilities(long capabilities) {
+ this.capabilities = capabilities;
+ this.capabilitiesSet = true;
+ return this;
+ }
+ @Override
+ public long getMaxGroupsAll() {
+ return maxGroupsAll;
+ }
+
+ @Override
+ public OFGroupFeaturesStatsReply.Builder setMaxGroupsAll(long maxGroupsAll) {
+ this.maxGroupsAll = maxGroupsAll;
+ this.maxGroupsAllSet = true;
+ return this;
+ }
+ @Override
+ public long getMaxGroupsSelect() {
+ return maxGroupsSelect;
+ }
+
+ @Override
+ public OFGroupFeaturesStatsReply.Builder setMaxGroupsSelect(long maxGroupsSelect) {
+ this.maxGroupsSelect = maxGroupsSelect;
+ this.maxGroupsSelectSet = true;
+ return this;
+ }
+ @Override
+ public long getMaxGroupsIndirect() {
+ return maxGroupsIndirect;
+ }
+
+ @Override
+ public OFGroupFeaturesStatsReply.Builder setMaxGroupsIndirect(long maxGroupsIndirect) {
+ this.maxGroupsIndirect = maxGroupsIndirect;
+ this.maxGroupsIndirectSet = true;
+ return this;
+ }
+ @Override
+ public long getMaxGroupsFf() {
+ return maxGroupsFf;
+ }
+
+ @Override
+ public OFGroupFeaturesStatsReply.Builder setMaxGroupsFf(long maxGroupsFf) {
+ this.maxGroupsFf = maxGroupsFf;
+ this.maxGroupsFfSet = true;
+ return this;
+ }
+ @Override
+ public long getActionsAll() {
+ return actionsAll;
+ }
+
+ @Override
+ public OFGroupFeaturesStatsReply.Builder setActionsAll(long actionsAll) {
+ this.actionsAll = actionsAll;
+ this.actionsAllSet = true;
+ return this;
+ }
+ @Override
+ public long getActionsSelect() {
+ return actionsSelect;
+ }
+
+ @Override
+ public OFGroupFeaturesStatsReply.Builder setActionsSelect(long actionsSelect) {
+ this.actionsSelect = actionsSelect;
+ this.actionsSelectSet = true;
+ return this;
+ }
+ @Override
+ public long getActionsIndirect() {
+ return actionsIndirect;
+ }
+
+ @Override
+ public OFGroupFeaturesStatsReply.Builder setActionsIndirect(long actionsIndirect) {
+ this.actionsIndirect = actionsIndirect;
+ this.actionsIndirectSet = true;
+ return this;
+ }
+ @Override
+ public long getActionsFf() {
+ return actionsFf;
+ }
+
+ @Override
+ public OFGroupFeaturesStatsReply.Builder setActionsFf(long actionsFf) {
+ this.actionsFf = actionsFf;
+ this.actionsFfSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFGroupFeaturesStatsReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ long types = this.typesSet ? this.types : parentMessage.types;
+ long capabilities = this.capabilitiesSet ? this.capabilities : parentMessage.capabilities;
+ long maxGroupsAll = this.maxGroupsAllSet ? this.maxGroupsAll : parentMessage.maxGroupsAll;
+ long maxGroupsSelect = this.maxGroupsSelectSet ? this.maxGroupsSelect : parentMessage.maxGroupsSelect;
+ long maxGroupsIndirect = this.maxGroupsIndirectSet ? this.maxGroupsIndirect : parentMessage.maxGroupsIndirect;
+ long maxGroupsFf = this.maxGroupsFfSet ? this.maxGroupsFf : parentMessage.maxGroupsFf;
+ long actionsAll = this.actionsAllSet ? this.actionsAll : parentMessage.actionsAll;
+ long actionsSelect = this.actionsSelectSet ? this.actionsSelect : parentMessage.actionsSelect;
+ long actionsIndirect = this.actionsIndirectSet ? this.actionsIndirect : parentMessage.actionsIndirect;
+ long actionsFf = this.actionsFfSet ? this.actionsFf : parentMessage.actionsFf;
+
+ //
+ return new OFGroupFeaturesStatsReplyVer13(
+ xid,
+ flags,
+ types,
+ capabilities,
+ maxGroupsAll,
+ maxGroupsSelect,
+ maxGroupsIndirect,
+ maxGroupsFf,
+ actionsAll,
+ actionsSelect,
+ actionsIndirect,
+ actionsFf
+ );
+ }
+
+ }
+
+ static class Builder implements OFGroupFeaturesStatsReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean typesSet;
+ private long types;
+ private boolean capabilitiesSet;
+ private long capabilities;
+ private boolean maxGroupsAllSet;
+ private long maxGroupsAll;
+ private boolean maxGroupsSelectSet;
+ private long maxGroupsSelect;
+ private boolean maxGroupsIndirectSet;
+ private long maxGroupsIndirect;
+ private boolean maxGroupsFfSet;
+ private long maxGroupsFf;
+ private boolean actionsAllSet;
+ private long actionsAll;
+ private boolean actionsSelectSet;
+ private long actionsSelect;
+ private boolean actionsIndirectSet;
+ private long actionsIndirect;
+ private boolean actionsFfSet;
+ private long actionsFf;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFGroupFeaturesStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.GROUP_FEATURES;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFGroupFeaturesStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getTypes() {
+ return types;
+ }
+
+ @Override
+ public OFGroupFeaturesStatsReply.Builder setTypes(long types) {
+ this.types = types;
+ this.typesSet = true;
+ return this;
+ }
+ @Override
+ public long getCapabilities() {
+ return capabilities;
+ }
+
+ @Override
+ public OFGroupFeaturesStatsReply.Builder setCapabilities(long capabilities) {
+ this.capabilities = capabilities;
+ this.capabilitiesSet = true;
+ return this;
+ }
+ @Override
+ public long getMaxGroupsAll() {
+ return maxGroupsAll;
+ }
+
+ @Override
+ public OFGroupFeaturesStatsReply.Builder setMaxGroupsAll(long maxGroupsAll) {
+ this.maxGroupsAll = maxGroupsAll;
+ this.maxGroupsAllSet = true;
+ return this;
+ }
+ @Override
+ public long getMaxGroupsSelect() {
+ return maxGroupsSelect;
+ }
+
+ @Override
+ public OFGroupFeaturesStatsReply.Builder setMaxGroupsSelect(long maxGroupsSelect) {
+ this.maxGroupsSelect = maxGroupsSelect;
+ this.maxGroupsSelectSet = true;
+ return this;
+ }
+ @Override
+ public long getMaxGroupsIndirect() {
+ return maxGroupsIndirect;
+ }
+
+ @Override
+ public OFGroupFeaturesStatsReply.Builder setMaxGroupsIndirect(long maxGroupsIndirect) {
+ this.maxGroupsIndirect = maxGroupsIndirect;
+ this.maxGroupsIndirectSet = true;
+ return this;
+ }
+ @Override
+ public long getMaxGroupsFf() {
+ return maxGroupsFf;
+ }
+
+ @Override
+ public OFGroupFeaturesStatsReply.Builder setMaxGroupsFf(long maxGroupsFf) {
+ this.maxGroupsFf = maxGroupsFf;
+ this.maxGroupsFfSet = true;
+ return this;
+ }
+ @Override
+ public long getActionsAll() {
+ return actionsAll;
+ }
+
+ @Override
+ public OFGroupFeaturesStatsReply.Builder setActionsAll(long actionsAll) {
+ this.actionsAll = actionsAll;
+ this.actionsAllSet = true;
+ return this;
+ }
+ @Override
+ public long getActionsSelect() {
+ return actionsSelect;
+ }
+
+ @Override
+ public OFGroupFeaturesStatsReply.Builder setActionsSelect(long actionsSelect) {
+ this.actionsSelect = actionsSelect;
+ this.actionsSelectSet = true;
+ return this;
+ }
+ @Override
+ public long getActionsIndirect() {
+ return actionsIndirect;
+ }
+
+ @Override
+ public OFGroupFeaturesStatsReply.Builder setActionsIndirect(long actionsIndirect) {
+ this.actionsIndirect = actionsIndirect;
+ this.actionsIndirectSet = true;
+ return this;
+ }
+ @Override
+ public long getActionsFf() {
+ return actionsFf;
+ }
+
+ @Override
+ public OFGroupFeaturesStatsReply.Builder setActionsFf(long actionsFf) {
+ this.actionsFf = actionsFf;
+ this.actionsFfSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFGroupFeaturesStatsReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ long types = this.typesSet ? this.types : DEFAULT_TYPES;
+ long capabilities = this.capabilitiesSet ? this.capabilities : DEFAULT_CAPABILITIES;
+ long maxGroupsAll = this.maxGroupsAllSet ? this.maxGroupsAll : DEFAULT_MAX_GROUPS_ALL;
+ long maxGroupsSelect = this.maxGroupsSelectSet ? this.maxGroupsSelect : DEFAULT_MAX_GROUPS_SELECT;
+ long maxGroupsIndirect = this.maxGroupsIndirectSet ? this.maxGroupsIndirect : DEFAULT_MAX_GROUPS_INDIRECT;
+ long maxGroupsFf = this.maxGroupsFfSet ? this.maxGroupsFf : DEFAULT_MAX_GROUPS_FF;
+ long actionsAll = this.actionsAllSet ? this.actionsAll : DEFAULT_ACTIONS_ALL;
+ long actionsSelect = this.actionsSelectSet ? this.actionsSelect : DEFAULT_ACTIONS_SELECT;
+ long actionsIndirect = this.actionsIndirectSet ? this.actionsIndirect : DEFAULT_ACTIONS_INDIRECT;
+ long actionsFf = this.actionsFfSet ? this.actionsFf : DEFAULT_ACTIONS_FF;
+
+
+ return new OFGroupFeaturesStatsReplyVer13(
+ xid,
+ flags,
+ types,
+ capabilities,
+ maxGroupsAll,
+ maxGroupsSelect,
+ maxGroupsIndirect,
+ maxGroupsFf,
+ actionsAll,
+ actionsSelect,
+ actionsIndirect,
+ actionsFf
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFGroupFeaturesStatsReply> {
+ @Override
+ public OFGroupFeaturesStatsReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 19
+ byte type = bb.readByte();
+ if(type != (byte) 0x13)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REPLY(19), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 56)
+ throw new OFParseError("Wrong length: Expected=56(56), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 8
+ short statsType = bb.readShort();
+ if(statsType != (short) 0x8)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.GROUP_FEATURES(8), got="+statsType);
+ Set<OFStatsReplyFlags> flags = OFStatsReplyFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ long types = U32.f(bb.readInt());
+ long capabilities = U32.f(bb.readInt());
+ long maxGroupsAll = U32.f(bb.readInt());
+ long maxGroupsSelect = U32.f(bb.readInt());
+ long maxGroupsIndirect = U32.f(bb.readInt());
+ long maxGroupsFf = U32.f(bb.readInt());
+ long actionsAll = U32.f(bb.readInt());
+ long actionsSelect = U32.f(bb.readInt());
+ long actionsIndirect = U32.f(bb.readInt());
+ long actionsFf = U32.f(bb.readInt());
+
+ OFGroupFeaturesStatsReplyVer13 groupFeaturesStatsReplyVer13 = new OFGroupFeaturesStatsReplyVer13(
+ xid,
+ flags,
+ types,
+ capabilities,
+ maxGroupsAll,
+ maxGroupsSelect,
+ maxGroupsIndirect,
+ maxGroupsFf,
+ actionsAll,
+ actionsSelect,
+ actionsIndirect,
+ actionsFf
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", groupFeaturesStatsReplyVer13);
+ return groupFeaturesStatsReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFGroupFeaturesStatsReplyVer13Funnel FUNNEL = new OFGroupFeaturesStatsReplyVer13Funnel();
+ static class OFGroupFeaturesStatsReplyVer13Funnel implements Funnel<OFGroupFeaturesStatsReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFGroupFeaturesStatsReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 19
+ sink.putByte((byte) 0x13);
+ // fixed value property length = 56
+ sink.putShort((short) 0x38);
+ sink.putLong(message.xid);
+ // fixed value property statsType = 8
+ sink.putShort((short) 0x8);
+ OFStatsReplyFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ sink.putLong(message.types);
+ sink.putLong(message.capabilities);
+ sink.putLong(message.maxGroupsAll);
+ sink.putLong(message.maxGroupsSelect);
+ sink.putLong(message.maxGroupsIndirect);
+ sink.putLong(message.maxGroupsFf);
+ sink.putLong(message.actionsAll);
+ sink.putLong(message.actionsSelect);
+ sink.putLong(message.actionsIndirect);
+ sink.putLong(message.actionsFf);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFGroupFeaturesStatsReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFGroupFeaturesStatsReplyVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 19
+ bb.writeByte((byte) 0x13);
+ // fixed value property length = 56
+ bb.writeShort((short) 0x38);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 8
+ bb.writeShort((short) 0x8);
+ OFStatsReplyFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ bb.writeInt(U32.t(message.types));
+ bb.writeInt(U32.t(message.capabilities));
+ bb.writeInt(U32.t(message.maxGroupsAll));
+ bb.writeInt(U32.t(message.maxGroupsSelect));
+ bb.writeInt(U32.t(message.maxGroupsIndirect));
+ bb.writeInt(U32.t(message.maxGroupsFf));
+ bb.writeInt(U32.t(message.actionsAll));
+ bb.writeInt(U32.t(message.actionsSelect));
+ bb.writeInt(U32.t(message.actionsIndirect));
+ bb.writeInt(U32.t(message.actionsFf));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFGroupFeaturesStatsReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("types=").append(types);
+ b.append(", ");
+ b.append("capabilities=").append(capabilities);
+ b.append(", ");
+ b.append("maxGroupsAll=").append(maxGroupsAll);
+ b.append(", ");
+ b.append("maxGroupsSelect=").append(maxGroupsSelect);
+ b.append(", ");
+ b.append("maxGroupsIndirect=").append(maxGroupsIndirect);
+ b.append(", ");
+ b.append("maxGroupsFf=").append(maxGroupsFf);
+ b.append(", ");
+ b.append("actionsAll=").append(actionsAll);
+ b.append(", ");
+ b.append("actionsSelect=").append(actionsSelect);
+ b.append(", ");
+ b.append("actionsIndirect=").append(actionsIndirect);
+ b.append(", ");
+ b.append("actionsFf=").append(actionsFf);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFGroupFeaturesStatsReplyVer13 other = (OFGroupFeaturesStatsReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if( types != other.types)
+ return false;
+ if( capabilities != other.capabilities)
+ return false;
+ if( maxGroupsAll != other.maxGroupsAll)
+ return false;
+ if( maxGroupsSelect != other.maxGroupsSelect)
+ return false;
+ if( maxGroupsIndirect != other.maxGroupsIndirect)
+ return false;
+ if( maxGroupsFf != other.maxGroupsFf)
+ return false;
+ if( actionsAll != other.actionsAll)
+ return false;
+ if( actionsSelect != other.actionsSelect)
+ return false;
+ if( actionsIndirect != other.actionsIndirect)
+ return false;
+ if( actionsFf != other.actionsFf)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * (int) (types ^ (types >>> 32));
+ result = prime * (int) (capabilities ^ (capabilities >>> 32));
+ result = prime * (int) (maxGroupsAll ^ (maxGroupsAll >>> 32));
+ result = prime * (int) (maxGroupsSelect ^ (maxGroupsSelect >>> 32));
+ result = prime * (int) (maxGroupsIndirect ^ (maxGroupsIndirect >>> 32));
+ result = prime * (int) (maxGroupsFf ^ (maxGroupsFf >>> 32));
+ result = prime * (int) (actionsAll ^ (actionsAll >>> 32));
+ result = prime * (int) (actionsSelect ^ (actionsSelect >>> 32));
+ result = prime * (int) (actionsIndirect ^ (actionsIndirect >>> 32));
+ result = prime * (int) (actionsFf ^ (actionsFf >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupFeaturesStatsRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupFeaturesStatsRequestVer13.java
new file mode 100644
index 0000000..b181c11
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupFeaturesStatsRequestVer13.java
@@ -0,0 +1,351 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFGroupFeaturesStatsRequestVer13 implements OFGroupFeaturesStatsRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFGroupFeaturesStatsRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 16;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsRequestFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsRequestFlags>of();
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsRequestFlags> flags;
+//
+ // Immutable default instance
+ final static OFGroupFeaturesStatsRequestVer13 DEFAULT = new OFGroupFeaturesStatsRequestVer13(
+ DEFAULT_XID, DEFAULT_FLAGS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFGroupFeaturesStatsRequestVer13(long xid, Set<OFStatsRequestFlags> flags) {
+ this.xid = xid;
+ this.flags = flags;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.GROUP_FEATURES;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+
+
+ public OFGroupFeaturesStatsRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFGroupFeaturesStatsRequest.Builder {
+ final OFGroupFeaturesStatsRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+
+ BuilderWithParent(OFGroupFeaturesStatsRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFGroupFeaturesStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.GROUP_FEATURES;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFGroupFeaturesStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFGroupFeaturesStatsRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+
+ //
+ return new OFGroupFeaturesStatsRequestVer13(
+ xid,
+ flags
+ );
+ }
+
+ }
+
+ static class Builder implements OFGroupFeaturesStatsRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFGroupFeaturesStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.GROUP_FEATURES;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFGroupFeaturesStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFGroupFeaturesStatsRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+
+
+ return new OFGroupFeaturesStatsRequestVer13(
+ xid,
+ flags
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFGroupFeaturesStatsRequest> {
+ @Override
+ public OFGroupFeaturesStatsRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 18
+ byte type = bb.readByte();
+ if(type != (byte) 0x12)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REQUEST(18), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 16)
+ throw new OFParseError("Wrong length: Expected=16(16), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 8
+ short statsType = bb.readShort();
+ if(statsType != (short) 0x8)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.GROUP_FEATURES(8), got="+statsType);
+ Set<OFStatsRequestFlags> flags = OFStatsRequestFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+
+ OFGroupFeaturesStatsRequestVer13 groupFeaturesStatsRequestVer13 = new OFGroupFeaturesStatsRequestVer13(
+ xid,
+ flags
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", groupFeaturesStatsRequestVer13);
+ return groupFeaturesStatsRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFGroupFeaturesStatsRequestVer13Funnel FUNNEL = new OFGroupFeaturesStatsRequestVer13Funnel();
+ static class OFGroupFeaturesStatsRequestVer13Funnel implements Funnel<OFGroupFeaturesStatsRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFGroupFeaturesStatsRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 18
+ sink.putByte((byte) 0x12);
+ // fixed value property length = 16
+ sink.putShort((short) 0x10);
+ sink.putLong(message.xid);
+ // fixed value property statsType = 8
+ sink.putShort((short) 0x8);
+ OFStatsRequestFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFGroupFeaturesStatsRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFGroupFeaturesStatsRequestVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 18
+ bb.writeByte((byte) 0x12);
+ // fixed value property length = 16
+ bb.writeShort((short) 0x10);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 8
+ bb.writeShort((short) 0x8);
+ OFStatsRequestFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFGroupFeaturesStatsRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFGroupFeaturesStatsRequestVer13 other = (OFGroupFeaturesStatsRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupModCommandSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupModCommandSerializerVer13.java
new file mode 100644
index 0000000..79ca051
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupModCommandSerializerVer13.java
@@ -0,0 +1,79 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFGroupModCommand;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+
+public class OFGroupModCommandSerializerVer13 {
+
+ public final static short ADD_VAL = (short) 0x0;
+ public final static short MODIFY_VAL = (short) 0x1;
+ public final static short DELETE_VAL = (short) 0x2;
+
+ public static OFGroupModCommand readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readShort());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, OFGroupModCommand e) {
+ bb.writeShort(toWireValue(e));
+ }
+
+ public static void putTo(OFGroupModCommand e, PrimitiveSink sink) {
+ sink.putShort(toWireValue(e));
+ }
+
+ public static OFGroupModCommand ofWireValue(short val) {
+ switch(val) {
+ case ADD_VAL:
+ return OFGroupModCommand.ADD;
+ case MODIFY_VAL:
+ return OFGroupModCommand.MODIFY;
+ case DELETE_VAL:
+ return OFGroupModCommand.DELETE;
+ default:
+ throw new IllegalArgumentException("Illegal wire value for type OFGroupModCommand in version 1.3: " + val);
+ }
+ }
+
+
+ public static short toWireValue(OFGroupModCommand e) {
+ switch(e) {
+ case ADD:
+ return ADD_VAL;
+ case MODIFY:
+ return MODIFY_VAL;
+ case DELETE:
+ return DELETE_VAL;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFGroupModCommand in version 1.3: " + e);
+ }
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupModFailedCodeSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupModFailedCodeSerializerVer13.java
new file mode 100644
index 0000000..285e3a6
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupModFailedCodeSerializerVer13.java
@@ -0,0 +1,139 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFGroupModFailedCode;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+
+public class OFGroupModFailedCodeSerializerVer13 {
+
+ public final static short GROUP_EXISTS_VAL = (short) 0x0;
+ public final static short INVALID_GROUP_VAL = (short) 0x1;
+ public final static short WEIGHT_UNSUPPORTED_VAL = (short) 0x2;
+ public final static short OUT_OF_GROUPS_VAL = (short) 0x3;
+ public final static short OUT_OF_BUCKETS_VAL = (short) 0x4;
+ public final static short CHAINING_UNSUPPORTED_VAL = (short) 0x5;
+ public final static short WATCH_UNSUPPORTED_VAL = (short) 0x6;
+ public final static short LOOP_VAL = (short) 0x7;
+ public final static short UNKNOWN_GROUP_VAL = (short) 0x8;
+ public final static short CHAINED_GROUP_VAL = (short) 0x9;
+ public final static short BAD_TYPE_VAL = (short) 0xa;
+ public final static short BAD_COMMAND_VAL = (short) 0xb;
+ public final static short BAD_BUCKET_VAL = (short) 0xc;
+ public final static short BAD_WATCH_VAL = (short) 0xd;
+ public final static short EPERM_VAL = (short) 0xe;
+
+ public static OFGroupModFailedCode readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readShort());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, OFGroupModFailedCode e) {
+ bb.writeShort(toWireValue(e));
+ }
+
+ public static void putTo(OFGroupModFailedCode e, PrimitiveSink sink) {
+ sink.putShort(toWireValue(e));
+ }
+
+ public static OFGroupModFailedCode ofWireValue(short val) {
+ switch(val) {
+ case GROUP_EXISTS_VAL:
+ return OFGroupModFailedCode.GROUP_EXISTS;
+ case INVALID_GROUP_VAL:
+ return OFGroupModFailedCode.INVALID_GROUP;
+ case WEIGHT_UNSUPPORTED_VAL:
+ return OFGroupModFailedCode.WEIGHT_UNSUPPORTED;
+ case OUT_OF_GROUPS_VAL:
+ return OFGroupModFailedCode.OUT_OF_GROUPS;
+ case OUT_OF_BUCKETS_VAL:
+ return OFGroupModFailedCode.OUT_OF_BUCKETS;
+ case CHAINING_UNSUPPORTED_VAL:
+ return OFGroupModFailedCode.CHAINING_UNSUPPORTED;
+ case WATCH_UNSUPPORTED_VAL:
+ return OFGroupModFailedCode.WATCH_UNSUPPORTED;
+ case LOOP_VAL:
+ return OFGroupModFailedCode.LOOP;
+ case UNKNOWN_GROUP_VAL:
+ return OFGroupModFailedCode.UNKNOWN_GROUP;
+ case CHAINED_GROUP_VAL:
+ return OFGroupModFailedCode.CHAINED_GROUP;
+ case BAD_TYPE_VAL:
+ return OFGroupModFailedCode.BAD_TYPE;
+ case BAD_COMMAND_VAL:
+ return OFGroupModFailedCode.BAD_COMMAND;
+ case BAD_BUCKET_VAL:
+ return OFGroupModFailedCode.BAD_BUCKET;
+ case BAD_WATCH_VAL:
+ return OFGroupModFailedCode.BAD_WATCH;
+ case EPERM_VAL:
+ return OFGroupModFailedCode.EPERM;
+ default:
+ throw new IllegalArgumentException("Illegal wire value for type OFGroupModFailedCode in version 1.3: " + val);
+ }
+ }
+
+
+ public static short toWireValue(OFGroupModFailedCode e) {
+ switch(e) {
+ case GROUP_EXISTS:
+ return GROUP_EXISTS_VAL;
+ case INVALID_GROUP:
+ return INVALID_GROUP_VAL;
+ case WEIGHT_UNSUPPORTED:
+ return WEIGHT_UNSUPPORTED_VAL;
+ case OUT_OF_GROUPS:
+ return OUT_OF_GROUPS_VAL;
+ case OUT_OF_BUCKETS:
+ return OUT_OF_BUCKETS_VAL;
+ case CHAINING_UNSUPPORTED:
+ return CHAINING_UNSUPPORTED_VAL;
+ case WATCH_UNSUPPORTED:
+ return WATCH_UNSUPPORTED_VAL;
+ case LOOP:
+ return LOOP_VAL;
+ case UNKNOWN_GROUP:
+ return UNKNOWN_GROUP_VAL;
+ case CHAINED_GROUP:
+ return CHAINED_GROUP_VAL;
+ case BAD_TYPE:
+ return BAD_TYPE_VAL;
+ case BAD_COMMAND:
+ return BAD_COMMAND_VAL;
+ case BAD_BUCKET:
+ return BAD_BUCKET_VAL;
+ case BAD_WATCH:
+ return BAD_WATCH_VAL;
+ case EPERM:
+ return EPERM_VAL;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFGroupModFailedCode in version 1.3: " + e);
+ }
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupModFailedErrorMsgVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupModFailedErrorMsgVer13.java
new file mode 100644
index 0000000..17920f1
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupModFailedErrorMsgVer13.java
@@ -0,0 +1,400 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFGroupModFailedErrorMsgVer13 implements OFGroupModFailedErrorMsg {
+ private static final Logger logger = LoggerFactory.getLogger(OFGroupModFailedErrorMsgVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 12;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static OFErrorCauseData DEFAULT_DATA = OFErrorCauseData.NONE;
+
+ // OF message fields
+ private final long xid;
+ private final OFGroupModFailedCode code;
+ private final OFErrorCauseData data;
+//
+
+ // package private constructor - used by readers, builders, and factory
+ OFGroupModFailedErrorMsgVer13(long xid, OFGroupModFailedCode code, OFErrorCauseData data) {
+ this.xid = xid;
+ this.code = code;
+ this.data = data;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ERROR;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFErrorType getErrType() {
+ return OFErrorType.GROUP_MOD_FAILED;
+ }
+
+ @Override
+ public OFGroupModFailedCode getCode() {
+ return code;
+ }
+
+ @Override
+ public OFErrorCauseData getData() {
+ return data;
+ }
+
+
+
+ public OFGroupModFailedErrorMsg.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFGroupModFailedErrorMsg.Builder {
+ final OFGroupModFailedErrorMsgVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean codeSet;
+ private OFGroupModFailedCode code;
+ private boolean dataSet;
+ private OFErrorCauseData data;
+
+ BuilderWithParent(OFGroupModFailedErrorMsgVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ERROR;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFGroupModFailedErrorMsg.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorType getErrType() {
+ return OFErrorType.GROUP_MOD_FAILED;
+ }
+
+ @Override
+ public OFGroupModFailedCode getCode() {
+ return code;
+ }
+
+ @Override
+ public OFGroupModFailedErrorMsg.Builder setCode(OFGroupModFailedCode code) {
+ this.code = code;
+ this.codeSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorCauseData getData() {
+ return data;
+ }
+
+ @Override
+ public OFGroupModFailedErrorMsg.Builder setData(OFErrorCauseData data) {
+ this.data = data;
+ this.dataSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFGroupModFailedErrorMsg build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ OFGroupModFailedCode code = this.codeSet ? this.code : parentMessage.code;
+ if(code == null)
+ throw new NullPointerException("Property code must not be null");
+ OFErrorCauseData data = this.dataSet ? this.data : parentMessage.data;
+ if(data == null)
+ throw new NullPointerException("Property data must not be null");
+
+ //
+ return new OFGroupModFailedErrorMsgVer13(
+ xid,
+ code,
+ data
+ );
+ }
+
+ }
+
+ static class Builder implements OFGroupModFailedErrorMsg.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean codeSet;
+ private OFGroupModFailedCode code;
+ private boolean dataSet;
+ private OFErrorCauseData data;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ERROR;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFGroupModFailedErrorMsg.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorType getErrType() {
+ return OFErrorType.GROUP_MOD_FAILED;
+ }
+
+ @Override
+ public OFGroupModFailedCode getCode() {
+ return code;
+ }
+
+ @Override
+ public OFGroupModFailedErrorMsg.Builder setCode(OFGroupModFailedCode code) {
+ this.code = code;
+ this.codeSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorCauseData getData() {
+ return data;
+ }
+
+ @Override
+ public OFGroupModFailedErrorMsg.Builder setData(OFErrorCauseData data) {
+ this.data = data;
+ this.dataSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFGroupModFailedErrorMsg build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ if(!this.codeSet)
+ throw new IllegalStateException("Property code doesn't have default value -- must be set");
+ if(code == null)
+ throw new NullPointerException("Property code must not be null");
+ OFErrorCauseData data = this.dataSet ? this.data : DEFAULT_DATA;
+ if(data == null)
+ throw new NullPointerException("Property data must not be null");
+
+
+ return new OFGroupModFailedErrorMsgVer13(
+ xid,
+ code,
+ data
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFGroupModFailedErrorMsg> {
+ @Override
+ public OFGroupModFailedErrorMsg readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 1
+ byte type = bb.readByte();
+ if(type != (byte) 0x1)
+ throw new OFParseError("Wrong type: Expected=OFType.ERROR(1), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property errType == 6
+ short errType = bb.readShort();
+ if(errType != (short) 0x6)
+ throw new OFParseError("Wrong errType: Expected=OFErrorType.GROUP_MOD_FAILED(6), got="+errType);
+ OFGroupModFailedCode code = OFGroupModFailedCodeSerializerVer13.readFrom(bb);
+ OFErrorCauseData data = OFErrorCauseData.read(bb, length - (bb.readerIndex() - start), OFVersion.OF_13);
+
+ OFGroupModFailedErrorMsgVer13 groupModFailedErrorMsgVer13 = new OFGroupModFailedErrorMsgVer13(
+ xid,
+ code,
+ data
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", groupModFailedErrorMsgVer13);
+ return groupModFailedErrorMsgVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFGroupModFailedErrorMsgVer13Funnel FUNNEL = new OFGroupModFailedErrorMsgVer13Funnel();
+ static class OFGroupModFailedErrorMsgVer13Funnel implements Funnel<OFGroupModFailedErrorMsgVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFGroupModFailedErrorMsgVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 1
+ sink.putByte((byte) 0x1);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property errType = 6
+ sink.putShort((short) 0x6);
+ OFGroupModFailedCodeSerializerVer13.putTo(message.code, sink);
+ message.data.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFGroupModFailedErrorMsgVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFGroupModFailedErrorMsgVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 1
+ bb.writeByte((byte) 0x1);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property errType = 6
+ bb.writeShort((short) 0x6);
+ OFGroupModFailedCodeSerializerVer13.writeTo(bb, message.code);
+ message.data.writeTo(bb);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFGroupModFailedErrorMsgVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("code=").append(code);
+ b.append(", ");
+ b.append("data=").append(data);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFGroupModFailedErrorMsgVer13 other = (OFGroupModFailedErrorMsgVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (code == null) {
+ if (other.code != null)
+ return false;
+ } else if (!code.equals(other.code))
+ return false;
+ if (data == null) {
+ if (other.data != null)
+ return false;
+ } else if (!data.equals(other.data))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((code == null) ? 0 : code.hashCode());
+ result = prime * result + ((data == null) ? 0 : data.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupModVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupModVer13.java
new file mode 100644
index 0000000..ef92d83
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupModVer13.java
@@ -0,0 +1,71 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_virtual_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.jboss.netty.buffer.ChannelBuffer;
+
+abstract class OFGroupModVer13 {
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 16;
+
+
+ public final static OFGroupModVer13.Reader READER = new Reader();
+
+ static class Reader implements OFMessageReader<OFGroupMod> {
+ @Override
+ public OFGroupMod readFrom(ChannelBuffer bb) throws OFParseError {
+ if(bb.readableBytes() < MINIMUM_LENGTH)
+ return null;
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 15
+ byte type = bb.readByte();
+ if(type != (byte) 0xf)
+ throw new OFParseError("Wrong type: Expected=OFType.GROUP_MOD(15), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ U32.f(bb.readInt());
+ short command = bb.readShort();
+ bb.readerIndex(start);
+ switch(command) {
+ case (short) 0x0:
+ // discriminator value OFGroupModCommand.ADD=0 for class OFGroupAddVer13
+ return OFGroupAddVer13.READER.readFrom(bb);
+ case (short) 0x2:
+ // discriminator value OFGroupModCommand.DELETE=2 for class OFGroupDeleteVer13
+ return OFGroupDeleteVer13.READER.readFrom(bb);
+ case (short) 0x1:
+ // discriminator value OFGroupModCommand.MODIFY=1 for class OFGroupModifyVer13
+ return OFGroupModifyVer13.READER.readFrom(bb);
+ default:
+ throw new OFParseError("Unknown value for discriminator command of class OFGroupModVer13: " + command);
+ }
+ }
+ }
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupModifyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupModifyVer13.java
new file mode 100644
index 0000000..bd33104
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupModifyVer13.java
@@ -0,0 +1,461 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFGroupModifyVer13 implements OFGroupModify {
+ private static final Logger logger = LoggerFactory.getLogger(OFGroupModifyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 16;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static OFGroup DEFAULT_GROUP_ID = OFGroup.ALL;
+ private final static List<OFBucket> DEFAULT_BUCKETS = ImmutableList.<OFBucket>of();
+
+ // OF message fields
+ private final long xid;
+ private final OFGroupType groupType;
+ private final OFGroup group;
+ private final List<OFBucket> buckets;
+//
+
+ // package private constructor - used by readers, builders, and factory
+ OFGroupModifyVer13(long xid, OFGroupType groupType, OFGroup group, List<OFBucket> buckets) {
+ this.xid = xid;
+ this.groupType = groupType;
+ this.group = group;
+ this.buckets = buckets;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.GROUP_MOD;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFGroupModCommand getCommand() {
+ return OFGroupModCommand.MODIFY;
+ }
+
+ @Override
+ public OFGroupType getGroupType() {
+ return groupType;
+ }
+
+ @Override
+ public OFGroup getGroup() {
+ return group;
+ }
+
+ @Override
+ public List<OFBucket> getBuckets() {
+ return buckets;
+ }
+
+
+
+ public OFGroupModify.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFGroupModify.Builder {
+ final OFGroupModifyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean groupTypeSet;
+ private OFGroupType groupType;
+ private boolean groupSet;
+ private OFGroup group;
+ private boolean bucketsSet;
+ private List<OFBucket> buckets;
+
+ BuilderWithParent(OFGroupModifyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.GROUP_MOD;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFGroupModify.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFGroupModCommand getCommand() {
+ return OFGroupModCommand.MODIFY;
+ }
+
+ @Override
+ public OFGroupType getGroupType() {
+ return groupType;
+ }
+
+ @Override
+ public OFGroupModify.Builder setGroupType(OFGroupType groupType) {
+ this.groupType = groupType;
+ this.groupTypeSet = true;
+ return this;
+ }
+ @Override
+ public OFGroup getGroup() {
+ return group;
+ }
+
+ @Override
+ public OFGroupModify.Builder setGroup(OFGroup group) {
+ this.group = group;
+ this.groupSet = true;
+ return this;
+ }
+ @Override
+ public List<OFBucket> getBuckets() {
+ return buckets;
+ }
+
+ @Override
+ public OFGroupModify.Builder setBuckets(List<OFBucket> buckets) {
+ this.buckets = buckets;
+ this.bucketsSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFGroupModify build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ OFGroupType groupType = this.groupTypeSet ? this.groupType : parentMessage.groupType;
+ if(groupType == null)
+ throw new NullPointerException("Property groupType must not be null");
+ OFGroup group = this.groupSet ? this.group : parentMessage.group;
+ if(group == null)
+ throw new NullPointerException("Property group must not be null");
+ List<OFBucket> buckets = this.bucketsSet ? this.buckets : parentMessage.buckets;
+ if(buckets == null)
+ throw new NullPointerException("Property buckets must not be null");
+
+ //
+ return new OFGroupModifyVer13(
+ xid,
+ groupType,
+ group,
+ buckets
+ );
+ }
+
+ }
+
+ static class Builder implements OFGroupModify.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean groupTypeSet;
+ private OFGroupType groupType;
+ private boolean groupSet;
+ private OFGroup group;
+ private boolean bucketsSet;
+ private List<OFBucket> buckets;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.GROUP_MOD;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFGroupModify.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFGroupModCommand getCommand() {
+ return OFGroupModCommand.MODIFY;
+ }
+
+ @Override
+ public OFGroupType getGroupType() {
+ return groupType;
+ }
+
+ @Override
+ public OFGroupModify.Builder setGroupType(OFGroupType groupType) {
+ this.groupType = groupType;
+ this.groupTypeSet = true;
+ return this;
+ }
+ @Override
+ public OFGroup getGroup() {
+ return group;
+ }
+
+ @Override
+ public OFGroupModify.Builder setGroup(OFGroup group) {
+ this.group = group;
+ this.groupSet = true;
+ return this;
+ }
+ @Override
+ public List<OFBucket> getBuckets() {
+ return buckets;
+ }
+
+ @Override
+ public OFGroupModify.Builder setBuckets(List<OFBucket> buckets) {
+ this.buckets = buckets;
+ this.bucketsSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFGroupModify build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ if(!this.groupTypeSet)
+ throw new IllegalStateException("Property groupType doesn't have default value -- must be set");
+ if(groupType == null)
+ throw new NullPointerException("Property groupType must not be null");
+ OFGroup group = this.groupSet ? this.group : DEFAULT_GROUP_ID;
+ if(group == null)
+ throw new NullPointerException("Property group must not be null");
+ List<OFBucket> buckets = this.bucketsSet ? this.buckets : DEFAULT_BUCKETS;
+ if(buckets == null)
+ throw new NullPointerException("Property buckets must not be null");
+
+
+ return new OFGroupModifyVer13(
+ xid,
+ groupType,
+ group,
+ buckets
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFGroupModify> {
+ @Override
+ public OFGroupModify readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 15
+ byte type = bb.readByte();
+ if(type != (byte) 0xf)
+ throw new OFParseError("Wrong type: Expected=OFType.GROUP_MOD(15), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property command == 1
+ short command = bb.readShort();
+ if(command != (short) 0x1)
+ throw new OFParseError("Wrong command: Expected=OFGroupModCommand.MODIFY(1), got="+command);
+ OFGroupType groupType = OFGroupTypeSerializerVer13.readFrom(bb);
+ // pad: 1 bytes
+ bb.skipBytes(1);
+ OFGroup group = OFGroup.read4Bytes(bb);
+ List<OFBucket> buckets = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFBucketVer13.READER);
+
+ OFGroupModifyVer13 groupModifyVer13 = new OFGroupModifyVer13(
+ xid,
+ groupType,
+ group,
+ buckets
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", groupModifyVer13);
+ return groupModifyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFGroupModifyVer13Funnel FUNNEL = new OFGroupModifyVer13Funnel();
+ static class OFGroupModifyVer13Funnel implements Funnel<OFGroupModifyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFGroupModifyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 15
+ sink.putByte((byte) 0xf);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property command = 1
+ sink.putShort((short) 0x1);
+ OFGroupTypeSerializerVer13.putTo(message.groupType, sink);
+ // skip pad (1 bytes)
+ message.group.putTo(sink);
+ FunnelUtils.putList(message.buckets, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFGroupModifyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFGroupModifyVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 15
+ bb.writeByte((byte) 0xf);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property command = 1
+ bb.writeShort((short) 0x1);
+ OFGroupTypeSerializerVer13.writeTo(bb, message.groupType);
+ // pad: 1 bytes
+ bb.writeZero(1);
+ message.group.write4Bytes(bb);
+ ChannelUtils.writeList(bb, message.buckets);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFGroupModifyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("groupType=").append(groupType);
+ b.append(", ");
+ b.append("group=").append(group);
+ b.append(", ");
+ b.append("buckets=").append(buckets);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFGroupModifyVer13 other = (OFGroupModifyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (groupType == null) {
+ if (other.groupType != null)
+ return false;
+ } else if (!groupType.equals(other.groupType))
+ return false;
+ if (group == null) {
+ if (other.group != null)
+ return false;
+ } else if (!group.equals(other.group))
+ return false;
+ if (buckets == null) {
+ if (other.buckets != null)
+ return false;
+ } else if (!buckets.equals(other.buckets))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((groupType == null) ? 0 : groupType.hashCode());
+ result = prime * result + ((group == null) ? 0 : group.hashCode());
+ result = prime * result + ((buckets == null) ? 0 : buckets.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupStatsEntryVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupStatsEntryVer13.java
new file mode 100644
index 0000000..02aa30b
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupStatsEntryVer13.java
@@ -0,0 +1,564 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFGroupStatsEntryVer13 implements OFGroupStatsEntry {
+ private static final Logger logger = LoggerFactory.getLogger(OFGroupStatsEntryVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 40;
+
+ private final static OFGroup DEFAULT_GROUP_ID = OFGroup.ALL;
+ private final static long DEFAULT_REF_COUNT = 0x0L;
+ private final static U64 DEFAULT_PACKET_COUNT = U64.ZERO;
+ private final static U64 DEFAULT_BYTE_COUNT = U64.ZERO;
+ private final static long DEFAULT_DURATION_SEC = 0x0L;
+ private final static long DEFAULT_DURATION_NSEC = 0x0L;
+ private final static List<OFBucketCounter> DEFAULT_BUCKET_STATS = ImmutableList.<OFBucketCounter>of();
+
+ // OF message fields
+ private final OFGroup group;
+ private final long refCount;
+ private final U64 packetCount;
+ private final U64 byteCount;
+ private final long durationSec;
+ private final long durationNsec;
+ private final List<OFBucketCounter> bucketStats;
+//
+ // Immutable default instance
+ final static OFGroupStatsEntryVer13 DEFAULT = new OFGroupStatsEntryVer13(
+ DEFAULT_GROUP_ID, DEFAULT_REF_COUNT, DEFAULT_PACKET_COUNT, DEFAULT_BYTE_COUNT, DEFAULT_DURATION_SEC, DEFAULT_DURATION_NSEC, DEFAULT_BUCKET_STATS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFGroupStatsEntryVer13(OFGroup group, long refCount, U64 packetCount, U64 byteCount, long durationSec, long durationNsec, List<OFBucketCounter> bucketStats) {
+ this.group = group;
+ this.refCount = refCount;
+ this.packetCount = packetCount;
+ this.byteCount = byteCount;
+ this.durationSec = durationSec;
+ this.durationNsec = durationNsec;
+ this.bucketStats = bucketStats;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFGroup getGroup() {
+ return group;
+ }
+
+ @Override
+ public long getRefCount() {
+ return refCount;
+ }
+
+ @Override
+ public U64 getPacketCount() {
+ return packetCount;
+ }
+
+ @Override
+ public U64 getByteCount() {
+ return byteCount;
+ }
+
+ @Override
+ public List<OFBucketCounter> getBucketStats() {
+ return bucketStats;
+ }
+
+ @Override
+ public long getDurationSec() {
+ return durationSec;
+ }
+
+ @Override
+ public long getDurationNsec() {
+ return durationNsec;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFGroupStatsEntry.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFGroupStatsEntry.Builder {
+ final OFGroupStatsEntryVer13 parentMessage;
+
+ // OF message fields
+ private boolean groupSet;
+ private OFGroup group;
+ private boolean refCountSet;
+ private long refCount;
+ private boolean packetCountSet;
+ private U64 packetCount;
+ private boolean byteCountSet;
+ private U64 byteCount;
+ private boolean durationSecSet;
+ private long durationSec;
+ private boolean durationNsecSet;
+ private long durationNsec;
+ private boolean bucketStatsSet;
+ private List<OFBucketCounter> bucketStats;
+
+ BuilderWithParent(OFGroupStatsEntryVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFGroup getGroup() {
+ return group;
+ }
+
+ @Override
+ public OFGroupStatsEntry.Builder setGroup(OFGroup group) {
+ this.group = group;
+ this.groupSet = true;
+ return this;
+ }
+ @Override
+ public long getRefCount() {
+ return refCount;
+ }
+
+ @Override
+ public OFGroupStatsEntry.Builder setRefCount(long refCount) {
+ this.refCount = refCount;
+ this.refCountSet = true;
+ return this;
+ }
+ @Override
+ public U64 getPacketCount() {
+ return packetCount;
+ }
+
+ @Override
+ public OFGroupStatsEntry.Builder setPacketCount(U64 packetCount) {
+ this.packetCount = packetCount;
+ this.packetCountSet = true;
+ return this;
+ }
+ @Override
+ public U64 getByteCount() {
+ return byteCount;
+ }
+
+ @Override
+ public OFGroupStatsEntry.Builder setByteCount(U64 byteCount) {
+ this.byteCount = byteCount;
+ this.byteCountSet = true;
+ return this;
+ }
+ @Override
+ public List<OFBucketCounter> getBucketStats() {
+ return bucketStats;
+ }
+
+ @Override
+ public OFGroupStatsEntry.Builder setBucketStats(List<OFBucketCounter> bucketStats) {
+ this.bucketStats = bucketStats;
+ this.bucketStatsSet = true;
+ return this;
+ }
+ @Override
+ public long getDurationSec() {
+ return durationSec;
+ }
+
+ @Override
+ public OFGroupStatsEntry.Builder setDurationSec(long durationSec) {
+ this.durationSec = durationSec;
+ this.durationSecSet = true;
+ return this;
+ }
+ @Override
+ public long getDurationNsec() {
+ return durationNsec;
+ }
+
+ @Override
+ public OFGroupStatsEntry.Builder setDurationNsec(long durationNsec) {
+ this.durationNsec = durationNsec;
+ this.durationNsecSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFGroupStatsEntry build() {
+ OFGroup group = this.groupSet ? this.group : parentMessage.group;
+ if(group == null)
+ throw new NullPointerException("Property group must not be null");
+ long refCount = this.refCountSet ? this.refCount : parentMessage.refCount;
+ U64 packetCount = this.packetCountSet ? this.packetCount : parentMessage.packetCount;
+ if(packetCount == null)
+ throw new NullPointerException("Property packetCount must not be null");
+ U64 byteCount = this.byteCountSet ? this.byteCount : parentMessage.byteCount;
+ if(byteCount == null)
+ throw new NullPointerException("Property byteCount must not be null");
+ long durationSec = this.durationSecSet ? this.durationSec : parentMessage.durationSec;
+ long durationNsec = this.durationNsecSet ? this.durationNsec : parentMessage.durationNsec;
+ List<OFBucketCounter> bucketStats = this.bucketStatsSet ? this.bucketStats : parentMessage.bucketStats;
+ if(bucketStats == null)
+ throw new NullPointerException("Property bucketStats must not be null");
+
+ //
+ return new OFGroupStatsEntryVer13(
+ group,
+ refCount,
+ packetCount,
+ byteCount,
+ durationSec,
+ durationNsec,
+ bucketStats
+ );
+ }
+
+ }
+
+ static class Builder implements OFGroupStatsEntry.Builder {
+ // OF message fields
+ private boolean groupSet;
+ private OFGroup group;
+ private boolean refCountSet;
+ private long refCount;
+ private boolean packetCountSet;
+ private U64 packetCount;
+ private boolean byteCountSet;
+ private U64 byteCount;
+ private boolean durationSecSet;
+ private long durationSec;
+ private boolean durationNsecSet;
+ private long durationNsec;
+ private boolean bucketStatsSet;
+ private List<OFBucketCounter> bucketStats;
+
+ @Override
+ public OFGroup getGroup() {
+ return group;
+ }
+
+ @Override
+ public OFGroupStatsEntry.Builder setGroup(OFGroup group) {
+ this.group = group;
+ this.groupSet = true;
+ return this;
+ }
+ @Override
+ public long getRefCount() {
+ return refCount;
+ }
+
+ @Override
+ public OFGroupStatsEntry.Builder setRefCount(long refCount) {
+ this.refCount = refCount;
+ this.refCountSet = true;
+ return this;
+ }
+ @Override
+ public U64 getPacketCount() {
+ return packetCount;
+ }
+
+ @Override
+ public OFGroupStatsEntry.Builder setPacketCount(U64 packetCount) {
+ this.packetCount = packetCount;
+ this.packetCountSet = true;
+ return this;
+ }
+ @Override
+ public U64 getByteCount() {
+ return byteCount;
+ }
+
+ @Override
+ public OFGroupStatsEntry.Builder setByteCount(U64 byteCount) {
+ this.byteCount = byteCount;
+ this.byteCountSet = true;
+ return this;
+ }
+ @Override
+ public List<OFBucketCounter> getBucketStats() {
+ return bucketStats;
+ }
+
+ @Override
+ public OFGroupStatsEntry.Builder setBucketStats(List<OFBucketCounter> bucketStats) {
+ this.bucketStats = bucketStats;
+ this.bucketStatsSet = true;
+ return this;
+ }
+ @Override
+ public long getDurationSec() {
+ return durationSec;
+ }
+
+ @Override
+ public OFGroupStatsEntry.Builder setDurationSec(long durationSec) {
+ this.durationSec = durationSec;
+ this.durationSecSet = true;
+ return this;
+ }
+ @Override
+ public long getDurationNsec() {
+ return durationNsec;
+ }
+
+ @Override
+ public OFGroupStatsEntry.Builder setDurationNsec(long durationNsec) {
+ this.durationNsec = durationNsec;
+ this.durationNsecSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFGroupStatsEntry build() {
+ OFGroup group = this.groupSet ? this.group : DEFAULT_GROUP_ID;
+ if(group == null)
+ throw new NullPointerException("Property group must not be null");
+ long refCount = this.refCountSet ? this.refCount : DEFAULT_REF_COUNT;
+ U64 packetCount = this.packetCountSet ? this.packetCount : DEFAULT_PACKET_COUNT;
+ if(packetCount == null)
+ throw new NullPointerException("Property packetCount must not be null");
+ U64 byteCount = this.byteCountSet ? this.byteCount : DEFAULT_BYTE_COUNT;
+ if(byteCount == null)
+ throw new NullPointerException("Property byteCount must not be null");
+ long durationSec = this.durationSecSet ? this.durationSec : DEFAULT_DURATION_SEC;
+ long durationNsec = this.durationNsecSet ? this.durationNsec : DEFAULT_DURATION_NSEC;
+ List<OFBucketCounter> bucketStats = this.bucketStatsSet ? this.bucketStats : DEFAULT_BUCKET_STATS;
+ if(bucketStats == null)
+ throw new NullPointerException("Property bucketStats must not be null");
+
+
+ return new OFGroupStatsEntryVer13(
+ group,
+ refCount,
+ packetCount,
+ byteCount,
+ durationSec,
+ durationNsec,
+ bucketStats
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFGroupStatsEntry> {
+ @Override
+ public OFGroupStatsEntry readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ // pad: 2 bytes
+ bb.skipBytes(2);
+ OFGroup group = OFGroup.read4Bytes(bb);
+ long refCount = U32.f(bb.readInt());
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ U64 packetCount = U64.ofRaw(bb.readLong());
+ U64 byteCount = U64.ofRaw(bb.readLong());
+ long durationSec = U32.f(bb.readInt());
+ long durationNsec = U32.f(bb.readInt());
+ List<OFBucketCounter> bucketStats = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFBucketCounterVer13.READER);
+
+ OFGroupStatsEntryVer13 groupStatsEntryVer13 = new OFGroupStatsEntryVer13(
+ group,
+ refCount,
+ packetCount,
+ byteCount,
+ durationSec,
+ durationNsec,
+ bucketStats
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", groupStatsEntryVer13);
+ return groupStatsEntryVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFGroupStatsEntryVer13Funnel FUNNEL = new OFGroupStatsEntryVer13Funnel();
+ static class OFGroupStatsEntryVer13Funnel implements Funnel<OFGroupStatsEntryVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFGroupStatsEntryVer13 message, PrimitiveSink sink) {
+ // FIXME: skip funnel of length
+ // skip pad (2 bytes)
+ message.group.putTo(sink);
+ sink.putLong(message.refCount);
+ // skip pad (4 bytes)
+ message.packetCount.putTo(sink);
+ message.byteCount.putTo(sink);
+ sink.putLong(message.durationSec);
+ sink.putLong(message.durationNsec);
+ FunnelUtils.putList(message.bucketStats, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFGroupStatsEntryVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFGroupStatsEntryVer13 message) {
+ int startIndex = bb.writerIndex();
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ // pad: 2 bytes
+ bb.writeZero(2);
+ message.group.write4Bytes(bb);
+ bb.writeInt(U32.t(message.refCount));
+ // pad: 4 bytes
+ bb.writeZero(4);
+ bb.writeLong(message.packetCount.getValue());
+ bb.writeLong(message.byteCount.getValue());
+ bb.writeInt(U32.t(message.durationSec));
+ bb.writeInt(U32.t(message.durationNsec));
+ ChannelUtils.writeList(bb, message.bucketStats);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFGroupStatsEntryVer13(");
+ b.append("group=").append(group);
+ b.append(", ");
+ b.append("refCount=").append(refCount);
+ b.append(", ");
+ b.append("packetCount=").append(packetCount);
+ b.append(", ");
+ b.append("byteCount=").append(byteCount);
+ b.append(", ");
+ b.append("durationSec=").append(durationSec);
+ b.append(", ");
+ b.append("durationNsec=").append(durationNsec);
+ b.append(", ");
+ b.append("bucketStats=").append(bucketStats);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFGroupStatsEntryVer13 other = (OFGroupStatsEntryVer13) obj;
+
+ if (group == null) {
+ if (other.group != null)
+ return false;
+ } else if (!group.equals(other.group))
+ return false;
+ if( refCount != other.refCount)
+ return false;
+ if (packetCount == null) {
+ if (other.packetCount != null)
+ return false;
+ } else if (!packetCount.equals(other.packetCount))
+ return false;
+ if (byteCount == null) {
+ if (other.byteCount != null)
+ return false;
+ } else if (!byteCount.equals(other.byteCount))
+ return false;
+ if( durationSec != other.durationSec)
+ return false;
+ if( durationNsec != other.durationNsec)
+ return false;
+ if (bucketStats == null) {
+ if (other.bucketStats != null)
+ return false;
+ } else if (!bucketStats.equals(other.bucketStats))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((group == null) ? 0 : group.hashCode());
+ result = prime * (int) (refCount ^ (refCount >>> 32));
+ result = prime * result + ((packetCount == null) ? 0 : packetCount.hashCode());
+ result = prime * result + ((byteCount == null) ? 0 : byteCount.hashCode());
+ result = prime * (int) (durationSec ^ (durationSec >>> 32));
+ result = prime * (int) (durationNsec ^ (durationNsec >>> 32));
+ result = prime * result + ((bucketStats == null) ? 0 : bucketStats.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupStatsReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupStatsReplyVer13.java
new file mode 100644
index 0000000..ada614e
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupStatsReplyVer13.java
@@ -0,0 +1,412 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFGroupStatsReplyVer13 implements OFGroupStatsReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFGroupStatsReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 16;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsReplyFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsReplyFlags>of();
+ private final static List<OFGroupStatsEntry> DEFAULT_ENTRIES = ImmutableList.<OFGroupStatsEntry>of();
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsReplyFlags> flags;
+ private final List<OFGroupStatsEntry> entries;
+//
+ // Immutable default instance
+ final static OFGroupStatsReplyVer13 DEFAULT = new OFGroupStatsReplyVer13(
+ DEFAULT_XID, DEFAULT_FLAGS, DEFAULT_ENTRIES
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFGroupStatsReplyVer13(long xid, Set<OFStatsReplyFlags> flags, List<OFGroupStatsEntry> entries) {
+ this.xid = xid;
+ this.flags = flags;
+ this.entries = entries;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.GROUP;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public List<OFGroupStatsEntry> getEntries() {
+ return entries;
+ }
+
+
+
+ public OFGroupStatsReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFGroupStatsReply.Builder {
+ final OFGroupStatsReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean entriesSet;
+ private List<OFGroupStatsEntry> entries;
+
+ BuilderWithParent(OFGroupStatsReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFGroupStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.GROUP;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFGroupStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public List<OFGroupStatsEntry> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFGroupStatsReply.Builder setEntries(List<OFGroupStatsEntry> entries) {
+ this.entries = entries;
+ this.entriesSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFGroupStatsReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ List<OFGroupStatsEntry> entries = this.entriesSet ? this.entries : parentMessage.entries;
+ if(entries == null)
+ throw new NullPointerException("Property entries must not be null");
+
+ //
+ return new OFGroupStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ }
+
+ }
+
+ static class Builder implements OFGroupStatsReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean entriesSet;
+ private List<OFGroupStatsEntry> entries;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFGroupStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.GROUP;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFGroupStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public List<OFGroupStatsEntry> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFGroupStatsReply.Builder setEntries(List<OFGroupStatsEntry> entries) {
+ this.entries = entries;
+ this.entriesSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFGroupStatsReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ List<OFGroupStatsEntry> entries = this.entriesSet ? this.entries : DEFAULT_ENTRIES;
+ if(entries == null)
+ throw new NullPointerException("Property entries must not be null");
+
+
+ return new OFGroupStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFGroupStatsReply> {
+ @Override
+ public OFGroupStatsReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 19
+ byte type = bb.readByte();
+ if(type != (byte) 0x13)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REPLY(19), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 6
+ short statsType = bb.readShort();
+ if(statsType != (short) 0x6)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.GROUP(6), got="+statsType);
+ Set<OFStatsReplyFlags> flags = OFStatsReplyFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ List<OFGroupStatsEntry> entries = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFGroupStatsEntryVer13.READER);
+
+ OFGroupStatsReplyVer13 groupStatsReplyVer13 = new OFGroupStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", groupStatsReplyVer13);
+ return groupStatsReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFGroupStatsReplyVer13Funnel FUNNEL = new OFGroupStatsReplyVer13Funnel();
+ static class OFGroupStatsReplyVer13Funnel implements Funnel<OFGroupStatsReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFGroupStatsReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 19
+ sink.putByte((byte) 0x13);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property statsType = 6
+ sink.putShort((short) 0x6);
+ OFStatsReplyFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ FunnelUtils.putList(message.entries, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFGroupStatsReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFGroupStatsReplyVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 19
+ bb.writeByte((byte) 0x13);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 6
+ bb.writeShort((short) 0x6);
+ OFStatsReplyFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ ChannelUtils.writeList(bb, message.entries);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFGroupStatsReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("entries=").append(entries);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFGroupStatsReplyVer13 other = (OFGroupStatsReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if (entries == null) {
+ if (other.entries != null)
+ return false;
+ } else if (!entries.equals(other.entries))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * result + ((entries == null) ? 0 : entries.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupStatsRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupStatsRequestVer13.java
new file mode 100644
index 0000000..beee7ec
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupStatsRequestVer13.java
@@ -0,0 +1,410 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFGroupStatsRequestVer13 implements OFGroupStatsRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFGroupStatsRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 24;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsRequestFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsRequestFlags>of();
+ private final static OFGroup DEFAULT_GROUP_ID = OFGroup.ALL;
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsRequestFlags> flags;
+ private final OFGroup group;
+//
+ // Immutable default instance
+ final static OFGroupStatsRequestVer13 DEFAULT = new OFGroupStatsRequestVer13(
+ DEFAULT_XID, DEFAULT_FLAGS, DEFAULT_GROUP_ID
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFGroupStatsRequestVer13(long xid, Set<OFStatsRequestFlags> flags, OFGroup group) {
+ this.xid = xid;
+ this.flags = flags;
+ this.group = group;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.GROUP;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFGroup getGroup() {
+ return group;
+ }
+
+
+
+ public OFGroupStatsRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFGroupStatsRequest.Builder {
+ final OFGroupStatsRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+ private boolean groupSet;
+ private OFGroup group;
+
+ BuilderWithParent(OFGroupStatsRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFGroupStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.GROUP;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFGroupStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public OFGroup getGroup() {
+ return group;
+ }
+
+ @Override
+ public OFGroupStatsRequest.Builder setGroup(OFGroup group) {
+ this.group = group;
+ this.groupSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFGroupStatsRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ OFGroup group = this.groupSet ? this.group : parentMessage.group;
+ if(group == null)
+ throw new NullPointerException("Property group must not be null");
+
+ //
+ return new OFGroupStatsRequestVer13(
+ xid,
+ flags,
+ group
+ );
+ }
+
+ }
+
+ static class Builder implements OFGroupStatsRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+ private boolean groupSet;
+ private OFGroup group;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFGroupStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.GROUP;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFGroupStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public OFGroup getGroup() {
+ return group;
+ }
+
+ @Override
+ public OFGroupStatsRequest.Builder setGroup(OFGroup group) {
+ this.group = group;
+ this.groupSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFGroupStatsRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ OFGroup group = this.groupSet ? this.group : DEFAULT_GROUP_ID;
+ if(group == null)
+ throw new NullPointerException("Property group must not be null");
+
+
+ return new OFGroupStatsRequestVer13(
+ xid,
+ flags,
+ group
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFGroupStatsRequest> {
+ @Override
+ public OFGroupStatsRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 18
+ byte type = bb.readByte();
+ if(type != (byte) 0x12)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REQUEST(18), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 24)
+ throw new OFParseError("Wrong length: Expected=24(24), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 6
+ short statsType = bb.readShort();
+ if(statsType != (short) 0x6)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.GROUP(6), got="+statsType);
+ Set<OFStatsRequestFlags> flags = OFStatsRequestFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ OFGroup group = OFGroup.read4Bytes(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+
+ OFGroupStatsRequestVer13 groupStatsRequestVer13 = new OFGroupStatsRequestVer13(
+ xid,
+ flags,
+ group
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", groupStatsRequestVer13);
+ return groupStatsRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFGroupStatsRequestVer13Funnel FUNNEL = new OFGroupStatsRequestVer13Funnel();
+ static class OFGroupStatsRequestVer13Funnel implements Funnel<OFGroupStatsRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFGroupStatsRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 18
+ sink.putByte((byte) 0x12);
+ // fixed value property length = 24
+ sink.putShort((short) 0x18);
+ sink.putLong(message.xid);
+ // fixed value property statsType = 6
+ sink.putShort((short) 0x6);
+ OFStatsRequestFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ message.group.putTo(sink);
+ // skip pad (4 bytes)
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFGroupStatsRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFGroupStatsRequestVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 18
+ bb.writeByte((byte) 0x12);
+ // fixed value property length = 24
+ bb.writeShort((short) 0x18);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 6
+ bb.writeShort((short) 0x6);
+ OFStatsRequestFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ message.group.write4Bytes(bb);
+ // pad: 4 bytes
+ bb.writeZero(4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFGroupStatsRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("group=").append(group);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFGroupStatsRequestVer13 other = (OFGroupStatsRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if (group == null) {
+ if (other.group != null)
+ return false;
+ } else if (!group.equals(other.group))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * result + ((group == null) ? 0 : group.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupTypeSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupTypeSerializerVer13.java
new file mode 100644
index 0000000..a0e4dcb
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupTypeSerializerVer13.java
@@ -0,0 +1,84 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFGroupType;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+
+public class OFGroupTypeSerializerVer13 {
+
+ public final static byte ALL_VAL = (byte) 0x0;
+ public final static byte SELECT_VAL = (byte) 0x1;
+ public final static byte INDIRECT_VAL = (byte) 0x2;
+ public final static byte FF_VAL = (byte) 0x3;
+
+ public static OFGroupType readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readByte());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, OFGroupType e) {
+ bb.writeByte(toWireValue(e));
+ }
+
+ public static void putTo(OFGroupType e, PrimitiveSink sink) {
+ sink.putByte(toWireValue(e));
+ }
+
+ public static OFGroupType ofWireValue(byte val) {
+ switch(val) {
+ case ALL_VAL:
+ return OFGroupType.ALL;
+ case SELECT_VAL:
+ return OFGroupType.SELECT;
+ case INDIRECT_VAL:
+ return OFGroupType.INDIRECT;
+ case FF_VAL:
+ return OFGroupType.FF;
+ default:
+ throw new IllegalArgumentException("Illegal wire value for type OFGroupType in version 1.3: " + val);
+ }
+ }
+
+
+ public static byte toWireValue(OFGroupType e) {
+ switch(e) {
+ case ALL:
+ return ALL_VAL;
+ case SELECT:
+ return SELECT_VAL;
+ case INDIRECT:
+ return INDIRECT_VAL;
+ case FF:
+ return FF_VAL;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFGroupType in version 1.3: " + e);
+ }
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFHelloElemTypeSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFHelloElemTypeSerializerVer13.java
new file mode 100644
index 0000000..2ad95cc
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFHelloElemTypeSerializerVer13.java
@@ -0,0 +1,69 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFHelloElemType;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+
+public class OFHelloElemTypeSerializerVer13 {
+
+ public final static short VERSIONBITMAP_VAL = (short) 0x1;
+
+ public static OFHelloElemType readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readShort());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, OFHelloElemType e) {
+ bb.writeShort(toWireValue(e));
+ }
+
+ public static void putTo(OFHelloElemType e, PrimitiveSink sink) {
+ sink.putShort(toWireValue(e));
+ }
+
+ public static OFHelloElemType ofWireValue(short val) {
+ switch(val) {
+ case VERSIONBITMAP_VAL:
+ return OFHelloElemType.VERSIONBITMAP;
+ default:
+ throw new IllegalArgumentException("Illegal wire value for type OFHelloElemType in version 1.3: " + val);
+ }
+ }
+
+
+ public static short toWireValue(OFHelloElemType e) {
+ switch(e) {
+ case VERSIONBITMAP:
+ return VERSIONBITMAP_VAL;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFHelloElemType in version 1.3: " + e);
+ }
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFHelloElemVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFHelloElemVer13.java
new file mode 100644
index 0000000..8a0d269
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFHelloElemVer13.java
@@ -0,0 +1,53 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_virtual_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.jboss.netty.buffer.ChannelBuffer;
+
+abstract class OFHelloElemVer13 {
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 4;
+
+
+ public final static OFHelloElemVer13.Reader READER = new Reader();
+
+ static class Reader implements OFMessageReader<OFHelloElem> {
+ @Override
+ public OFHelloElem readFrom(ChannelBuffer bb) throws OFParseError {
+ if(bb.readableBytes() < MINIMUM_LENGTH)
+ return null;
+ int start = bb.readerIndex();
+ short type = bb.readShort();
+ bb.readerIndex(start);
+ switch(type) {
+ case (short) 0x1:
+ // discriminator value 0x1=0x1 for class OFHelloElemVersionbitmapVer13
+ return OFHelloElemVersionbitmapVer13.READER.readFrom(bb);
+ default:
+ throw new OFParseError("Unknown value for discriminator type of class OFHelloElemVer13: " + type);
+ }
+ }
+ }
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFHelloElemVersionbitmapVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFHelloElemVersionbitmapVer13.java
new file mode 100644
index 0000000..73d6d29
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFHelloElemVersionbitmapVer13.java
@@ -0,0 +1,274 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFHelloElemVersionbitmapVer13 implements OFHelloElemVersionbitmap {
+ private static final Logger logger = LoggerFactory.getLogger(OFHelloElemVersionbitmapVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 4;
+
+ private final static List<U32> DEFAULT_BITMAPS = ImmutableList.<U32>of();
+
+ // OF message fields
+ private final List<U32> bitmaps;
+//
+ // Immutable default instance
+ final static OFHelloElemVersionbitmapVer13 DEFAULT = new OFHelloElemVersionbitmapVer13(
+ DEFAULT_BITMAPS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFHelloElemVersionbitmapVer13(List<U32> bitmaps) {
+ this.bitmaps = bitmaps;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public int getType() {
+ return 0x1;
+ }
+
+ @Override
+ public List<U32> getBitmaps() {
+ return bitmaps;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFHelloElemVersionbitmap.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFHelloElemVersionbitmap.Builder {
+ final OFHelloElemVersionbitmapVer13 parentMessage;
+
+ // OF message fields
+ private boolean bitmapsSet;
+ private List<U32> bitmaps;
+
+ BuilderWithParent(OFHelloElemVersionbitmapVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public int getType() {
+ return 0x1;
+ }
+
+ @Override
+ public List<U32> getBitmaps() {
+ return bitmaps;
+ }
+
+ @Override
+ public OFHelloElemVersionbitmap.Builder setBitmaps(List<U32> bitmaps) {
+ this.bitmaps = bitmaps;
+ this.bitmapsSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFHelloElemVersionbitmap build() {
+ List<U32> bitmaps = this.bitmapsSet ? this.bitmaps : parentMessage.bitmaps;
+ if(bitmaps == null)
+ throw new NullPointerException("Property bitmaps must not be null");
+
+ //
+ return new OFHelloElemVersionbitmapVer13(
+ bitmaps
+ );
+ }
+
+ }
+
+ static class Builder implements OFHelloElemVersionbitmap.Builder {
+ // OF message fields
+ private boolean bitmapsSet;
+ private List<U32> bitmaps;
+
+ @Override
+ public int getType() {
+ return 0x1;
+ }
+
+ @Override
+ public List<U32> getBitmaps() {
+ return bitmaps;
+ }
+
+ @Override
+ public OFHelloElemVersionbitmap.Builder setBitmaps(List<U32> bitmaps) {
+ this.bitmaps = bitmaps;
+ this.bitmapsSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFHelloElemVersionbitmap build() {
+ List<U32> bitmaps = this.bitmapsSet ? this.bitmaps : DEFAULT_BITMAPS;
+ if(bitmaps == null)
+ throw new NullPointerException("Property bitmaps must not be null");
+
+
+ return new OFHelloElemVersionbitmapVer13(
+ bitmaps
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFHelloElemVersionbitmap> {
+ @Override
+ public OFHelloElemVersionbitmap readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 0x1
+ short type = bb.readShort();
+ if(type != (short) 0x1)
+ throw new OFParseError("Wrong type: Expected=0x1(0x1), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ List<U32> bitmaps = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), U32.READER);
+
+ OFHelloElemVersionbitmapVer13 helloElemVersionbitmapVer13 = new OFHelloElemVersionbitmapVer13(
+ bitmaps
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", helloElemVersionbitmapVer13);
+ return helloElemVersionbitmapVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFHelloElemVersionbitmapVer13Funnel FUNNEL = new OFHelloElemVersionbitmapVer13Funnel();
+ static class OFHelloElemVersionbitmapVer13Funnel implements Funnel<OFHelloElemVersionbitmapVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFHelloElemVersionbitmapVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 0x1
+ sink.putShort((short) 0x1);
+ // FIXME: skip funnel of length
+ FunnelUtils.putList(message.bitmaps, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFHelloElemVersionbitmapVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFHelloElemVersionbitmapVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property type = 0x1
+ bb.writeShort((short) 0x1);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ ChannelUtils.writeList(bb, message.bitmaps);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFHelloElemVersionbitmapVer13(");
+ b.append("bitmaps=").append(bitmaps);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFHelloElemVersionbitmapVer13 other = (OFHelloElemVersionbitmapVer13) obj;
+
+ if (bitmaps == null) {
+ if (other.bitmaps != null)
+ return false;
+ } else if (!bitmaps.equals(other.bitmaps))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((bitmaps == null) ? 0 : bitmaps.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFHelloFailedCodeSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFHelloFailedCodeSerializerVer13.java
new file mode 100644
index 0000000..dec0f8d
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFHelloFailedCodeSerializerVer13.java
@@ -0,0 +1,74 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFHelloFailedCode;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+
+public class OFHelloFailedCodeSerializerVer13 {
+
+ public final static short INCOMPATIBLE_VAL = (short) 0x0;
+ public final static short EPERM_VAL = (short) 0x1;
+
+ public static OFHelloFailedCode readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readShort());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, OFHelloFailedCode e) {
+ bb.writeShort(toWireValue(e));
+ }
+
+ public static void putTo(OFHelloFailedCode e, PrimitiveSink sink) {
+ sink.putShort(toWireValue(e));
+ }
+
+ public static OFHelloFailedCode ofWireValue(short val) {
+ switch(val) {
+ case INCOMPATIBLE_VAL:
+ return OFHelloFailedCode.INCOMPATIBLE;
+ case EPERM_VAL:
+ return OFHelloFailedCode.EPERM;
+ default:
+ throw new IllegalArgumentException("Illegal wire value for type OFHelloFailedCode in version 1.3: " + val);
+ }
+ }
+
+
+ public static short toWireValue(OFHelloFailedCode e) {
+ switch(e) {
+ case INCOMPATIBLE:
+ return INCOMPATIBLE_VAL;
+ case EPERM:
+ return EPERM_VAL;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFHelloFailedCode in version 1.3: " + e);
+ }
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFHelloFailedErrorMsgVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFHelloFailedErrorMsgVer13.java
new file mode 100644
index 0000000..b87102c
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFHelloFailedErrorMsgVer13.java
@@ -0,0 +1,400 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFHelloFailedErrorMsgVer13 implements OFHelloFailedErrorMsg {
+ private static final Logger logger = LoggerFactory.getLogger(OFHelloFailedErrorMsgVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 12;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static OFErrorCauseData DEFAULT_DATA = OFErrorCauseData.NONE;
+
+ // OF message fields
+ private final long xid;
+ private final OFHelloFailedCode code;
+ private final OFErrorCauseData data;
+//
+
+ // package private constructor - used by readers, builders, and factory
+ OFHelloFailedErrorMsgVer13(long xid, OFHelloFailedCode code, OFErrorCauseData data) {
+ this.xid = xid;
+ this.code = code;
+ this.data = data;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ERROR;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFErrorType getErrType() {
+ return OFErrorType.HELLO_FAILED;
+ }
+
+ @Override
+ public OFHelloFailedCode getCode() {
+ return code;
+ }
+
+ @Override
+ public OFErrorCauseData getData() {
+ return data;
+ }
+
+
+
+ public OFHelloFailedErrorMsg.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFHelloFailedErrorMsg.Builder {
+ final OFHelloFailedErrorMsgVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean codeSet;
+ private OFHelloFailedCode code;
+ private boolean dataSet;
+ private OFErrorCauseData data;
+
+ BuilderWithParent(OFHelloFailedErrorMsgVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ERROR;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFHelloFailedErrorMsg.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorType getErrType() {
+ return OFErrorType.HELLO_FAILED;
+ }
+
+ @Override
+ public OFHelloFailedCode getCode() {
+ return code;
+ }
+
+ @Override
+ public OFHelloFailedErrorMsg.Builder setCode(OFHelloFailedCode code) {
+ this.code = code;
+ this.codeSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorCauseData getData() {
+ return data;
+ }
+
+ @Override
+ public OFHelloFailedErrorMsg.Builder setData(OFErrorCauseData data) {
+ this.data = data;
+ this.dataSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFHelloFailedErrorMsg build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ OFHelloFailedCode code = this.codeSet ? this.code : parentMessage.code;
+ if(code == null)
+ throw new NullPointerException("Property code must not be null");
+ OFErrorCauseData data = this.dataSet ? this.data : parentMessage.data;
+ if(data == null)
+ throw new NullPointerException("Property data must not be null");
+
+ //
+ return new OFHelloFailedErrorMsgVer13(
+ xid,
+ code,
+ data
+ );
+ }
+
+ }
+
+ static class Builder implements OFHelloFailedErrorMsg.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean codeSet;
+ private OFHelloFailedCode code;
+ private boolean dataSet;
+ private OFErrorCauseData data;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ERROR;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFHelloFailedErrorMsg.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorType getErrType() {
+ return OFErrorType.HELLO_FAILED;
+ }
+
+ @Override
+ public OFHelloFailedCode getCode() {
+ return code;
+ }
+
+ @Override
+ public OFHelloFailedErrorMsg.Builder setCode(OFHelloFailedCode code) {
+ this.code = code;
+ this.codeSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorCauseData getData() {
+ return data;
+ }
+
+ @Override
+ public OFHelloFailedErrorMsg.Builder setData(OFErrorCauseData data) {
+ this.data = data;
+ this.dataSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFHelloFailedErrorMsg build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ if(!this.codeSet)
+ throw new IllegalStateException("Property code doesn't have default value -- must be set");
+ if(code == null)
+ throw new NullPointerException("Property code must not be null");
+ OFErrorCauseData data = this.dataSet ? this.data : DEFAULT_DATA;
+ if(data == null)
+ throw new NullPointerException("Property data must not be null");
+
+
+ return new OFHelloFailedErrorMsgVer13(
+ xid,
+ code,
+ data
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFHelloFailedErrorMsg> {
+ @Override
+ public OFHelloFailedErrorMsg readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 1
+ byte type = bb.readByte();
+ if(type != (byte) 0x1)
+ throw new OFParseError("Wrong type: Expected=OFType.ERROR(1), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property errType == 0
+ short errType = bb.readShort();
+ if(errType != (short) 0x0)
+ throw new OFParseError("Wrong errType: Expected=OFErrorType.HELLO_FAILED(0), got="+errType);
+ OFHelloFailedCode code = OFHelloFailedCodeSerializerVer13.readFrom(bb);
+ OFErrorCauseData data = OFErrorCauseData.read(bb, length - (bb.readerIndex() - start), OFVersion.OF_13);
+
+ OFHelloFailedErrorMsgVer13 helloFailedErrorMsgVer13 = new OFHelloFailedErrorMsgVer13(
+ xid,
+ code,
+ data
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", helloFailedErrorMsgVer13);
+ return helloFailedErrorMsgVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFHelloFailedErrorMsgVer13Funnel FUNNEL = new OFHelloFailedErrorMsgVer13Funnel();
+ static class OFHelloFailedErrorMsgVer13Funnel implements Funnel<OFHelloFailedErrorMsgVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFHelloFailedErrorMsgVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 1
+ sink.putByte((byte) 0x1);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property errType = 0
+ sink.putShort((short) 0x0);
+ OFHelloFailedCodeSerializerVer13.putTo(message.code, sink);
+ message.data.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFHelloFailedErrorMsgVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFHelloFailedErrorMsgVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 1
+ bb.writeByte((byte) 0x1);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property errType = 0
+ bb.writeShort((short) 0x0);
+ OFHelloFailedCodeSerializerVer13.writeTo(bb, message.code);
+ message.data.writeTo(bb);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFHelloFailedErrorMsgVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("code=").append(code);
+ b.append(", ");
+ b.append("data=").append(data);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFHelloFailedErrorMsgVer13 other = (OFHelloFailedErrorMsgVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (code == null) {
+ if (other.code != null)
+ return false;
+ } else if (!code.equals(other.code))
+ return false;
+ if (data == null) {
+ if (other.data != null)
+ return false;
+ } else if (!data.equals(other.data))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((code == null) ? 0 : code.hashCode());
+ result = prime * result + ((data == null) ? 0 : data.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFHelloVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFHelloVer13.java
new file mode 100644
index 0000000..b2db9be
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFHelloVer13.java
@@ -0,0 +1,329 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFHelloVer13 implements OFHello {
+ private static final Logger logger = LoggerFactory.getLogger(OFHelloVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 8;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static List<OFHelloElem> DEFAULT_ELEMENTS = ImmutableList.<OFHelloElem>of();
+
+ // OF message fields
+ private final long xid;
+ private final List<OFHelloElem> elements;
+//
+ // Immutable default instance
+ final static OFHelloVer13 DEFAULT = new OFHelloVer13(
+ DEFAULT_XID, DEFAULT_ELEMENTS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFHelloVer13(long xid, List<OFHelloElem> elements) {
+ this.xid = xid;
+ this.elements = elements;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.HELLO;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public List<OFHelloElem> getElements() {
+ return elements;
+ }
+
+
+
+ public OFHello.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFHello.Builder {
+ final OFHelloVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean elementsSet;
+ private List<OFHelloElem> elements;
+
+ BuilderWithParent(OFHelloVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.HELLO;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFHello.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public List<OFHelloElem> getElements() {
+ return elements;
+ }
+
+ @Override
+ public OFHello.Builder setElements(List<OFHelloElem> elements) {
+ this.elements = elements;
+ this.elementsSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFHello build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ List<OFHelloElem> elements = this.elementsSet ? this.elements : parentMessage.elements;
+ if(elements == null)
+ throw new NullPointerException("Property elements must not be null");
+
+ //
+ return new OFHelloVer13(
+ xid,
+ elements
+ );
+ }
+
+ }
+
+ static class Builder implements OFHello.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean elementsSet;
+ private List<OFHelloElem> elements;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.HELLO;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFHello.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public List<OFHelloElem> getElements() {
+ return elements;
+ }
+
+ @Override
+ public OFHello.Builder setElements(List<OFHelloElem> elements) {
+ this.elements = elements;
+ this.elementsSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFHello build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ List<OFHelloElem> elements = this.elementsSet ? this.elements : DEFAULT_ELEMENTS;
+ if(elements == null)
+ throw new NullPointerException("Property elements must not be null");
+
+
+ return new OFHelloVer13(
+ xid,
+ elements
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFHello> {
+ @Override
+ public OFHello readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 0
+ byte type = bb.readByte();
+ if(type != (byte) 0x0)
+ throw new OFParseError("Wrong type: Expected=OFType.HELLO(0), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ List<OFHelloElem> elements = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFHelloElemVer13.READER);
+
+ OFHelloVer13 helloVer13 = new OFHelloVer13(
+ xid,
+ elements
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", helloVer13);
+ return helloVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFHelloVer13Funnel FUNNEL = new OFHelloVer13Funnel();
+ static class OFHelloVer13Funnel implements Funnel<OFHelloVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFHelloVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 0
+ sink.putByte((byte) 0x0);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ FunnelUtils.putList(message.elements, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFHelloVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFHelloVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 0
+ bb.writeByte((byte) 0x0);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ ChannelUtils.writeList(bb, message.elements);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFHelloVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("elements=").append(elements);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFHelloVer13 other = (OFHelloVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (elements == null) {
+ if (other.elements != null)
+ return false;
+ } else if (!elements.equals(other.elements))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((elements == null) ? 0 : elements.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionApplyActionsVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionApplyActionsVer13.java
new file mode 100644
index 0000000..eb2b93e
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionApplyActionsVer13.java
@@ -0,0 +1,279 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFInstructionApplyActionsVer13 implements OFInstructionApplyActions {
+ private static final Logger logger = LoggerFactory.getLogger(OFInstructionApplyActionsVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 8;
+
+ private final static List<OFAction> DEFAULT_ACTIONS = ImmutableList.<OFAction>of();
+
+ // OF message fields
+ private final List<OFAction> actions;
+//
+ // Immutable default instance
+ final static OFInstructionApplyActionsVer13 DEFAULT = new OFInstructionApplyActionsVer13(
+ DEFAULT_ACTIONS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFInstructionApplyActionsVer13(List<OFAction> actions) {
+ this.actions = actions;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFInstructionType getType() {
+ return OFInstructionType.APPLY_ACTIONS;
+ }
+
+ @Override
+ public List<OFAction> getActions() {
+ return actions;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFInstructionApplyActions.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFInstructionApplyActions.Builder {
+ final OFInstructionApplyActionsVer13 parentMessage;
+
+ // OF message fields
+ private boolean actionsSet;
+ private List<OFAction> actions;
+
+ BuilderWithParent(OFInstructionApplyActionsVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFInstructionType getType() {
+ return OFInstructionType.APPLY_ACTIONS;
+ }
+
+ @Override
+ public List<OFAction> getActions() {
+ return actions;
+ }
+
+ @Override
+ public OFInstructionApplyActions.Builder setActions(List<OFAction> actions) {
+ this.actions = actions;
+ this.actionsSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFInstructionApplyActions build() {
+ List<OFAction> actions = this.actionsSet ? this.actions : parentMessage.actions;
+ if(actions == null)
+ throw new NullPointerException("Property actions must not be null");
+
+ //
+ return new OFInstructionApplyActionsVer13(
+ actions
+ );
+ }
+
+ }
+
+ static class Builder implements OFInstructionApplyActions.Builder {
+ // OF message fields
+ private boolean actionsSet;
+ private List<OFAction> actions;
+
+ @Override
+ public OFInstructionType getType() {
+ return OFInstructionType.APPLY_ACTIONS;
+ }
+
+ @Override
+ public List<OFAction> getActions() {
+ return actions;
+ }
+
+ @Override
+ public OFInstructionApplyActions.Builder setActions(List<OFAction> actions) {
+ this.actions = actions;
+ this.actionsSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFInstructionApplyActions build() {
+ List<OFAction> actions = this.actionsSet ? this.actions : DEFAULT_ACTIONS;
+ if(actions == null)
+ throw new NullPointerException("Property actions must not be null");
+
+
+ return new OFInstructionApplyActionsVer13(
+ actions
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFInstructionApplyActions> {
+ @Override
+ public OFInstructionApplyActions readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 4
+ short type = bb.readShort();
+ if(type != (short) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFInstructionType.APPLY_ACTIONS(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ List<OFAction> actions = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFActionVer13.READER);
+
+ OFInstructionApplyActionsVer13 instructionApplyActionsVer13 = new OFInstructionApplyActionsVer13(
+ actions
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", instructionApplyActionsVer13);
+ return instructionApplyActionsVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFInstructionApplyActionsVer13Funnel FUNNEL = new OFInstructionApplyActionsVer13Funnel();
+ static class OFInstructionApplyActionsVer13Funnel implements Funnel<OFInstructionApplyActionsVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFInstructionApplyActionsVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 4
+ sink.putShort((short) 0x4);
+ // FIXME: skip funnel of length
+ // skip pad (4 bytes)
+ FunnelUtils.putList(message.actions, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFInstructionApplyActionsVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFInstructionApplyActionsVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property type = 4
+ bb.writeShort((short) 0x4);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ // pad: 4 bytes
+ bb.writeZero(4);
+ ChannelUtils.writeList(bb, message.actions);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFInstructionApplyActionsVer13(");
+ b.append("actions=").append(actions);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFInstructionApplyActionsVer13 other = (OFInstructionApplyActionsVer13) obj;
+
+ if (actions == null) {
+ if (other.actions != null)
+ return false;
+ } else if (!actions.equals(other.actions))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((actions == null) ? 0 : actions.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionBsnArpOffloadVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionBsnArpOffloadVer13.java
new file mode 100644
index 0000000..4eee210
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionBsnArpOffloadVer13.java
@@ -0,0 +1,187 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFInstructionBsnArpOffloadVer13 implements OFInstructionBsnArpOffload {
+ private static final Logger logger = LoggerFactory.getLogger(OFInstructionBsnArpOffloadVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 16;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFInstructionBsnArpOffloadVer13 DEFAULT = new OFInstructionBsnArpOffloadVer13(
+
+ );
+
+ final static OFInstructionBsnArpOffloadVer13 INSTANCE = new OFInstructionBsnArpOffloadVer13();
+ // private empty constructor - use shared instance!
+ private OFInstructionBsnArpOffloadVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFInstructionType getType() {
+ return OFInstructionType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x1L;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFInstructionBsnArpOffload.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFInstructionBsnArpOffloadVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFInstructionBsnArpOffload> {
+ @Override
+ public OFInstructionBsnArpOffload readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 65535
+ short type = bb.readShort();
+ if(type != (short) 0xffff)
+ throw new OFParseError("Wrong type: Expected=OFInstructionType.EXPERIMENTER(65535), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 16)
+ throw new OFParseError("Wrong length: Expected=16(16), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x1L
+ int subtype = bb.readInt();
+ if(subtype != 0x1)
+ throw new OFParseError("Wrong subtype: Expected=0x1L(0x1L), got="+subtype);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFInstructionBsnArpOffloadVer13Funnel FUNNEL = new OFInstructionBsnArpOffloadVer13Funnel();
+ static class OFInstructionBsnArpOffloadVer13Funnel implements Funnel<OFInstructionBsnArpOffloadVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFInstructionBsnArpOffloadVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 65535
+ sink.putShort((short) 0xffff);
+ // fixed value property length = 16
+ sink.putShort((short) 0x10);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x1L
+ sink.putInt(0x1);
+ // skip pad (4 bytes)
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFInstructionBsnArpOffloadVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFInstructionBsnArpOffloadVer13 message) {
+ // fixed value property type = 65535
+ bb.writeShort((short) 0xffff);
+ // fixed value property length = 16
+ bb.writeShort((short) 0x10);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x1L
+ bb.writeInt(0x1);
+ // pad: 4 bytes
+ bb.writeZero(4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFInstructionBsnArpOffloadVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionBsnDenyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionBsnDenyVer13.java
new file mode 100644
index 0000000..75b9188
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionBsnDenyVer13.java
@@ -0,0 +1,187 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFInstructionBsnDenyVer13 implements OFInstructionBsnDeny {
+ private static final Logger logger = LoggerFactory.getLogger(OFInstructionBsnDenyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 16;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFInstructionBsnDenyVer13 DEFAULT = new OFInstructionBsnDenyVer13(
+
+ );
+
+ final static OFInstructionBsnDenyVer13 INSTANCE = new OFInstructionBsnDenyVer13();
+ // private empty constructor - use shared instance!
+ private OFInstructionBsnDenyVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFInstructionType getType() {
+ return OFInstructionType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x5L;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFInstructionBsnDeny.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFInstructionBsnDenyVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFInstructionBsnDeny> {
+ @Override
+ public OFInstructionBsnDeny readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 65535
+ short type = bb.readShort();
+ if(type != (short) 0xffff)
+ throw new OFParseError("Wrong type: Expected=OFInstructionType.EXPERIMENTER(65535), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 16)
+ throw new OFParseError("Wrong length: Expected=16(16), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x5L
+ int subtype = bb.readInt();
+ if(subtype != 0x5)
+ throw new OFParseError("Wrong subtype: Expected=0x5L(0x5L), got="+subtype);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFInstructionBsnDenyVer13Funnel FUNNEL = new OFInstructionBsnDenyVer13Funnel();
+ static class OFInstructionBsnDenyVer13Funnel implements Funnel<OFInstructionBsnDenyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFInstructionBsnDenyVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 65535
+ sink.putShort((short) 0xffff);
+ // fixed value property length = 16
+ sink.putShort((short) 0x10);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x5L
+ sink.putInt(0x5);
+ // skip pad (4 bytes)
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFInstructionBsnDenyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFInstructionBsnDenyVer13 message) {
+ // fixed value property type = 65535
+ bb.writeShort((short) 0xffff);
+ // fixed value property length = 16
+ bb.writeShort((short) 0x10);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x5L
+ bb.writeInt(0x5);
+ // pad: 4 bytes
+ bb.writeZero(4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFInstructionBsnDenyVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionBsnDhcpOffloadVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionBsnDhcpOffloadVer13.java
new file mode 100644
index 0000000..c46fc78
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionBsnDhcpOffloadVer13.java
@@ -0,0 +1,187 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFInstructionBsnDhcpOffloadVer13 implements OFInstructionBsnDhcpOffload {
+ private static final Logger logger = LoggerFactory.getLogger(OFInstructionBsnDhcpOffloadVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 16;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFInstructionBsnDhcpOffloadVer13 DEFAULT = new OFInstructionBsnDhcpOffloadVer13(
+
+ );
+
+ final static OFInstructionBsnDhcpOffloadVer13 INSTANCE = new OFInstructionBsnDhcpOffloadVer13();
+ // private empty constructor - use shared instance!
+ private OFInstructionBsnDhcpOffloadVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFInstructionType getType() {
+ return OFInstructionType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x2L;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFInstructionBsnDhcpOffload.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFInstructionBsnDhcpOffloadVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFInstructionBsnDhcpOffload> {
+ @Override
+ public OFInstructionBsnDhcpOffload readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 65535
+ short type = bb.readShort();
+ if(type != (short) 0xffff)
+ throw new OFParseError("Wrong type: Expected=OFInstructionType.EXPERIMENTER(65535), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 16)
+ throw new OFParseError("Wrong length: Expected=16(16), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x2L
+ int subtype = bb.readInt();
+ if(subtype != 0x2)
+ throw new OFParseError("Wrong subtype: Expected=0x2L(0x2L), got="+subtype);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFInstructionBsnDhcpOffloadVer13Funnel FUNNEL = new OFInstructionBsnDhcpOffloadVer13Funnel();
+ static class OFInstructionBsnDhcpOffloadVer13Funnel implements Funnel<OFInstructionBsnDhcpOffloadVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFInstructionBsnDhcpOffloadVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 65535
+ sink.putShort((short) 0xffff);
+ // fixed value property length = 16
+ sink.putShort((short) 0x10);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x2L
+ sink.putInt(0x2);
+ // skip pad (4 bytes)
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFInstructionBsnDhcpOffloadVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFInstructionBsnDhcpOffloadVer13 message) {
+ // fixed value property type = 65535
+ bb.writeShort((short) 0xffff);
+ // fixed value property length = 16
+ bb.writeShort((short) 0x10);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x2L
+ bb.writeInt(0x2);
+ // pad: 4 bytes
+ bb.writeZero(4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFInstructionBsnDhcpOffloadVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionBsnDisableSplitHorizonCheckVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionBsnDisableSplitHorizonCheckVer13.java
new file mode 100644
index 0000000..e69c09b
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionBsnDisableSplitHorizonCheckVer13.java
@@ -0,0 +1,187 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFInstructionBsnDisableSplitHorizonCheckVer13 implements OFInstructionBsnDisableSplitHorizonCheck {
+ private static final Logger logger = LoggerFactory.getLogger(OFInstructionBsnDisableSplitHorizonCheckVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 16;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFInstructionBsnDisableSplitHorizonCheckVer13 DEFAULT = new OFInstructionBsnDisableSplitHorizonCheckVer13(
+
+ );
+
+ final static OFInstructionBsnDisableSplitHorizonCheckVer13 INSTANCE = new OFInstructionBsnDisableSplitHorizonCheckVer13();
+ // private empty constructor - use shared instance!
+ private OFInstructionBsnDisableSplitHorizonCheckVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFInstructionType getType() {
+ return OFInstructionType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x3L;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFInstructionBsnDisableSplitHorizonCheck.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFInstructionBsnDisableSplitHorizonCheckVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFInstructionBsnDisableSplitHorizonCheck> {
+ @Override
+ public OFInstructionBsnDisableSplitHorizonCheck readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 65535
+ short type = bb.readShort();
+ if(type != (short) 0xffff)
+ throw new OFParseError("Wrong type: Expected=OFInstructionType.EXPERIMENTER(65535), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 16)
+ throw new OFParseError("Wrong length: Expected=16(16), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x3L
+ int subtype = bb.readInt();
+ if(subtype != 0x3)
+ throw new OFParseError("Wrong subtype: Expected=0x3L(0x3L), got="+subtype);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFInstructionBsnDisableSplitHorizonCheckVer13Funnel FUNNEL = new OFInstructionBsnDisableSplitHorizonCheckVer13Funnel();
+ static class OFInstructionBsnDisableSplitHorizonCheckVer13Funnel implements Funnel<OFInstructionBsnDisableSplitHorizonCheckVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFInstructionBsnDisableSplitHorizonCheckVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 65535
+ sink.putShort((short) 0xffff);
+ // fixed value property length = 16
+ sink.putShort((short) 0x10);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x3L
+ sink.putInt(0x3);
+ // skip pad (4 bytes)
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFInstructionBsnDisableSplitHorizonCheckVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFInstructionBsnDisableSplitHorizonCheckVer13 message) {
+ // fixed value property type = 65535
+ bb.writeShort((short) 0xffff);
+ // fixed value property length = 16
+ bb.writeShort((short) 0x10);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x3L
+ bb.writeInt(0x3);
+ // pad: 4 bytes
+ bb.writeZero(4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFInstructionBsnDisableSplitHorizonCheckVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionBsnDisableSrcMacCheckVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionBsnDisableSrcMacCheckVer13.java
new file mode 100644
index 0000000..868042f
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionBsnDisableSrcMacCheckVer13.java
@@ -0,0 +1,187 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFInstructionBsnDisableSrcMacCheckVer13 implements OFInstructionBsnDisableSrcMacCheck {
+ private static final Logger logger = LoggerFactory.getLogger(OFInstructionBsnDisableSrcMacCheckVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 16;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFInstructionBsnDisableSrcMacCheckVer13 DEFAULT = new OFInstructionBsnDisableSrcMacCheckVer13(
+
+ );
+
+ final static OFInstructionBsnDisableSrcMacCheckVer13 INSTANCE = new OFInstructionBsnDisableSrcMacCheckVer13();
+ // private empty constructor - use shared instance!
+ private OFInstructionBsnDisableSrcMacCheckVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFInstructionType getType() {
+ return OFInstructionType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x0L;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFInstructionBsnDisableSrcMacCheck.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFInstructionBsnDisableSrcMacCheckVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFInstructionBsnDisableSrcMacCheck> {
+ @Override
+ public OFInstructionBsnDisableSrcMacCheck readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 65535
+ short type = bb.readShort();
+ if(type != (short) 0xffff)
+ throw new OFParseError("Wrong type: Expected=OFInstructionType.EXPERIMENTER(65535), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 16)
+ throw new OFParseError("Wrong length: Expected=16(16), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x0L
+ int subtype = bb.readInt();
+ if(subtype != 0x0)
+ throw new OFParseError("Wrong subtype: Expected=0x0L(0x0L), got="+subtype);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFInstructionBsnDisableSrcMacCheckVer13Funnel FUNNEL = new OFInstructionBsnDisableSrcMacCheckVer13Funnel();
+ static class OFInstructionBsnDisableSrcMacCheckVer13Funnel implements Funnel<OFInstructionBsnDisableSrcMacCheckVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFInstructionBsnDisableSrcMacCheckVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 65535
+ sink.putShort((short) 0xffff);
+ // fixed value property length = 16
+ sink.putShort((short) 0x10);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x0L
+ sink.putInt(0x0);
+ // skip pad (4 bytes)
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFInstructionBsnDisableSrcMacCheckVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFInstructionBsnDisableSrcMacCheckVer13 message) {
+ // fixed value property type = 65535
+ bb.writeShort((short) 0xffff);
+ // fixed value property length = 16
+ bb.writeShort((short) 0x10);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x0L
+ bb.writeInt(0x0);
+ // pad: 4 bytes
+ bb.writeZero(4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFInstructionBsnDisableSrcMacCheckVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionBsnDisableVlanCountersVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionBsnDisableVlanCountersVer13.java
new file mode 100644
index 0000000..9e83b3b
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionBsnDisableVlanCountersVer13.java
@@ -0,0 +1,187 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFInstructionBsnDisableVlanCountersVer13 implements OFInstructionBsnDisableVlanCounters {
+ private static final Logger logger = LoggerFactory.getLogger(OFInstructionBsnDisableVlanCountersVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 16;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFInstructionBsnDisableVlanCountersVer13 DEFAULT = new OFInstructionBsnDisableVlanCountersVer13(
+
+ );
+
+ final static OFInstructionBsnDisableVlanCountersVer13 INSTANCE = new OFInstructionBsnDisableVlanCountersVer13();
+ // private empty constructor - use shared instance!
+ private OFInstructionBsnDisableVlanCountersVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFInstructionType getType() {
+ return OFInstructionType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x9L;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFInstructionBsnDisableVlanCounters.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFInstructionBsnDisableVlanCountersVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFInstructionBsnDisableVlanCounters> {
+ @Override
+ public OFInstructionBsnDisableVlanCounters readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 65535
+ short type = bb.readShort();
+ if(type != (short) 0xffff)
+ throw new OFParseError("Wrong type: Expected=OFInstructionType.EXPERIMENTER(65535), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 16)
+ throw new OFParseError("Wrong length: Expected=16(16), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x9L
+ int subtype = bb.readInt();
+ if(subtype != 0x9)
+ throw new OFParseError("Wrong subtype: Expected=0x9L(0x9L), got="+subtype);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFInstructionBsnDisableVlanCountersVer13Funnel FUNNEL = new OFInstructionBsnDisableVlanCountersVer13Funnel();
+ static class OFInstructionBsnDisableVlanCountersVer13Funnel implements Funnel<OFInstructionBsnDisableVlanCountersVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFInstructionBsnDisableVlanCountersVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 65535
+ sink.putShort((short) 0xffff);
+ // fixed value property length = 16
+ sink.putShort((short) 0x10);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x9L
+ sink.putInt(0x9);
+ // skip pad (4 bytes)
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFInstructionBsnDisableVlanCountersVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFInstructionBsnDisableVlanCountersVer13 message) {
+ // fixed value property type = 65535
+ bb.writeShort((short) 0xffff);
+ // fixed value property length = 16
+ bb.writeShort((short) 0x10);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x9L
+ bb.writeInt(0x9);
+ // pad: 4 bytes
+ bb.writeZero(4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFInstructionBsnDisableVlanCountersVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionBsnPacketOfDeathVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionBsnPacketOfDeathVer13.java
new file mode 100644
index 0000000..fd1b02d
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionBsnPacketOfDeathVer13.java
@@ -0,0 +1,187 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFInstructionBsnPacketOfDeathVer13 implements OFInstructionBsnPacketOfDeath {
+ private static final Logger logger = LoggerFactory.getLogger(OFInstructionBsnPacketOfDeathVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 16;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFInstructionBsnPacketOfDeathVer13 DEFAULT = new OFInstructionBsnPacketOfDeathVer13(
+
+ );
+
+ final static OFInstructionBsnPacketOfDeathVer13 INSTANCE = new OFInstructionBsnPacketOfDeathVer13();
+ // private empty constructor - use shared instance!
+ private OFInstructionBsnPacketOfDeathVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFInstructionType getType() {
+ return OFInstructionType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x6L;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFInstructionBsnPacketOfDeath.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFInstructionBsnPacketOfDeathVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFInstructionBsnPacketOfDeath> {
+ @Override
+ public OFInstructionBsnPacketOfDeath readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 65535
+ short type = bb.readShort();
+ if(type != (short) 0xffff)
+ throw new OFParseError("Wrong type: Expected=OFInstructionType.EXPERIMENTER(65535), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 16)
+ throw new OFParseError("Wrong length: Expected=16(16), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x6L
+ int subtype = bb.readInt();
+ if(subtype != 0x6)
+ throw new OFParseError("Wrong subtype: Expected=0x6L(0x6L), got="+subtype);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFInstructionBsnPacketOfDeathVer13Funnel FUNNEL = new OFInstructionBsnPacketOfDeathVer13Funnel();
+ static class OFInstructionBsnPacketOfDeathVer13Funnel implements Funnel<OFInstructionBsnPacketOfDeathVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFInstructionBsnPacketOfDeathVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 65535
+ sink.putShort((short) 0xffff);
+ // fixed value property length = 16
+ sink.putShort((short) 0x10);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x6L
+ sink.putInt(0x6);
+ // skip pad (4 bytes)
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFInstructionBsnPacketOfDeathVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFInstructionBsnPacketOfDeathVer13 message) {
+ // fixed value property type = 65535
+ bb.writeShort((short) 0xffff);
+ // fixed value property length = 16
+ bb.writeShort((short) 0x10);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x6L
+ bb.writeInt(0x6);
+ // pad: 4 bytes
+ bb.writeZero(4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFInstructionBsnPacketOfDeathVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionBsnPermitVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionBsnPermitVer13.java
new file mode 100644
index 0000000..4252f28
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionBsnPermitVer13.java
@@ -0,0 +1,187 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFInstructionBsnPermitVer13 implements OFInstructionBsnPermit {
+ private static final Logger logger = LoggerFactory.getLogger(OFInstructionBsnPermitVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 16;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFInstructionBsnPermitVer13 DEFAULT = new OFInstructionBsnPermitVer13(
+
+ );
+
+ final static OFInstructionBsnPermitVer13 INSTANCE = new OFInstructionBsnPermitVer13();
+ // private empty constructor - use shared instance!
+ private OFInstructionBsnPermitVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFInstructionType getType() {
+ return OFInstructionType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x4L;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFInstructionBsnPermit.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFInstructionBsnPermitVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFInstructionBsnPermit> {
+ @Override
+ public OFInstructionBsnPermit readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 65535
+ short type = bb.readShort();
+ if(type != (short) 0xffff)
+ throw new OFParseError("Wrong type: Expected=OFInstructionType.EXPERIMENTER(65535), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 16)
+ throw new OFParseError("Wrong length: Expected=16(16), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x4L
+ int subtype = bb.readInt();
+ if(subtype != 0x4)
+ throw new OFParseError("Wrong subtype: Expected=0x4L(0x4L), got="+subtype);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFInstructionBsnPermitVer13Funnel FUNNEL = new OFInstructionBsnPermitVer13Funnel();
+ static class OFInstructionBsnPermitVer13Funnel implements Funnel<OFInstructionBsnPermitVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFInstructionBsnPermitVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 65535
+ sink.putShort((short) 0xffff);
+ // fixed value property length = 16
+ sink.putShort((short) 0x10);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x4L
+ sink.putInt(0x4);
+ // skip pad (4 bytes)
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFInstructionBsnPermitVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFInstructionBsnPermitVer13 message) {
+ // fixed value property type = 65535
+ bb.writeShort((short) 0xffff);
+ // fixed value property length = 16
+ bb.writeShort((short) 0x10);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x4L
+ bb.writeInt(0x4);
+ // pad: 4 bytes
+ bb.writeZero(4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFInstructionBsnPermitVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionBsnPrioritizePdusVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionBsnPrioritizePdusVer13.java
new file mode 100644
index 0000000..9079a8d
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionBsnPrioritizePdusVer13.java
@@ -0,0 +1,187 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFInstructionBsnPrioritizePdusVer13 implements OFInstructionBsnPrioritizePdus {
+ private static final Logger logger = LoggerFactory.getLogger(OFInstructionBsnPrioritizePdusVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 16;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFInstructionBsnPrioritizePdusVer13 DEFAULT = new OFInstructionBsnPrioritizePdusVer13(
+
+ );
+
+ final static OFInstructionBsnPrioritizePdusVer13 INSTANCE = new OFInstructionBsnPrioritizePdusVer13();
+ // private empty constructor - use shared instance!
+ private OFInstructionBsnPrioritizePdusVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFInstructionType getType() {
+ return OFInstructionType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x7L;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFInstructionBsnPrioritizePdus.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFInstructionBsnPrioritizePdusVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFInstructionBsnPrioritizePdus> {
+ @Override
+ public OFInstructionBsnPrioritizePdus readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 65535
+ short type = bb.readShort();
+ if(type != (short) 0xffff)
+ throw new OFParseError("Wrong type: Expected=OFInstructionType.EXPERIMENTER(65535), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 16)
+ throw new OFParseError("Wrong length: Expected=16(16), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x7L
+ int subtype = bb.readInt();
+ if(subtype != 0x7)
+ throw new OFParseError("Wrong subtype: Expected=0x7L(0x7L), got="+subtype);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFInstructionBsnPrioritizePdusVer13Funnel FUNNEL = new OFInstructionBsnPrioritizePdusVer13Funnel();
+ static class OFInstructionBsnPrioritizePdusVer13Funnel implements Funnel<OFInstructionBsnPrioritizePdusVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFInstructionBsnPrioritizePdusVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 65535
+ sink.putShort((short) 0xffff);
+ // fixed value property length = 16
+ sink.putShort((short) 0x10);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x7L
+ sink.putInt(0x7);
+ // skip pad (4 bytes)
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFInstructionBsnPrioritizePdusVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFInstructionBsnPrioritizePdusVer13 message) {
+ // fixed value property type = 65535
+ bb.writeShort((short) 0xffff);
+ // fixed value property length = 16
+ bb.writeShort((short) 0x10);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x7L
+ bb.writeInt(0x7);
+ // pad: 4 bytes
+ bb.writeZero(4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFInstructionBsnPrioritizePdusVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionBsnRequireVlanXlateVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionBsnRequireVlanXlateVer13.java
new file mode 100644
index 0000000..efd15dc
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionBsnRequireVlanXlateVer13.java
@@ -0,0 +1,187 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFInstructionBsnRequireVlanXlateVer13 implements OFInstructionBsnRequireVlanXlate {
+ private static final Logger logger = LoggerFactory.getLogger(OFInstructionBsnRequireVlanXlateVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 16;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFInstructionBsnRequireVlanXlateVer13 DEFAULT = new OFInstructionBsnRequireVlanXlateVer13(
+
+ );
+
+ final static OFInstructionBsnRequireVlanXlateVer13 INSTANCE = new OFInstructionBsnRequireVlanXlateVer13();
+ // private empty constructor - use shared instance!
+ private OFInstructionBsnRequireVlanXlateVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFInstructionType getType() {
+ return OFInstructionType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x8L;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFInstructionBsnRequireVlanXlate.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFInstructionBsnRequireVlanXlateVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFInstructionBsnRequireVlanXlate> {
+ @Override
+ public OFInstructionBsnRequireVlanXlate readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 65535
+ short type = bb.readShort();
+ if(type != (short) 0xffff)
+ throw new OFParseError("Wrong type: Expected=OFInstructionType.EXPERIMENTER(65535), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 16)
+ throw new OFParseError("Wrong length: Expected=16(16), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x8L
+ int subtype = bb.readInt();
+ if(subtype != 0x8)
+ throw new OFParseError("Wrong subtype: Expected=0x8L(0x8L), got="+subtype);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFInstructionBsnRequireVlanXlateVer13Funnel FUNNEL = new OFInstructionBsnRequireVlanXlateVer13Funnel();
+ static class OFInstructionBsnRequireVlanXlateVer13Funnel implements Funnel<OFInstructionBsnRequireVlanXlateVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFInstructionBsnRequireVlanXlateVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 65535
+ sink.putShort((short) 0xffff);
+ // fixed value property length = 16
+ sink.putShort((short) 0x10);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x8L
+ sink.putInt(0x8);
+ // skip pad (4 bytes)
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFInstructionBsnRequireVlanXlateVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFInstructionBsnRequireVlanXlateVer13 message) {
+ // fixed value property type = 65535
+ bb.writeShort((short) 0xffff);
+ // fixed value property length = 16
+ bb.writeShort((short) 0x10);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x8L
+ bb.writeInt(0x8);
+ // pad: 4 bytes
+ bb.writeZero(4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFInstructionBsnRequireVlanXlateVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionBsnVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionBsnVer13.java
new file mode 100644
index 0000000..5ec798b
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionBsnVer13.java
@@ -0,0 +1,91 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_virtual_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.jboss.netty.buffer.ChannelBuffer;
+
+abstract class OFInstructionBsnVer13 {
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 16;
+
+
+ public final static OFInstructionBsnVer13.Reader READER = new Reader();
+
+ static class Reader implements OFMessageReader<OFInstructionBsn> {
+ @Override
+ public OFInstructionBsn readFrom(ChannelBuffer bb) throws OFParseError {
+ if(bb.readableBytes() < MINIMUM_LENGTH)
+ return null;
+ int start = bb.readerIndex();
+ // fixed value property type == 65535
+ short type = bb.readShort();
+ if(type != (short) 0xffff)
+ throw new OFParseError("Wrong type: Expected=OFInstructionType.EXPERIMENTER(65535), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ int subtype = bb.readInt();
+ bb.readerIndex(start);
+ switch(subtype) {
+ case 0x1:
+ // discriminator value 0x1L=0x1L for class OFInstructionBsnArpOffloadVer13
+ return OFInstructionBsnArpOffloadVer13.READER.readFrom(bb);
+ case 0x5:
+ // discriminator value 0x5L=0x5L for class OFInstructionBsnDenyVer13
+ return OFInstructionBsnDenyVer13.READER.readFrom(bb);
+ case 0x2:
+ // discriminator value 0x2L=0x2L for class OFInstructionBsnDhcpOffloadVer13
+ return OFInstructionBsnDhcpOffloadVer13.READER.readFrom(bb);
+ case 0x3:
+ // discriminator value 0x3L=0x3L for class OFInstructionBsnDisableSplitHorizonCheckVer13
+ return OFInstructionBsnDisableSplitHorizonCheckVer13.READER.readFrom(bb);
+ case 0x0:
+ // discriminator value 0x0L=0x0L for class OFInstructionBsnDisableSrcMacCheckVer13
+ return OFInstructionBsnDisableSrcMacCheckVer13.READER.readFrom(bb);
+ case 0x9:
+ // discriminator value 0x9L=0x9L for class OFInstructionBsnDisableVlanCountersVer13
+ return OFInstructionBsnDisableVlanCountersVer13.READER.readFrom(bb);
+ case 0x6:
+ // discriminator value 0x6L=0x6L for class OFInstructionBsnPacketOfDeathVer13
+ return OFInstructionBsnPacketOfDeathVer13.READER.readFrom(bb);
+ case 0x4:
+ // discriminator value 0x4L=0x4L for class OFInstructionBsnPermitVer13
+ return OFInstructionBsnPermitVer13.READER.readFrom(bb);
+ case 0x7:
+ // discriminator value 0x7L=0x7L for class OFInstructionBsnPrioritizePdusVer13
+ return OFInstructionBsnPrioritizePdusVer13.READER.readFrom(bb);
+ case 0x8:
+ // discriminator value 0x8L=0x8L for class OFInstructionBsnRequireVlanXlateVer13
+ return OFInstructionBsnRequireVlanXlateVer13.READER.readFrom(bb);
+ default:
+ throw new OFParseError("Unknown value for discriminator subtype of class OFInstructionBsnVer13: " + subtype);
+ }
+ }
+ }
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionClearActionsVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionClearActionsVer13.java
new file mode 100644
index 0000000..f35370b
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionClearActionsVer13.java
@@ -0,0 +1,161 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFInstructionClearActionsVer13 implements OFInstructionClearActions {
+ private static final Logger logger = LoggerFactory.getLogger(OFInstructionClearActionsVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFInstructionClearActionsVer13 DEFAULT = new OFInstructionClearActionsVer13(
+
+ );
+
+ final static OFInstructionClearActionsVer13 INSTANCE = new OFInstructionClearActionsVer13();
+ // private empty constructor - use shared instance!
+ private OFInstructionClearActionsVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFInstructionType getType() {
+ return OFInstructionType.CLEAR_ACTIONS;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFInstructionClearActions.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFInstructionClearActionsVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFInstructionClearActions> {
+ @Override
+ public OFInstructionClearActions readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 5
+ short type = bb.readShort();
+ if(type != (short) 0x5)
+ throw new OFParseError("Wrong type: Expected=OFInstructionType.CLEAR_ACTIONS(5), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 8)
+ throw new OFParseError("Wrong length: Expected=8(8), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFInstructionClearActionsVer13Funnel FUNNEL = new OFInstructionClearActionsVer13Funnel();
+ static class OFInstructionClearActionsVer13Funnel implements Funnel<OFInstructionClearActionsVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFInstructionClearActionsVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 5
+ sink.putShort((short) 0x5);
+ // fixed value property length = 8
+ sink.putShort((short) 0x8);
+ // skip pad (4 bytes)
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFInstructionClearActionsVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFInstructionClearActionsVer13 message) {
+ // fixed value property type = 5
+ bb.writeShort((short) 0x5);
+ // fixed value property length = 8
+ bb.writeShort((short) 0x8);
+ // pad: 4 bytes
+ bb.writeZero(4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFInstructionClearActionsVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionExperimenterVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionExperimenterVer13.java
new file mode 100644
index 0000000..54b3c0d
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionExperimenterVer13.java
@@ -0,0 +1,60 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_virtual_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.jboss.netty.buffer.ChannelBuffer;
+
+abstract class OFInstructionExperimenterVer13 {
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 8;
+
+
+ public final static OFInstructionExperimenterVer13.Reader READER = new Reader();
+
+ static class Reader implements OFMessageReader<OFInstructionExperimenter> {
+ @Override
+ public OFInstructionExperimenter readFrom(ChannelBuffer bb) throws OFParseError {
+ if(bb.readableBytes() < MINIMUM_LENGTH)
+ return null;
+ int start = bb.readerIndex();
+ // fixed value property type == 65535
+ short type = bb.readShort();
+ if(type != (short) 0xffff)
+ throw new OFParseError("Wrong type: Expected=OFInstructionType.EXPERIMENTER(65535), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ int experimenter = bb.readInt();
+ bb.readerIndex(start);
+ switch(experimenter) {
+ case 0x5c16c7:
+ // discriminator value 0x5c16c7L=0x5c16c7L for class OFInstructionBsnVer13
+ return OFInstructionBsnVer13.READER.readFrom(bb);
+ default:
+ throw new OFParseError("Unknown value for discriminator experimenter of class OFInstructionExperimenterVer13: " + experimenter);
+ }
+ }
+ }
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionGotoTableVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionGotoTableVer13.java
new file mode 100644
index 0000000..d6fa64c
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionGotoTableVer13.java
@@ -0,0 +1,272 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFInstructionGotoTableVer13 implements OFInstructionGotoTable {
+ private static final Logger logger = LoggerFactory.getLogger(OFInstructionGotoTableVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static TableId DEFAULT_TABLE_ID = TableId.ALL;
+
+ // OF message fields
+ private final TableId tableId;
+//
+ // Immutable default instance
+ final static OFInstructionGotoTableVer13 DEFAULT = new OFInstructionGotoTableVer13(
+ DEFAULT_TABLE_ID
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFInstructionGotoTableVer13(TableId tableId) {
+ this.tableId = tableId;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFInstructionType getType() {
+ return OFInstructionType.GOTO_TABLE;
+ }
+
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFInstructionGotoTable.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFInstructionGotoTable.Builder {
+ final OFInstructionGotoTableVer13 parentMessage;
+
+ // OF message fields
+ private boolean tableIdSet;
+ private TableId tableId;
+
+ BuilderWithParent(OFInstructionGotoTableVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFInstructionType getType() {
+ return OFInstructionType.GOTO_TABLE;
+ }
+
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFInstructionGotoTable.Builder setTableId(TableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFInstructionGotoTable build() {
+ TableId tableId = this.tableIdSet ? this.tableId : parentMessage.tableId;
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+
+ //
+ return new OFInstructionGotoTableVer13(
+ tableId
+ );
+ }
+
+ }
+
+ static class Builder implements OFInstructionGotoTable.Builder {
+ // OF message fields
+ private boolean tableIdSet;
+ private TableId tableId;
+
+ @Override
+ public OFInstructionType getType() {
+ return OFInstructionType.GOTO_TABLE;
+ }
+
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFInstructionGotoTable.Builder setTableId(TableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFInstructionGotoTable build() {
+ TableId tableId = this.tableIdSet ? this.tableId : DEFAULT_TABLE_ID;
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+
+
+ return new OFInstructionGotoTableVer13(
+ tableId
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFInstructionGotoTable> {
+ @Override
+ public OFInstructionGotoTable readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 1
+ short type = bb.readShort();
+ if(type != (short) 0x1)
+ throw new OFParseError("Wrong type: Expected=OFInstructionType.GOTO_TABLE(1), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 8)
+ throw new OFParseError("Wrong length: Expected=8(8), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ TableId tableId = TableId.readByte(bb);
+ // pad: 3 bytes
+ bb.skipBytes(3);
+
+ OFInstructionGotoTableVer13 instructionGotoTableVer13 = new OFInstructionGotoTableVer13(
+ tableId
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", instructionGotoTableVer13);
+ return instructionGotoTableVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFInstructionGotoTableVer13Funnel FUNNEL = new OFInstructionGotoTableVer13Funnel();
+ static class OFInstructionGotoTableVer13Funnel implements Funnel<OFInstructionGotoTableVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFInstructionGotoTableVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 1
+ sink.putShort((short) 0x1);
+ // fixed value property length = 8
+ sink.putShort((short) 0x8);
+ message.tableId.putTo(sink);
+ // skip pad (3 bytes)
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFInstructionGotoTableVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFInstructionGotoTableVer13 message) {
+ // fixed value property type = 1
+ bb.writeShort((short) 0x1);
+ // fixed value property length = 8
+ bb.writeShort((short) 0x8);
+ message.tableId.writeByte(bb);
+ // pad: 3 bytes
+ bb.writeZero(3);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFInstructionGotoTableVer13(");
+ b.append("tableId=").append(tableId);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFInstructionGotoTableVer13 other = (OFInstructionGotoTableVer13) obj;
+
+ if (tableId == null) {
+ if (other.tableId != null)
+ return false;
+ } else if (!tableId.equals(other.tableId))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((tableId == null) ? 0 : tableId.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdApplyActionsVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdApplyActionsVer13.java
new file mode 100644
index 0000000..07c0144
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdApplyActionsVer13.java
@@ -0,0 +1,156 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFInstructionIdApplyActionsVer13 implements OFInstructionIdApplyActions {
+ private static final Logger logger = LoggerFactory.getLogger(OFInstructionIdApplyActionsVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 4;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFInstructionIdApplyActionsVer13 DEFAULT = new OFInstructionIdApplyActionsVer13(
+
+ );
+
+ final static OFInstructionIdApplyActionsVer13 INSTANCE = new OFInstructionIdApplyActionsVer13();
+ // private empty constructor - use shared instance!
+ private OFInstructionIdApplyActionsVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFInstructionType getType() {
+ return OFInstructionType.APPLY_ACTIONS;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFInstructionIdApplyActions.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFInstructionIdApplyActionsVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFInstructionIdApplyActions> {
+ @Override
+ public OFInstructionIdApplyActions readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 4
+ short type = bb.readShort();
+ if(type != (short) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFInstructionType.APPLY_ACTIONS(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 4)
+ throw new OFParseError("Wrong length: Expected=4(4), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFInstructionIdApplyActionsVer13Funnel FUNNEL = new OFInstructionIdApplyActionsVer13Funnel();
+ static class OFInstructionIdApplyActionsVer13Funnel implements Funnel<OFInstructionIdApplyActionsVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFInstructionIdApplyActionsVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 4
+ sink.putShort((short) 0x4);
+ // fixed value property length = 4
+ sink.putShort((short) 0x4);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFInstructionIdApplyActionsVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFInstructionIdApplyActionsVer13 message) {
+ // fixed value property type = 4
+ bb.writeShort((short) 0x4);
+ // fixed value property length = 4
+ bb.writeShort((short) 0x4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFInstructionIdApplyActionsVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdBsnArpOffloadVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdBsnArpOffloadVer13.java
new file mode 100644
index 0000000..f6e2cbb
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdBsnArpOffloadVer13.java
@@ -0,0 +1,182 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFInstructionIdBsnArpOffloadVer13 implements OFInstructionIdBsnArpOffload {
+ private static final Logger logger = LoggerFactory.getLogger(OFInstructionIdBsnArpOffloadVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 12;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFInstructionIdBsnArpOffloadVer13 DEFAULT = new OFInstructionIdBsnArpOffloadVer13(
+
+ );
+
+ final static OFInstructionIdBsnArpOffloadVer13 INSTANCE = new OFInstructionIdBsnArpOffloadVer13();
+ // private empty constructor - use shared instance!
+ private OFInstructionIdBsnArpOffloadVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFInstructionType getType() {
+ return OFInstructionType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x1L;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFInstructionIdBsnArpOffload.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFInstructionIdBsnArpOffloadVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFInstructionIdBsnArpOffload> {
+ @Override
+ public OFInstructionIdBsnArpOffload readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 65535
+ short type = bb.readShort();
+ if(type != (short) 0xffff)
+ throw new OFParseError("Wrong type: Expected=OFInstructionType.EXPERIMENTER(65535), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 12)
+ throw new OFParseError("Wrong length: Expected=12(12), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x1L
+ int subtype = bb.readInt();
+ if(subtype != 0x1)
+ throw new OFParseError("Wrong subtype: Expected=0x1L(0x1L), got="+subtype);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFInstructionIdBsnArpOffloadVer13Funnel FUNNEL = new OFInstructionIdBsnArpOffloadVer13Funnel();
+ static class OFInstructionIdBsnArpOffloadVer13Funnel implements Funnel<OFInstructionIdBsnArpOffloadVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFInstructionIdBsnArpOffloadVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 65535
+ sink.putShort((short) 0xffff);
+ // fixed value property length = 12
+ sink.putShort((short) 0xc);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x1L
+ sink.putInt(0x1);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFInstructionIdBsnArpOffloadVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFInstructionIdBsnArpOffloadVer13 message) {
+ // fixed value property type = 65535
+ bb.writeShort((short) 0xffff);
+ // fixed value property length = 12
+ bb.writeShort((short) 0xc);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x1L
+ bb.writeInt(0x1);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFInstructionIdBsnArpOffloadVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdBsnDenyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdBsnDenyVer13.java
new file mode 100644
index 0000000..5d2ada3
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdBsnDenyVer13.java
@@ -0,0 +1,182 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFInstructionIdBsnDenyVer13 implements OFInstructionIdBsnDeny {
+ private static final Logger logger = LoggerFactory.getLogger(OFInstructionIdBsnDenyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 12;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFInstructionIdBsnDenyVer13 DEFAULT = new OFInstructionIdBsnDenyVer13(
+
+ );
+
+ final static OFInstructionIdBsnDenyVer13 INSTANCE = new OFInstructionIdBsnDenyVer13();
+ // private empty constructor - use shared instance!
+ private OFInstructionIdBsnDenyVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFInstructionType getType() {
+ return OFInstructionType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x5L;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFInstructionIdBsnDeny.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFInstructionIdBsnDenyVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFInstructionIdBsnDeny> {
+ @Override
+ public OFInstructionIdBsnDeny readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 65535
+ short type = bb.readShort();
+ if(type != (short) 0xffff)
+ throw new OFParseError("Wrong type: Expected=OFInstructionType.EXPERIMENTER(65535), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 12)
+ throw new OFParseError("Wrong length: Expected=12(12), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x5L
+ int subtype = bb.readInt();
+ if(subtype != 0x5)
+ throw new OFParseError("Wrong subtype: Expected=0x5L(0x5L), got="+subtype);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFInstructionIdBsnDenyVer13Funnel FUNNEL = new OFInstructionIdBsnDenyVer13Funnel();
+ static class OFInstructionIdBsnDenyVer13Funnel implements Funnel<OFInstructionIdBsnDenyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFInstructionIdBsnDenyVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 65535
+ sink.putShort((short) 0xffff);
+ // fixed value property length = 12
+ sink.putShort((short) 0xc);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x5L
+ sink.putInt(0x5);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFInstructionIdBsnDenyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFInstructionIdBsnDenyVer13 message) {
+ // fixed value property type = 65535
+ bb.writeShort((short) 0xffff);
+ // fixed value property length = 12
+ bb.writeShort((short) 0xc);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x5L
+ bb.writeInt(0x5);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFInstructionIdBsnDenyVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdBsnDhcpOffloadVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdBsnDhcpOffloadVer13.java
new file mode 100644
index 0000000..e0338b0
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdBsnDhcpOffloadVer13.java
@@ -0,0 +1,182 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFInstructionIdBsnDhcpOffloadVer13 implements OFInstructionIdBsnDhcpOffload {
+ private static final Logger logger = LoggerFactory.getLogger(OFInstructionIdBsnDhcpOffloadVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 12;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFInstructionIdBsnDhcpOffloadVer13 DEFAULT = new OFInstructionIdBsnDhcpOffloadVer13(
+
+ );
+
+ final static OFInstructionIdBsnDhcpOffloadVer13 INSTANCE = new OFInstructionIdBsnDhcpOffloadVer13();
+ // private empty constructor - use shared instance!
+ private OFInstructionIdBsnDhcpOffloadVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFInstructionType getType() {
+ return OFInstructionType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x2L;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFInstructionIdBsnDhcpOffload.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFInstructionIdBsnDhcpOffloadVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFInstructionIdBsnDhcpOffload> {
+ @Override
+ public OFInstructionIdBsnDhcpOffload readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 65535
+ short type = bb.readShort();
+ if(type != (short) 0xffff)
+ throw new OFParseError("Wrong type: Expected=OFInstructionType.EXPERIMENTER(65535), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 12)
+ throw new OFParseError("Wrong length: Expected=12(12), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x2L
+ int subtype = bb.readInt();
+ if(subtype != 0x2)
+ throw new OFParseError("Wrong subtype: Expected=0x2L(0x2L), got="+subtype);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFInstructionIdBsnDhcpOffloadVer13Funnel FUNNEL = new OFInstructionIdBsnDhcpOffloadVer13Funnel();
+ static class OFInstructionIdBsnDhcpOffloadVer13Funnel implements Funnel<OFInstructionIdBsnDhcpOffloadVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFInstructionIdBsnDhcpOffloadVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 65535
+ sink.putShort((short) 0xffff);
+ // fixed value property length = 12
+ sink.putShort((short) 0xc);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x2L
+ sink.putInt(0x2);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFInstructionIdBsnDhcpOffloadVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFInstructionIdBsnDhcpOffloadVer13 message) {
+ // fixed value property type = 65535
+ bb.writeShort((short) 0xffff);
+ // fixed value property length = 12
+ bb.writeShort((short) 0xc);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x2L
+ bb.writeInt(0x2);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFInstructionIdBsnDhcpOffloadVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdBsnDisableSplitHorizonCheckVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdBsnDisableSplitHorizonCheckVer13.java
new file mode 100644
index 0000000..c207e09
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdBsnDisableSplitHorizonCheckVer13.java
@@ -0,0 +1,182 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFInstructionIdBsnDisableSplitHorizonCheckVer13 implements OFInstructionIdBsnDisableSplitHorizonCheck {
+ private static final Logger logger = LoggerFactory.getLogger(OFInstructionIdBsnDisableSplitHorizonCheckVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 12;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFInstructionIdBsnDisableSplitHorizonCheckVer13 DEFAULT = new OFInstructionIdBsnDisableSplitHorizonCheckVer13(
+
+ );
+
+ final static OFInstructionIdBsnDisableSplitHorizonCheckVer13 INSTANCE = new OFInstructionIdBsnDisableSplitHorizonCheckVer13();
+ // private empty constructor - use shared instance!
+ private OFInstructionIdBsnDisableSplitHorizonCheckVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFInstructionType getType() {
+ return OFInstructionType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x3L;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFInstructionIdBsnDisableSplitHorizonCheck.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFInstructionIdBsnDisableSplitHorizonCheckVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFInstructionIdBsnDisableSplitHorizonCheck> {
+ @Override
+ public OFInstructionIdBsnDisableSplitHorizonCheck readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 65535
+ short type = bb.readShort();
+ if(type != (short) 0xffff)
+ throw new OFParseError("Wrong type: Expected=OFInstructionType.EXPERIMENTER(65535), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 12)
+ throw new OFParseError("Wrong length: Expected=12(12), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x3L
+ int subtype = bb.readInt();
+ if(subtype != 0x3)
+ throw new OFParseError("Wrong subtype: Expected=0x3L(0x3L), got="+subtype);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFInstructionIdBsnDisableSplitHorizonCheckVer13Funnel FUNNEL = new OFInstructionIdBsnDisableSplitHorizonCheckVer13Funnel();
+ static class OFInstructionIdBsnDisableSplitHorizonCheckVer13Funnel implements Funnel<OFInstructionIdBsnDisableSplitHorizonCheckVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFInstructionIdBsnDisableSplitHorizonCheckVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 65535
+ sink.putShort((short) 0xffff);
+ // fixed value property length = 12
+ sink.putShort((short) 0xc);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x3L
+ sink.putInt(0x3);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFInstructionIdBsnDisableSplitHorizonCheckVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFInstructionIdBsnDisableSplitHorizonCheckVer13 message) {
+ // fixed value property type = 65535
+ bb.writeShort((short) 0xffff);
+ // fixed value property length = 12
+ bb.writeShort((short) 0xc);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x3L
+ bb.writeInt(0x3);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFInstructionIdBsnDisableSplitHorizonCheckVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdBsnDisableSrcMacCheckVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdBsnDisableSrcMacCheckVer13.java
new file mode 100644
index 0000000..e8c1ab9
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdBsnDisableSrcMacCheckVer13.java
@@ -0,0 +1,182 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFInstructionIdBsnDisableSrcMacCheckVer13 implements OFInstructionIdBsnDisableSrcMacCheck {
+ private static final Logger logger = LoggerFactory.getLogger(OFInstructionIdBsnDisableSrcMacCheckVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 12;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFInstructionIdBsnDisableSrcMacCheckVer13 DEFAULT = new OFInstructionIdBsnDisableSrcMacCheckVer13(
+
+ );
+
+ final static OFInstructionIdBsnDisableSrcMacCheckVer13 INSTANCE = new OFInstructionIdBsnDisableSrcMacCheckVer13();
+ // private empty constructor - use shared instance!
+ private OFInstructionIdBsnDisableSrcMacCheckVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFInstructionType getType() {
+ return OFInstructionType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x0L;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFInstructionIdBsnDisableSrcMacCheck.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFInstructionIdBsnDisableSrcMacCheckVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFInstructionIdBsnDisableSrcMacCheck> {
+ @Override
+ public OFInstructionIdBsnDisableSrcMacCheck readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 65535
+ short type = bb.readShort();
+ if(type != (short) 0xffff)
+ throw new OFParseError("Wrong type: Expected=OFInstructionType.EXPERIMENTER(65535), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 12)
+ throw new OFParseError("Wrong length: Expected=12(12), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x0L
+ int subtype = bb.readInt();
+ if(subtype != 0x0)
+ throw new OFParseError("Wrong subtype: Expected=0x0L(0x0L), got="+subtype);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFInstructionIdBsnDisableSrcMacCheckVer13Funnel FUNNEL = new OFInstructionIdBsnDisableSrcMacCheckVer13Funnel();
+ static class OFInstructionIdBsnDisableSrcMacCheckVer13Funnel implements Funnel<OFInstructionIdBsnDisableSrcMacCheckVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFInstructionIdBsnDisableSrcMacCheckVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 65535
+ sink.putShort((short) 0xffff);
+ // fixed value property length = 12
+ sink.putShort((short) 0xc);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x0L
+ sink.putInt(0x0);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFInstructionIdBsnDisableSrcMacCheckVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFInstructionIdBsnDisableSrcMacCheckVer13 message) {
+ // fixed value property type = 65535
+ bb.writeShort((short) 0xffff);
+ // fixed value property length = 12
+ bb.writeShort((short) 0xc);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x0L
+ bb.writeInt(0x0);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFInstructionIdBsnDisableSrcMacCheckVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdBsnDisableVlanCountersVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdBsnDisableVlanCountersVer13.java
new file mode 100644
index 0000000..1ab7147
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdBsnDisableVlanCountersVer13.java
@@ -0,0 +1,182 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFInstructionIdBsnDisableVlanCountersVer13 implements OFInstructionIdBsnDisableVlanCounters {
+ private static final Logger logger = LoggerFactory.getLogger(OFInstructionIdBsnDisableVlanCountersVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 12;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFInstructionIdBsnDisableVlanCountersVer13 DEFAULT = new OFInstructionIdBsnDisableVlanCountersVer13(
+
+ );
+
+ final static OFInstructionIdBsnDisableVlanCountersVer13 INSTANCE = new OFInstructionIdBsnDisableVlanCountersVer13();
+ // private empty constructor - use shared instance!
+ private OFInstructionIdBsnDisableVlanCountersVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFInstructionType getType() {
+ return OFInstructionType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x9L;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFInstructionIdBsnDisableVlanCounters.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFInstructionIdBsnDisableVlanCountersVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFInstructionIdBsnDisableVlanCounters> {
+ @Override
+ public OFInstructionIdBsnDisableVlanCounters readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 65535
+ short type = bb.readShort();
+ if(type != (short) 0xffff)
+ throw new OFParseError("Wrong type: Expected=OFInstructionType.EXPERIMENTER(65535), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 12)
+ throw new OFParseError("Wrong length: Expected=12(12), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x9L
+ int subtype = bb.readInt();
+ if(subtype != 0x9)
+ throw new OFParseError("Wrong subtype: Expected=0x9L(0x9L), got="+subtype);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFInstructionIdBsnDisableVlanCountersVer13Funnel FUNNEL = new OFInstructionIdBsnDisableVlanCountersVer13Funnel();
+ static class OFInstructionIdBsnDisableVlanCountersVer13Funnel implements Funnel<OFInstructionIdBsnDisableVlanCountersVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFInstructionIdBsnDisableVlanCountersVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 65535
+ sink.putShort((short) 0xffff);
+ // fixed value property length = 12
+ sink.putShort((short) 0xc);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x9L
+ sink.putInt(0x9);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFInstructionIdBsnDisableVlanCountersVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFInstructionIdBsnDisableVlanCountersVer13 message) {
+ // fixed value property type = 65535
+ bb.writeShort((short) 0xffff);
+ // fixed value property length = 12
+ bb.writeShort((short) 0xc);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x9L
+ bb.writeInt(0x9);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFInstructionIdBsnDisableVlanCountersVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdBsnPacketOfDeathVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdBsnPacketOfDeathVer13.java
new file mode 100644
index 0000000..0e8e305
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdBsnPacketOfDeathVer13.java
@@ -0,0 +1,182 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFInstructionIdBsnPacketOfDeathVer13 implements OFInstructionIdBsnPacketOfDeath {
+ private static final Logger logger = LoggerFactory.getLogger(OFInstructionIdBsnPacketOfDeathVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 12;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFInstructionIdBsnPacketOfDeathVer13 DEFAULT = new OFInstructionIdBsnPacketOfDeathVer13(
+
+ );
+
+ final static OFInstructionIdBsnPacketOfDeathVer13 INSTANCE = new OFInstructionIdBsnPacketOfDeathVer13();
+ // private empty constructor - use shared instance!
+ private OFInstructionIdBsnPacketOfDeathVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFInstructionType getType() {
+ return OFInstructionType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x6L;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFInstructionIdBsnPacketOfDeath.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFInstructionIdBsnPacketOfDeathVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFInstructionIdBsnPacketOfDeath> {
+ @Override
+ public OFInstructionIdBsnPacketOfDeath readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 65535
+ short type = bb.readShort();
+ if(type != (short) 0xffff)
+ throw new OFParseError("Wrong type: Expected=OFInstructionType.EXPERIMENTER(65535), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 12)
+ throw new OFParseError("Wrong length: Expected=12(12), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x6L
+ int subtype = bb.readInt();
+ if(subtype != 0x6)
+ throw new OFParseError("Wrong subtype: Expected=0x6L(0x6L), got="+subtype);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFInstructionIdBsnPacketOfDeathVer13Funnel FUNNEL = new OFInstructionIdBsnPacketOfDeathVer13Funnel();
+ static class OFInstructionIdBsnPacketOfDeathVer13Funnel implements Funnel<OFInstructionIdBsnPacketOfDeathVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFInstructionIdBsnPacketOfDeathVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 65535
+ sink.putShort((short) 0xffff);
+ // fixed value property length = 12
+ sink.putShort((short) 0xc);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x6L
+ sink.putInt(0x6);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFInstructionIdBsnPacketOfDeathVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFInstructionIdBsnPacketOfDeathVer13 message) {
+ // fixed value property type = 65535
+ bb.writeShort((short) 0xffff);
+ // fixed value property length = 12
+ bb.writeShort((short) 0xc);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x6L
+ bb.writeInt(0x6);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFInstructionIdBsnPacketOfDeathVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdBsnPermitVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdBsnPermitVer13.java
new file mode 100644
index 0000000..2d8b6de
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdBsnPermitVer13.java
@@ -0,0 +1,182 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFInstructionIdBsnPermitVer13 implements OFInstructionIdBsnPermit {
+ private static final Logger logger = LoggerFactory.getLogger(OFInstructionIdBsnPermitVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 12;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFInstructionIdBsnPermitVer13 DEFAULT = new OFInstructionIdBsnPermitVer13(
+
+ );
+
+ final static OFInstructionIdBsnPermitVer13 INSTANCE = new OFInstructionIdBsnPermitVer13();
+ // private empty constructor - use shared instance!
+ private OFInstructionIdBsnPermitVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFInstructionType getType() {
+ return OFInstructionType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x4L;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFInstructionIdBsnPermit.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFInstructionIdBsnPermitVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFInstructionIdBsnPermit> {
+ @Override
+ public OFInstructionIdBsnPermit readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 65535
+ short type = bb.readShort();
+ if(type != (short) 0xffff)
+ throw new OFParseError("Wrong type: Expected=OFInstructionType.EXPERIMENTER(65535), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 12)
+ throw new OFParseError("Wrong length: Expected=12(12), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x4L
+ int subtype = bb.readInt();
+ if(subtype != 0x4)
+ throw new OFParseError("Wrong subtype: Expected=0x4L(0x4L), got="+subtype);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFInstructionIdBsnPermitVer13Funnel FUNNEL = new OFInstructionIdBsnPermitVer13Funnel();
+ static class OFInstructionIdBsnPermitVer13Funnel implements Funnel<OFInstructionIdBsnPermitVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFInstructionIdBsnPermitVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 65535
+ sink.putShort((short) 0xffff);
+ // fixed value property length = 12
+ sink.putShort((short) 0xc);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x4L
+ sink.putInt(0x4);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFInstructionIdBsnPermitVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFInstructionIdBsnPermitVer13 message) {
+ // fixed value property type = 65535
+ bb.writeShort((short) 0xffff);
+ // fixed value property length = 12
+ bb.writeShort((short) 0xc);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x4L
+ bb.writeInt(0x4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFInstructionIdBsnPermitVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdBsnPrioritizePdusVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdBsnPrioritizePdusVer13.java
new file mode 100644
index 0000000..bb6007f
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdBsnPrioritizePdusVer13.java
@@ -0,0 +1,182 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFInstructionIdBsnPrioritizePdusVer13 implements OFInstructionIdBsnPrioritizePdus {
+ private static final Logger logger = LoggerFactory.getLogger(OFInstructionIdBsnPrioritizePdusVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 12;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFInstructionIdBsnPrioritizePdusVer13 DEFAULT = new OFInstructionIdBsnPrioritizePdusVer13(
+
+ );
+
+ final static OFInstructionIdBsnPrioritizePdusVer13 INSTANCE = new OFInstructionIdBsnPrioritizePdusVer13();
+ // private empty constructor - use shared instance!
+ private OFInstructionIdBsnPrioritizePdusVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFInstructionType getType() {
+ return OFInstructionType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x7L;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFInstructionIdBsnPrioritizePdus.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFInstructionIdBsnPrioritizePdusVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFInstructionIdBsnPrioritizePdus> {
+ @Override
+ public OFInstructionIdBsnPrioritizePdus readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 65535
+ short type = bb.readShort();
+ if(type != (short) 0xffff)
+ throw new OFParseError("Wrong type: Expected=OFInstructionType.EXPERIMENTER(65535), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 12)
+ throw new OFParseError("Wrong length: Expected=12(12), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x7L
+ int subtype = bb.readInt();
+ if(subtype != 0x7)
+ throw new OFParseError("Wrong subtype: Expected=0x7L(0x7L), got="+subtype);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFInstructionIdBsnPrioritizePdusVer13Funnel FUNNEL = new OFInstructionIdBsnPrioritizePdusVer13Funnel();
+ static class OFInstructionIdBsnPrioritizePdusVer13Funnel implements Funnel<OFInstructionIdBsnPrioritizePdusVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFInstructionIdBsnPrioritizePdusVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 65535
+ sink.putShort((short) 0xffff);
+ // fixed value property length = 12
+ sink.putShort((short) 0xc);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x7L
+ sink.putInt(0x7);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFInstructionIdBsnPrioritizePdusVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFInstructionIdBsnPrioritizePdusVer13 message) {
+ // fixed value property type = 65535
+ bb.writeShort((short) 0xffff);
+ // fixed value property length = 12
+ bb.writeShort((short) 0xc);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x7L
+ bb.writeInt(0x7);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFInstructionIdBsnPrioritizePdusVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdBsnRequireVlanXlateVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdBsnRequireVlanXlateVer13.java
new file mode 100644
index 0000000..ea36dd4
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdBsnRequireVlanXlateVer13.java
@@ -0,0 +1,182 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFInstructionIdBsnRequireVlanXlateVer13 implements OFInstructionIdBsnRequireVlanXlate {
+ private static final Logger logger = LoggerFactory.getLogger(OFInstructionIdBsnRequireVlanXlateVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 12;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFInstructionIdBsnRequireVlanXlateVer13 DEFAULT = new OFInstructionIdBsnRequireVlanXlateVer13(
+
+ );
+
+ final static OFInstructionIdBsnRequireVlanXlateVer13 INSTANCE = new OFInstructionIdBsnRequireVlanXlateVer13();
+ // private empty constructor - use shared instance!
+ private OFInstructionIdBsnRequireVlanXlateVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFInstructionType getType() {
+ return OFInstructionType.EXPERIMENTER;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return 0x5c16c7L;
+ }
+
+ @Override
+ public long getSubtype() {
+ return 0x8L;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFInstructionIdBsnRequireVlanXlate.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFInstructionIdBsnRequireVlanXlateVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFInstructionIdBsnRequireVlanXlate> {
+ @Override
+ public OFInstructionIdBsnRequireVlanXlate readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 65535
+ short type = bb.readShort();
+ if(type != (short) 0xffff)
+ throw new OFParseError("Wrong type: Expected=OFInstructionType.EXPERIMENTER(65535), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 12)
+ throw new OFParseError("Wrong length: Expected=12(12), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ // fixed value property subtype == 0x8L
+ int subtype = bb.readInt();
+ if(subtype != 0x8)
+ throw new OFParseError("Wrong subtype: Expected=0x8L(0x8L), got="+subtype);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFInstructionIdBsnRequireVlanXlateVer13Funnel FUNNEL = new OFInstructionIdBsnRequireVlanXlateVer13Funnel();
+ static class OFInstructionIdBsnRequireVlanXlateVer13Funnel implements Funnel<OFInstructionIdBsnRequireVlanXlateVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFInstructionIdBsnRequireVlanXlateVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 65535
+ sink.putShort((short) 0xffff);
+ // fixed value property length = 12
+ sink.putShort((short) 0xc);
+ // fixed value property experimenter = 0x5c16c7L
+ sink.putInt(0x5c16c7);
+ // fixed value property subtype = 0x8L
+ sink.putInt(0x8);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFInstructionIdBsnRequireVlanXlateVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFInstructionIdBsnRequireVlanXlateVer13 message) {
+ // fixed value property type = 65535
+ bb.writeShort((short) 0xffff);
+ // fixed value property length = 12
+ bb.writeShort((short) 0xc);
+ // fixed value property experimenter = 0x5c16c7L
+ bb.writeInt(0x5c16c7);
+ // fixed value property subtype = 0x8L
+ bb.writeInt(0x8);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFInstructionIdBsnRequireVlanXlateVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdBsnVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdBsnVer13.java
new file mode 100644
index 0000000..7aca13b
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdBsnVer13.java
@@ -0,0 +1,91 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_virtual_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.jboss.netty.buffer.ChannelBuffer;
+
+abstract class OFInstructionIdBsnVer13 {
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 12;
+
+
+ public final static OFInstructionIdBsnVer13.Reader READER = new Reader();
+
+ static class Reader implements OFMessageReader<OFInstructionIdBsn> {
+ @Override
+ public OFInstructionIdBsn readFrom(ChannelBuffer bb) throws OFParseError {
+ if(bb.readableBytes() < MINIMUM_LENGTH)
+ return null;
+ int start = bb.readerIndex();
+ // fixed value property type == 65535
+ short type = bb.readShort();
+ if(type != (short) 0xffff)
+ throw new OFParseError("Wrong type: Expected=OFInstructionType.EXPERIMENTER(65535), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ // fixed value property experimenter == 0x5c16c7L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x5c16c7)
+ throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+ int subtype = bb.readInt();
+ bb.readerIndex(start);
+ switch(subtype) {
+ case 0x1:
+ // discriminator value 0x1L=0x1L for class OFInstructionIdBsnArpOffloadVer13
+ return OFInstructionIdBsnArpOffloadVer13.READER.readFrom(bb);
+ case 0x5:
+ // discriminator value 0x5L=0x5L for class OFInstructionIdBsnDenyVer13
+ return OFInstructionIdBsnDenyVer13.READER.readFrom(bb);
+ case 0x2:
+ // discriminator value 0x2L=0x2L for class OFInstructionIdBsnDhcpOffloadVer13
+ return OFInstructionIdBsnDhcpOffloadVer13.READER.readFrom(bb);
+ case 0x3:
+ // discriminator value 0x3L=0x3L for class OFInstructionIdBsnDisableSplitHorizonCheckVer13
+ return OFInstructionIdBsnDisableSplitHorizonCheckVer13.READER.readFrom(bb);
+ case 0x0:
+ // discriminator value 0x0L=0x0L for class OFInstructionIdBsnDisableSrcMacCheckVer13
+ return OFInstructionIdBsnDisableSrcMacCheckVer13.READER.readFrom(bb);
+ case 0x9:
+ // discriminator value 0x9L=0x9L for class OFInstructionIdBsnDisableVlanCountersVer13
+ return OFInstructionIdBsnDisableVlanCountersVer13.READER.readFrom(bb);
+ case 0x6:
+ // discriminator value 0x6L=0x6L for class OFInstructionIdBsnPacketOfDeathVer13
+ return OFInstructionIdBsnPacketOfDeathVer13.READER.readFrom(bb);
+ case 0x4:
+ // discriminator value 0x4L=0x4L for class OFInstructionIdBsnPermitVer13
+ return OFInstructionIdBsnPermitVer13.READER.readFrom(bb);
+ case 0x7:
+ // discriminator value 0x7L=0x7L for class OFInstructionIdBsnPrioritizePdusVer13
+ return OFInstructionIdBsnPrioritizePdusVer13.READER.readFrom(bb);
+ case 0x8:
+ // discriminator value 0x8L=0x8L for class OFInstructionIdBsnRequireVlanXlateVer13
+ return OFInstructionIdBsnRequireVlanXlateVer13.READER.readFrom(bb);
+ default:
+ throw new OFParseError("Unknown value for discriminator subtype of class OFInstructionIdBsnVer13: " + subtype);
+ }
+ }
+ }
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdClearActionsVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdClearActionsVer13.java
new file mode 100644
index 0000000..c37a7ba
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdClearActionsVer13.java
@@ -0,0 +1,156 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFInstructionIdClearActionsVer13 implements OFInstructionIdClearActions {
+ private static final Logger logger = LoggerFactory.getLogger(OFInstructionIdClearActionsVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 4;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFInstructionIdClearActionsVer13 DEFAULT = new OFInstructionIdClearActionsVer13(
+
+ );
+
+ final static OFInstructionIdClearActionsVer13 INSTANCE = new OFInstructionIdClearActionsVer13();
+ // private empty constructor - use shared instance!
+ private OFInstructionIdClearActionsVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFInstructionType getType() {
+ return OFInstructionType.CLEAR_ACTIONS;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFInstructionIdClearActions.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFInstructionIdClearActionsVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFInstructionIdClearActions> {
+ @Override
+ public OFInstructionIdClearActions readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 5
+ short type = bb.readShort();
+ if(type != (short) 0x5)
+ throw new OFParseError("Wrong type: Expected=OFInstructionType.CLEAR_ACTIONS(5), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 4)
+ throw new OFParseError("Wrong length: Expected=4(4), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFInstructionIdClearActionsVer13Funnel FUNNEL = new OFInstructionIdClearActionsVer13Funnel();
+ static class OFInstructionIdClearActionsVer13Funnel implements Funnel<OFInstructionIdClearActionsVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFInstructionIdClearActionsVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 5
+ sink.putShort((short) 0x5);
+ // fixed value property length = 4
+ sink.putShort((short) 0x4);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFInstructionIdClearActionsVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFInstructionIdClearActionsVer13 message) {
+ // fixed value property type = 5
+ bb.writeShort((short) 0x5);
+ // fixed value property length = 4
+ bb.writeShort((short) 0x4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFInstructionIdClearActionsVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdExperimenterVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdExperimenterVer13.java
new file mode 100644
index 0000000..4151049
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdExperimenterVer13.java
@@ -0,0 +1,60 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_virtual_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.jboss.netty.buffer.ChannelBuffer;
+
+abstract class OFInstructionIdExperimenterVer13 {
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 8;
+
+
+ public final static OFInstructionIdExperimenterVer13.Reader READER = new Reader();
+
+ static class Reader implements OFMessageReader<OFInstructionIdExperimenter> {
+ @Override
+ public OFInstructionIdExperimenter readFrom(ChannelBuffer bb) throws OFParseError {
+ if(bb.readableBytes() < MINIMUM_LENGTH)
+ return null;
+ int start = bb.readerIndex();
+ // fixed value property type == 65535
+ short type = bb.readShort();
+ if(type != (short) 0xffff)
+ throw new OFParseError("Wrong type: Expected=OFInstructionType.EXPERIMENTER(65535), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ int experimenter = bb.readInt();
+ bb.readerIndex(start);
+ switch(experimenter) {
+ case 0x5c16c7:
+ // discriminator value 0x5c16c7L=0x5c16c7L for class OFInstructionIdBsnVer13
+ return OFInstructionIdBsnVer13.READER.readFrom(bb);
+ default:
+ throw new OFParseError("Unknown value for discriminator experimenter of class OFInstructionIdExperimenterVer13: " + experimenter);
+ }
+ }
+ }
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdGotoTableVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdGotoTableVer13.java
new file mode 100644
index 0000000..1cb373c
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdGotoTableVer13.java
@@ -0,0 +1,156 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFInstructionIdGotoTableVer13 implements OFInstructionIdGotoTable {
+ private static final Logger logger = LoggerFactory.getLogger(OFInstructionIdGotoTableVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 4;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFInstructionIdGotoTableVer13 DEFAULT = new OFInstructionIdGotoTableVer13(
+
+ );
+
+ final static OFInstructionIdGotoTableVer13 INSTANCE = new OFInstructionIdGotoTableVer13();
+ // private empty constructor - use shared instance!
+ private OFInstructionIdGotoTableVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFInstructionType getType() {
+ return OFInstructionType.GOTO_TABLE;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFInstructionIdGotoTable.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFInstructionIdGotoTableVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFInstructionIdGotoTable> {
+ @Override
+ public OFInstructionIdGotoTable readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 1
+ short type = bb.readShort();
+ if(type != (short) 0x1)
+ throw new OFParseError("Wrong type: Expected=OFInstructionType.GOTO_TABLE(1), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 4)
+ throw new OFParseError("Wrong length: Expected=4(4), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFInstructionIdGotoTableVer13Funnel FUNNEL = new OFInstructionIdGotoTableVer13Funnel();
+ static class OFInstructionIdGotoTableVer13Funnel implements Funnel<OFInstructionIdGotoTableVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFInstructionIdGotoTableVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 1
+ sink.putShort((short) 0x1);
+ // fixed value property length = 4
+ sink.putShort((short) 0x4);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFInstructionIdGotoTableVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFInstructionIdGotoTableVer13 message) {
+ // fixed value property type = 1
+ bb.writeShort((short) 0x1);
+ // fixed value property length = 4
+ bb.writeShort((short) 0x4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFInstructionIdGotoTableVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdMeterVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdMeterVer13.java
new file mode 100644
index 0000000..db8b340
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdMeterVer13.java
@@ -0,0 +1,156 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFInstructionIdMeterVer13 implements OFInstructionIdMeter {
+ private static final Logger logger = LoggerFactory.getLogger(OFInstructionIdMeterVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 4;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFInstructionIdMeterVer13 DEFAULT = new OFInstructionIdMeterVer13(
+
+ );
+
+ final static OFInstructionIdMeterVer13 INSTANCE = new OFInstructionIdMeterVer13();
+ // private empty constructor - use shared instance!
+ private OFInstructionIdMeterVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFInstructionType getType() {
+ return OFInstructionType.METER;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFInstructionIdMeter.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFInstructionIdMeterVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFInstructionIdMeter> {
+ @Override
+ public OFInstructionIdMeter readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 6
+ short type = bb.readShort();
+ if(type != (short) 0x6)
+ throw new OFParseError("Wrong type: Expected=OFInstructionType.METER(6), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 4)
+ throw new OFParseError("Wrong length: Expected=4(4), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFInstructionIdMeterVer13Funnel FUNNEL = new OFInstructionIdMeterVer13Funnel();
+ static class OFInstructionIdMeterVer13Funnel implements Funnel<OFInstructionIdMeterVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFInstructionIdMeterVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 6
+ sink.putShort((short) 0x6);
+ // fixed value property length = 4
+ sink.putShort((short) 0x4);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFInstructionIdMeterVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFInstructionIdMeterVer13 message) {
+ // fixed value property type = 6
+ bb.writeShort((short) 0x6);
+ // fixed value property length = 4
+ bb.writeShort((short) 0x4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFInstructionIdMeterVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdVer13.java
new file mode 100644
index 0000000..2dd4250
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdVer13.java
@@ -0,0 +1,71 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_virtual_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.jboss.netty.buffer.ChannelBuffer;
+
+abstract class OFInstructionIdVer13 {
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 4;
+
+
+ public final static OFInstructionIdVer13.Reader READER = new Reader();
+
+ static class Reader implements OFMessageReader<OFInstructionId> {
+ @Override
+ public OFInstructionId readFrom(ChannelBuffer bb) throws OFParseError {
+ if(bb.readableBytes() < MINIMUM_LENGTH)
+ return null;
+ int start = bb.readerIndex();
+ short type = bb.readShort();
+ bb.readerIndex(start);
+ switch(type) {
+ case (short) 0x4:
+ // discriminator value OFInstructionType.APPLY_ACTIONS=4 for class OFInstructionIdApplyActionsVer13
+ return OFInstructionIdApplyActionsVer13.READER.readFrom(bb);
+ case (short) 0xffff:
+ // discriminator value OFInstructionType.EXPERIMENTER=65535 for class OFInstructionIdExperimenterVer13
+ return OFInstructionIdExperimenterVer13.READER.readFrom(bb);
+ case (short) 0x5:
+ // discriminator value OFInstructionType.CLEAR_ACTIONS=5 for class OFInstructionIdClearActionsVer13
+ return OFInstructionIdClearActionsVer13.READER.readFrom(bb);
+ case (short) 0x1:
+ // discriminator value OFInstructionType.GOTO_TABLE=1 for class OFInstructionIdGotoTableVer13
+ return OFInstructionIdGotoTableVer13.READER.readFrom(bb);
+ case (short) 0x6:
+ // discriminator value OFInstructionType.METER=6 for class OFInstructionIdMeterVer13
+ return OFInstructionIdMeterVer13.READER.readFrom(bb);
+ case (short) 0x3:
+ // discriminator value OFInstructionType.WRITE_ACTIONS=3 for class OFInstructionIdWriteActionsVer13
+ return OFInstructionIdWriteActionsVer13.READER.readFrom(bb);
+ case (short) 0x2:
+ // discriminator value OFInstructionType.WRITE_METADATA=2 for class OFInstructionIdWriteMetadataVer13
+ return OFInstructionIdWriteMetadataVer13.READER.readFrom(bb);
+ default:
+ throw new OFParseError("Unknown value for discriminator type of class OFInstructionIdVer13: " + type);
+ }
+ }
+ }
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdWriteActionsVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdWriteActionsVer13.java
new file mode 100644
index 0000000..0e1af8e
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdWriteActionsVer13.java
@@ -0,0 +1,156 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFInstructionIdWriteActionsVer13 implements OFInstructionIdWriteActions {
+ private static final Logger logger = LoggerFactory.getLogger(OFInstructionIdWriteActionsVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 4;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFInstructionIdWriteActionsVer13 DEFAULT = new OFInstructionIdWriteActionsVer13(
+
+ );
+
+ final static OFInstructionIdWriteActionsVer13 INSTANCE = new OFInstructionIdWriteActionsVer13();
+ // private empty constructor - use shared instance!
+ private OFInstructionIdWriteActionsVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFInstructionType getType() {
+ return OFInstructionType.WRITE_ACTIONS;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFInstructionIdWriteActions.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFInstructionIdWriteActionsVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFInstructionIdWriteActions> {
+ @Override
+ public OFInstructionIdWriteActions readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 3
+ short type = bb.readShort();
+ if(type != (short) 0x3)
+ throw new OFParseError("Wrong type: Expected=OFInstructionType.WRITE_ACTIONS(3), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 4)
+ throw new OFParseError("Wrong length: Expected=4(4), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFInstructionIdWriteActionsVer13Funnel FUNNEL = new OFInstructionIdWriteActionsVer13Funnel();
+ static class OFInstructionIdWriteActionsVer13Funnel implements Funnel<OFInstructionIdWriteActionsVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFInstructionIdWriteActionsVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 3
+ sink.putShort((short) 0x3);
+ // fixed value property length = 4
+ sink.putShort((short) 0x4);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFInstructionIdWriteActionsVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFInstructionIdWriteActionsVer13 message) {
+ // fixed value property type = 3
+ bb.writeShort((short) 0x3);
+ // fixed value property length = 4
+ bb.writeShort((short) 0x4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFInstructionIdWriteActionsVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdWriteMetadataVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdWriteMetadataVer13.java
new file mode 100644
index 0000000..ec2a25e
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdWriteMetadataVer13.java
@@ -0,0 +1,156 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFInstructionIdWriteMetadataVer13 implements OFInstructionIdWriteMetadata {
+ private static final Logger logger = LoggerFactory.getLogger(OFInstructionIdWriteMetadataVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 4;
+
+
+ // OF message fields
+//
+ // Immutable default instance
+ final static OFInstructionIdWriteMetadataVer13 DEFAULT = new OFInstructionIdWriteMetadataVer13(
+
+ );
+
+ final static OFInstructionIdWriteMetadataVer13 INSTANCE = new OFInstructionIdWriteMetadataVer13();
+ // private empty constructor - use shared instance!
+ private OFInstructionIdWriteMetadataVer13() {
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFInstructionType getType() {
+ return OFInstructionType.WRITE_METADATA;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ // no data members - do not support builder
+ public OFInstructionIdWriteMetadata.Builder createBuilder() {
+ throw new UnsupportedOperationException("OFInstructionIdWriteMetadataVer13 has no mutable properties -- builder unneeded");
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFInstructionIdWriteMetadata> {
+ @Override
+ public OFInstructionIdWriteMetadata readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 2
+ short type = bb.readShort();
+ if(type != (short) 0x2)
+ throw new OFParseError("Wrong type: Expected=OFInstructionType.WRITE_METADATA(2), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 4)
+ throw new OFParseError("Wrong length: Expected=4(4), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - returning shared instance={}", INSTANCE);
+ return INSTANCE;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFInstructionIdWriteMetadataVer13Funnel FUNNEL = new OFInstructionIdWriteMetadataVer13Funnel();
+ static class OFInstructionIdWriteMetadataVer13Funnel implements Funnel<OFInstructionIdWriteMetadataVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFInstructionIdWriteMetadataVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 2
+ sink.putShort((short) 0x2);
+ // fixed value property length = 4
+ sink.putShort((short) 0x4);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFInstructionIdWriteMetadataVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFInstructionIdWriteMetadataVer13 message) {
+ // fixed value property type = 2
+ bb.writeShort((short) 0x2);
+ // fixed value property length = 4
+ bb.writeShort((short) 0x4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFInstructionIdWriteMetadataVer13(");
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdsVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdsVer13.java
new file mode 100644
index 0000000..baeb782
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdsVer13.java
@@ -0,0 +1,106 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_factory_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+
+
+public class OFInstructionIdsVer13 implements OFInstructionIds {
+ public final static OFInstructionIdsVer13 INSTANCE = new OFInstructionIdsVer13();
+
+
+
+
+ public OFInstructionIdApplyActions applyActions() {
+ return OFInstructionIdApplyActionsVer13.INSTANCE;
+ }
+
+ public OFInstructionIdBsnArpOffload bsnArpOffload() {
+ return OFInstructionIdBsnArpOffloadVer13.INSTANCE;
+ }
+
+ public OFInstructionIdBsnDeny bsnDeny() {
+ return OFInstructionIdBsnDenyVer13.INSTANCE;
+ }
+
+ public OFInstructionIdBsnDhcpOffload bsnDhcpOffload() {
+ return OFInstructionIdBsnDhcpOffloadVer13.INSTANCE;
+ }
+
+ public OFInstructionIdBsnDisableSplitHorizonCheck bsnDisableSplitHorizonCheck() {
+ return OFInstructionIdBsnDisableSplitHorizonCheckVer13.INSTANCE;
+ }
+
+ public OFInstructionIdBsnDisableSrcMacCheck bsnDisableSrcMacCheck() {
+ return OFInstructionIdBsnDisableSrcMacCheckVer13.INSTANCE;
+ }
+
+ public OFInstructionIdBsnDisableVlanCounters bsnDisableVlanCounters() {
+ return OFInstructionIdBsnDisableVlanCountersVer13.INSTANCE;
+ }
+
+ public OFInstructionIdBsnPacketOfDeath bsnPacketOfDeath() {
+ return OFInstructionIdBsnPacketOfDeathVer13.INSTANCE;
+ }
+
+ public OFInstructionIdBsnPermit bsnPermit() {
+ return OFInstructionIdBsnPermitVer13.INSTANCE;
+ }
+
+ public OFInstructionIdBsnPrioritizePdus bsnPrioritizePdus() {
+ return OFInstructionIdBsnPrioritizePdusVer13.INSTANCE;
+ }
+
+ public OFInstructionIdBsnRequireVlanXlate bsnRequireVlanXlate() {
+ return OFInstructionIdBsnRequireVlanXlateVer13.INSTANCE;
+ }
+
+ public OFInstructionIdClearActions clearActions() {
+ return OFInstructionIdClearActionsVer13.INSTANCE;
+ }
+
+ public OFInstructionIdGotoTable gotoTable() {
+ return OFInstructionIdGotoTableVer13.INSTANCE;
+ }
+
+ public OFInstructionIdMeter meter() {
+ return OFInstructionIdMeterVer13.INSTANCE;
+ }
+
+ public OFInstructionIdWriteActions writeActions() {
+ return OFInstructionIdWriteActionsVer13.INSTANCE;
+ }
+
+ public OFInstructionIdWriteMetadata writeMetadata() {
+ return OFInstructionIdWriteMetadataVer13.INSTANCE;
+ }
+
+ public OFMessageReader<OFInstructionId> getReader() {
+ return OFInstructionIdVer13.READER;
+ }
+
+
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionMeterVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionMeterVer13.java
new file mode 100644
index 0000000..39d5f77
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionMeterVer13.java
@@ -0,0 +1,260 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFInstructionMeterVer13 implements OFInstructionMeter {
+ private static final Logger logger = LoggerFactory.getLogger(OFInstructionMeterVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static long DEFAULT_METER_ID = 0x0L;
+
+ // OF message fields
+ private final long meterId;
+//
+ // Immutable default instance
+ final static OFInstructionMeterVer13 DEFAULT = new OFInstructionMeterVer13(
+ DEFAULT_METER_ID
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFInstructionMeterVer13(long meterId) {
+ this.meterId = meterId;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFInstructionType getType() {
+ return OFInstructionType.METER;
+ }
+
+ @Override
+ public long getMeterId() {
+ return meterId;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFInstructionMeter.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFInstructionMeter.Builder {
+ final OFInstructionMeterVer13 parentMessage;
+
+ // OF message fields
+ private boolean meterIdSet;
+ private long meterId;
+
+ BuilderWithParent(OFInstructionMeterVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFInstructionType getType() {
+ return OFInstructionType.METER;
+ }
+
+ @Override
+ public long getMeterId() {
+ return meterId;
+ }
+
+ @Override
+ public OFInstructionMeter.Builder setMeterId(long meterId) {
+ this.meterId = meterId;
+ this.meterIdSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFInstructionMeter build() {
+ long meterId = this.meterIdSet ? this.meterId : parentMessage.meterId;
+
+ //
+ return new OFInstructionMeterVer13(
+ meterId
+ );
+ }
+
+ }
+
+ static class Builder implements OFInstructionMeter.Builder {
+ // OF message fields
+ private boolean meterIdSet;
+ private long meterId;
+
+ @Override
+ public OFInstructionType getType() {
+ return OFInstructionType.METER;
+ }
+
+ @Override
+ public long getMeterId() {
+ return meterId;
+ }
+
+ @Override
+ public OFInstructionMeter.Builder setMeterId(long meterId) {
+ this.meterId = meterId;
+ this.meterIdSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFInstructionMeter build() {
+ long meterId = this.meterIdSet ? this.meterId : DEFAULT_METER_ID;
+
+
+ return new OFInstructionMeterVer13(
+ meterId
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFInstructionMeter> {
+ @Override
+ public OFInstructionMeter readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 6
+ short type = bb.readShort();
+ if(type != (short) 0x6)
+ throw new OFParseError("Wrong type: Expected=OFInstructionType.METER(6), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 8)
+ throw new OFParseError("Wrong length: Expected=8(8), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long meterId = U32.f(bb.readInt());
+
+ OFInstructionMeterVer13 instructionMeterVer13 = new OFInstructionMeterVer13(
+ meterId
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", instructionMeterVer13);
+ return instructionMeterVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFInstructionMeterVer13Funnel FUNNEL = new OFInstructionMeterVer13Funnel();
+ static class OFInstructionMeterVer13Funnel implements Funnel<OFInstructionMeterVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFInstructionMeterVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 6
+ sink.putShort((short) 0x6);
+ // fixed value property length = 8
+ sink.putShort((short) 0x8);
+ sink.putLong(message.meterId);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFInstructionMeterVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFInstructionMeterVer13 message) {
+ // fixed value property type = 6
+ bb.writeShort((short) 0x6);
+ // fixed value property length = 8
+ bb.writeShort((short) 0x8);
+ bb.writeInt(U32.t(message.meterId));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFInstructionMeterVer13(");
+ b.append("meterId=").append(meterId);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFInstructionMeterVer13 other = (OFInstructionMeterVer13) obj;
+
+ if( meterId != other.meterId)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (meterId ^ (meterId >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionTypeSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionTypeSerializerVer13.java
new file mode 100644
index 0000000..5715f17
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionTypeSerializerVer13.java
@@ -0,0 +1,114 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_set_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFInstructionType;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import java.util.EnumSet;
+import java.util.Collections;
+
+
+public class OFInstructionTypeSerializerVer13 {
+
+ public final static short GOTO_TABLE_VAL = (short) 0x1;
+ public final static short WRITE_METADATA_VAL = (short) 0x2;
+ public final static short WRITE_ACTIONS_VAL = (short) 0x3;
+ public final static short APPLY_ACTIONS_VAL = (short) 0x4;
+ public final static short CLEAR_ACTIONS_VAL = (short) 0x5;
+ public final static short EXPERIMENTER_VAL = (short) 0xffff;
+ public final static short METER_VAL = (short) 0x6;
+
+ public static Set<OFInstructionType> readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readShort());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, Set<OFInstructionType> set) {
+ bb.writeShort(toWireValue(set));
+ }
+
+ public static void putTo(Set<OFInstructionType> set, PrimitiveSink sink) {
+ sink.putShort(toWireValue(set));
+ }
+
+
+ public static Set<OFInstructionType> ofWireValue(short val) {
+ EnumSet<OFInstructionType> set = EnumSet.noneOf(OFInstructionType.class);
+
+ if((val & GOTO_TABLE_VAL) != 0)
+ set.add(OFInstructionType.GOTO_TABLE);
+ if((val & WRITE_METADATA_VAL) != 0)
+ set.add(OFInstructionType.WRITE_METADATA);
+ if((val & WRITE_ACTIONS_VAL) != 0)
+ set.add(OFInstructionType.WRITE_ACTIONS);
+ if((val & APPLY_ACTIONS_VAL) != 0)
+ set.add(OFInstructionType.APPLY_ACTIONS);
+ if((val & CLEAR_ACTIONS_VAL) != 0)
+ set.add(OFInstructionType.CLEAR_ACTIONS);
+ if((val & EXPERIMENTER_VAL) != 0)
+ set.add(OFInstructionType.EXPERIMENTER);
+ if((val & METER_VAL) != 0)
+ set.add(OFInstructionType.METER);
+ return Collections.unmodifiableSet(set);
+ }
+
+ public static short toWireValue(Set<OFInstructionType> set) {
+ short wireValue = 0;
+
+ for(OFInstructionType e: set) {
+ switch(e) {
+ case GOTO_TABLE:
+ wireValue |= GOTO_TABLE_VAL;
+ break;
+ case WRITE_METADATA:
+ wireValue |= WRITE_METADATA_VAL;
+ break;
+ case WRITE_ACTIONS:
+ wireValue |= WRITE_ACTIONS_VAL;
+ break;
+ case APPLY_ACTIONS:
+ wireValue |= APPLY_ACTIONS_VAL;
+ break;
+ case CLEAR_ACTIONS:
+ wireValue |= CLEAR_ACTIONS_VAL;
+ break;
+ case EXPERIMENTER:
+ wireValue |= EXPERIMENTER_VAL;
+ break;
+ case METER:
+ wireValue |= METER_VAL;
+ break;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFInstructionType in version 1.3: " + e);
+ }
+ }
+ return wireValue;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionVer13.java
new file mode 100644
index 0000000..180743d
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionVer13.java
@@ -0,0 +1,71 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_virtual_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.jboss.netty.buffer.ChannelBuffer;
+
+abstract class OFInstructionVer13 {
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 4;
+
+
+ public final static OFInstructionVer13.Reader READER = new Reader();
+
+ static class Reader implements OFMessageReader<OFInstruction> {
+ @Override
+ public OFInstruction readFrom(ChannelBuffer bb) throws OFParseError {
+ if(bb.readableBytes() < MINIMUM_LENGTH)
+ return null;
+ int start = bb.readerIndex();
+ short type = bb.readShort();
+ bb.readerIndex(start);
+ switch(type) {
+ case (short) 0x4:
+ // discriminator value OFInstructionType.APPLY_ACTIONS=4 for class OFInstructionApplyActionsVer13
+ return OFInstructionApplyActionsVer13.READER.readFrom(bb);
+ case (short) 0x5:
+ // discriminator value OFInstructionType.CLEAR_ACTIONS=5 for class OFInstructionClearActionsVer13
+ return OFInstructionClearActionsVer13.READER.readFrom(bb);
+ case (short) 0xffff:
+ // discriminator value OFInstructionType.EXPERIMENTER=65535 for class OFInstructionExperimenterVer13
+ return OFInstructionExperimenterVer13.READER.readFrom(bb);
+ case (short) 0x1:
+ // discriminator value OFInstructionType.GOTO_TABLE=1 for class OFInstructionGotoTableVer13
+ return OFInstructionGotoTableVer13.READER.readFrom(bb);
+ case (short) 0x3:
+ // discriminator value OFInstructionType.WRITE_ACTIONS=3 for class OFInstructionWriteActionsVer13
+ return OFInstructionWriteActionsVer13.READER.readFrom(bb);
+ case (short) 0x2:
+ // discriminator value OFInstructionType.WRITE_METADATA=2 for class OFInstructionWriteMetadataVer13
+ return OFInstructionWriteMetadataVer13.READER.readFrom(bb);
+ case (short) 0x6:
+ // discriminator value OFInstructionType.METER=6 for class OFInstructionMeterVer13
+ return OFInstructionMeterVer13.READER.readFrom(bb);
+ default:
+ throw new OFParseError("Unknown value for discriminator type of class OFInstructionVer13: " + type);
+ }
+ }
+ }
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionWriteActionsVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionWriteActionsVer13.java
new file mode 100644
index 0000000..c775392
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionWriteActionsVer13.java
@@ -0,0 +1,279 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFInstructionWriteActionsVer13 implements OFInstructionWriteActions {
+ private static final Logger logger = LoggerFactory.getLogger(OFInstructionWriteActionsVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 8;
+
+ private final static List<OFAction> DEFAULT_ACTIONS = ImmutableList.<OFAction>of();
+
+ // OF message fields
+ private final List<OFAction> actions;
+//
+ // Immutable default instance
+ final static OFInstructionWriteActionsVer13 DEFAULT = new OFInstructionWriteActionsVer13(
+ DEFAULT_ACTIONS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFInstructionWriteActionsVer13(List<OFAction> actions) {
+ this.actions = actions;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFInstructionType getType() {
+ return OFInstructionType.WRITE_ACTIONS;
+ }
+
+ @Override
+ public List<OFAction> getActions() {
+ return actions;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFInstructionWriteActions.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFInstructionWriteActions.Builder {
+ final OFInstructionWriteActionsVer13 parentMessage;
+
+ // OF message fields
+ private boolean actionsSet;
+ private List<OFAction> actions;
+
+ BuilderWithParent(OFInstructionWriteActionsVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFInstructionType getType() {
+ return OFInstructionType.WRITE_ACTIONS;
+ }
+
+ @Override
+ public List<OFAction> getActions() {
+ return actions;
+ }
+
+ @Override
+ public OFInstructionWriteActions.Builder setActions(List<OFAction> actions) {
+ this.actions = actions;
+ this.actionsSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFInstructionWriteActions build() {
+ List<OFAction> actions = this.actionsSet ? this.actions : parentMessage.actions;
+ if(actions == null)
+ throw new NullPointerException("Property actions must not be null");
+
+ //
+ return new OFInstructionWriteActionsVer13(
+ actions
+ );
+ }
+
+ }
+
+ static class Builder implements OFInstructionWriteActions.Builder {
+ // OF message fields
+ private boolean actionsSet;
+ private List<OFAction> actions;
+
+ @Override
+ public OFInstructionType getType() {
+ return OFInstructionType.WRITE_ACTIONS;
+ }
+
+ @Override
+ public List<OFAction> getActions() {
+ return actions;
+ }
+
+ @Override
+ public OFInstructionWriteActions.Builder setActions(List<OFAction> actions) {
+ this.actions = actions;
+ this.actionsSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFInstructionWriteActions build() {
+ List<OFAction> actions = this.actionsSet ? this.actions : DEFAULT_ACTIONS;
+ if(actions == null)
+ throw new NullPointerException("Property actions must not be null");
+
+
+ return new OFInstructionWriteActionsVer13(
+ actions
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFInstructionWriteActions> {
+ @Override
+ public OFInstructionWriteActions readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 3
+ short type = bb.readShort();
+ if(type != (short) 0x3)
+ throw new OFParseError("Wrong type: Expected=OFInstructionType.WRITE_ACTIONS(3), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ List<OFAction> actions = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFActionVer13.READER);
+
+ OFInstructionWriteActionsVer13 instructionWriteActionsVer13 = new OFInstructionWriteActionsVer13(
+ actions
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", instructionWriteActionsVer13);
+ return instructionWriteActionsVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFInstructionWriteActionsVer13Funnel FUNNEL = new OFInstructionWriteActionsVer13Funnel();
+ static class OFInstructionWriteActionsVer13Funnel implements Funnel<OFInstructionWriteActionsVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFInstructionWriteActionsVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 3
+ sink.putShort((short) 0x3);
+ // FIXME: skip funnel of length
+ // skip pad (4 bytes)
+ FunnelUtils.putList(message.actions, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFInstructionWriteActionsVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFInstructionWriteActionsVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property type = 3
+ bb.writeShort((short) 0x3);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ // pad: 4 bytes
+ bb.writeZero(4);
+ ChannelUtils.writeList(bb, message.actions);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFInstructionWriteActionsVer13(");
+ b.append("actions=").append(actions);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFInstructionWriteActionsVer13 other = (OFInstructionWriteActionsVer13) obj;
+
+ if (actions == null) {
+ if (other.actions != null)
+ return false;
+ } else if (!actions.equals(other.actions))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((actions == null) ? 0 : actions.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionWriteMetadataVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionWriteMetadataVer13.java
new file mode 100644
index 0000000..3438d86
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionWriteMetadataVer13.java
@@ -0,0 +1,326 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFInstructionWriteMetadataVer13 implements OFInstructionWriteMetadata {
+ private static final Logger logger = LoggerFactory.getLogger(OFInstructionWriteMetadataVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 24;
+
+ private final static U64 DEFAULT_METADATA = U64.ZERO;
+ private final static U64 DEFAULT_METADATA_MASK = U64.ZERO;
+
+ // OF message fields
+ private final U64 metadata;
+ private final U64 metadataMask;
+//
+ // Immutable default instance
+ final static OFInstructionWriteMetadataVer13 DEFAULT = new OFInstructionWriteMetadataVer13(
+ DEFAULT_METADATA, DEFAULT_METADATA_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFInstructionWriteMetadataVer13(U64 metadata, U64 metadataMask) {
+ this.metadata = metadata;
+ this.metadataMask = metadataMask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFInstructionType getType() {
+ return OFInstructionType.WRITE_METADATA;
+ }
+
+ @Override
+ public U64 getMetadata() {
+ return metadata;
+ }
+
+ @Override
+ public U64 getMetadataMask() {
+ return metadataMask;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFInstructionWriteMetadata.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFInstructionWriteMetadata.Builder {
+ final OFInstructionWriteMetadataVer13 parentMessage;
+
+ // OF message fields
+ private boolean metadataSet;
+ private U64 metadata;
+ private boolean metadataMaskSet;
+ private U64 metadataMask;
+
+ BuilderWithParent(OFInstructionWriteMetadataVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFInstructionType getType() {
+ return OFInstructionType.WRITE_METADATA;
+ }
+
+ @Override
+ public U64 getMetadata() {
+ return metadata;
+ }
+
+ @Override
+ public OFInstructionWriteMetadata.Builder setMetadata(U64 metadata) {
+ this.metadata = metadata;
+ this.metadataSet = true;
+ return this;
+ }
+ @Override
+ public U64 getMetadataMask() {
+ return metadataMask;
+ }
+
+ @Override
+ public OFInstructionWriteMetadata.Builder setMetadataMask(U64 metadataMask) {
+ this.metadataMask = metadataMask;
+ this.metadataMaskSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFInstructionWriteMetadata build() {
+ U64 metadata = this.metadataSet ? this.metadata : parentMessage.metadata;
+ if(metadata == null)
+ throw new NullPointerException("Property metadata must not be null");
+ U64 metadataMask = this.metadataMaskSet ? this.metadataMask : parentMessage.metadataMask;
+ if(metadataMask == null)
+ throw new NullPointerException("Property metadataMask must not be null");
+
+ //
+ return new OFInstructionWriteMetadataVer13(
+ metadata,
+ metadataMask
+ );
+ }
+
+ }
+
+ static class Builder implements OFInstructionWriteMetadata.Builder {
+ // OF message fields
+ private boolean metadataSet;
+ private U64 metadata;
+ private boolean metadataMaskSet;
+ private U64 metadataMask;
+
+ @Override
+ public OFInstructionType getType() {
+ return OFInstructionType.WRITE_METADATA;
+ }
+
+ @Override
+ public U64 getMetadata() {
+ return metadata;
+ }
+
+ @Override
+ public OFInstructionWriteMetadata.Builder setMetadata(U64 metadata) {
+ this.metadata = metadata;
+ this.metadataSet = true;
+ return this;
+ }
+ @Override
+ public U64 getMetadataMask() {
+ return metadataMask;
+ }
+
+ @Override
+ public OFInstructionWriteMetadata.Builder setMetadataMask(U64 metadataMask) {
+ this.metadataMask = metadataMask;
+ this.metadataMaskSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFInstructionWriteMetadata build() {
+ U64 metadata = this.metadataSet ? this.metadata : DEFAULT_METADATA;
+ if(metadata == null)
+ throw new NullPointerException("Property metadata must not be null");
+ U64 metadataMask = this.metadataMaskSet ? this.metadataMask : DEFAULT_METADATA_MASK;
+ if(metadataMask == null)
+ throw new NullPointerException("Property metadataMask must not be null");
+
+
+ return new OFInstructionWriteMetadataVer13(
+ metadata,
+ metadataMask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFInstructionWriteMetadata> {
+ @Override
+ public OFInstructionWriteMetadata readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 2
+ short type = bb.readShort();
+ if(type != (short) 0x2)
+ throw new OFParseError("Wrong type: Expected=OFInstructionType.WRITE_METADATA(2), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 24)
+ throw new OFParseError("Wrong length: Expected=24(24), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ U64 metadata = U64.ofRaw(bb.readLong());
+ U64 metadataMask = U64.ofRaw(bb.readLong());
+
+ OFInstructionWriteMetadataVer13 instructionWriteMetadataVer13 = new OFInstructionWriteMetadataVer13(
+ metadata,
+ metadataMask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", instructionWriteMetadataVer13);
+ return instructionWriteMetadataVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFInstructionWriteMetadataVer13Funnel FUNNEL = new OFInstructionWriteMetadataVer13Funnel();
+ static class OFInstructionWriteMetadataVer13Funnel implements Funnel<OFInstructionWriteMetadataVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFInstructionWriteMetadataVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 2
+ sink.putShort((short) 0x2);
+ // fixed value property length = 24
+ sink.putShort((short) 0x18);
+ // skip pad (4 bytes)
+ message.metadata.putTo(sink);
+ message.metadataMask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFInstructionWriteMetadataVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFInstructionWriteMetadataVer13 message) {
+ // fixed value property type = 2
+ bb.writeShort((short) 0x2);
+ // fixed value property length = 24
+ bb.writeShort((short) 0x18);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ bb.writeLong(message.metadata.getValue());
+ bb.writeLong(message.metadataMask.getValue());
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFInstructionWriteMetadataVer13(");
+ b.append("metadata=").append(metadata);
+ b.append(", ");
+ b.append("metadataMask=").append(metadataMask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFInstructionWriteMetadataVer13 other = (OFInstructionWriteMetadataVer13) obj;
+
+ if (metadata == null) {
+ if (other.metadata != null)
+ return false;
+ } else if (!metadata.equals(other.metadata))
+ return false;
+ if (metadataMask == null) {
+ if (other.metadataMask != null)
+ return false;
+ } else if (!metadataMask.equals(other.metadataMask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((metadata == null) ? 0 : metadata.hashCode());
+ result = prime * result + ((metadataMask == null) ? 0 : metadataMask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionsVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionsVer13.java
new file mode 100644
index 0000000..b2451a0
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionsVer13.java
@@ -0,0 +1,133 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_factory_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import java.util.List;
+
+
+public class OFInstructionsVer13 implements OFInstructions {
+ public final static OFInstructionsVer13 INSTANCE = new OFInstructionsVer13();
+
+
+
+
+ public OFInstructionApplyActions.Builder buildApplyActions() {
+ return new OFInstructionApplyActionsVer13.Builder();
+ }
+ public OFInstructionApplyActions applyActions(List<OFAction> actions) {
+ return new OFInstructionApplyActionsVer13(
+ actions
+ );
+ }
+
+ public OFInstructionClearActions clearActions() {
+ return OFInstructionClearActionsVer13.INSTANCE;
+ }
+
+ public OFInstructionGotoTable.Builder buildGotoTable() {
+ return new OFInstructionGotoTableVer13.Builder();
+ }
+ public OFInstructionGotoTable gotoTable(TableId tableId) {
+ return new OFInstructionGotoTableVer13(
+ tableId
+ );
+ }
+
+ public OFInstructionWriteActions.Builder buildWriteActions() {
+ return new OFInstructionWriteActionsVer13.Builder();
+ }
+ public OFInstructionWriteActions writeActions(List<OFAction> actions) {
+ return new OFInstructionWriteActionsVer13(
+ actions
+ );
+ }
+
+ public OFInstructionWriteMetadata.Builder buildWriteMetadata() {
+ return new OFInstructionWriteMetadataVer13.Builder();
+ }
+ public OFInstructionWriteMetadata writeMetadata(U64 metadata, U64 metadataMask) {
+ return new OFInstructionWriteMetadataVer13(
+ metadata,
+ metadataMask
+ );
+ }
+
+ public OFInstructionBsnArpOffload bsnArpOffload() {
+ return OFInstructionBsnArpOffloadVer13.INSTANCE;
+ }
+
+ public OFInstructionBsnDeny bsnDeny() {
+ return OFInstructionBsnDenyVer13.INSTANCE;
+ }
+
+ public OFInstructionBsnDhcpOffload bsnDhcpOffload() {
+ return OFInstructionBsnDhcpOffloadVer13.INSTANCE;
+ }
+
+ public OFInstructionBsnDisableSplitHorizonCheck bsnDisableSplitHorizonCheck() {
+ return OFInstructionBsnDisableSplitHorizonCheckVer13.INSTANCE;
+ }
+
+ public OFInstructionBsnDisableSrcMacCheck bsnDisableSrcMacCheck() {
+ return OFInstructionBsnDisableSrcMacCheckVer13.INSTANCE;
+ }
+
+ public OFInstructionBsnDisableVlanCounters bsnDisableVlanCounters() {
+ return OFInstructionBsnDisableVlanCountersVer13.INSTANCE;
+ }
+
+ public OFInstructionBsnPacketOfDeath bsnPacketOfDeath() {
+ return OFInstructionBsnPacketOfDeathVer13.INSTANCE;
+ }
+
+ public OFInstructionBsnPermit bsnPermit() {
+ return OFInstructionBsnPermitVer13.INSTANCE;
+ }
+
+ public OFInstructionBsnPrioritizePdus bsnPrioritizePdus() {
+ return OFInstructionBsnPrioritizePdusVer13.INSTANCE;
+ }
+
+ public OFInstructionBsnRequireVlanXlate bsnRequireVlanXlate() {
+ return OFInstructionBsnRequireVlanXlateVer13.INSTANCE;
+ }
+
+ public OFInstructionMeter.Builder buildMeter() {
+ return new OFInstructionMeterVer13.Builder();
+ }
+ public OFInstructionMeter meter(long meterId) {
+ return new OFInstructionMeterVer13(
+ meterId
+ );
+ }
+
+ public OFMessageReader<OFInstruction> getReader() {
+ return OFInstructionVer13.READER;
+ }
+
+
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFIpv6ExthdrFlagsSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFIpv6ExthdrFlagsSerializerVer13.java
new file mode 100644
index 0000000..a32a3b4
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFIpv6ExthdrFlagsSerializerVer13.java
@@ -0,0 +1,126 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_set_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFIpv6ExthdrFlags;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import java.util.EnumSet;
+import java.util.Collections;
+
+
+public class OFIpv6ExthdrFlagsSerializerVer13 {
+
+ public final static short NONEXT_VAL = (short) 0x1;
+ public final static short ESP_VAL = (short) 0x2;
+ public final static short AUTH_VAL = (short) 0x4;
+ public final static short DEST_VAL = (short) 0x8;
+ public final static short FRAG_VAL = (short) 0x10;
+ public final static short ROUTER_VAL = (short) 0x20;
+ public final static short HOP_VAL = (short) 0x40;
+ public final static short UNREP_VAL = (short) 0x80;
+ public final static short UNSEQ_VAL = (short) 0x100;
+
+ public static Set<OFIpv6ExthdrFlags> readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readShort());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, Set<OFIpv6ExthdrFlags> set) {
+ bb.writeShort(toWireValue(set));
+ }
+
+ public static void putTo(Set<OFIpv6ExthdrFlags> set, PrimitiveSink sink) {
+ sink.putShort(toWireValue(set));
+ }
+
+
+ public static Set<OFIpv6ExthdrFlags> ofWireValue(short val) {
+ EnumSet<OFIpv6ExthdrFlags> set = EnumSet.noneOf(OFIpv6ExthdrFlags.class);
+
+ if((val & NONEXT_VAL) != 0)
+ set.add(OFIpv6ExthdrFlags.NONEXT);
+ if((val & ESP_VAL) != 0)
+ set.add(OFIpv6ExthdrFlags.ESP);
+ if((val & AUTH_VAL) != 0)
+ set.add(OFIpv6ExthdrFlags.AUTH);
+ if((val & DEST_VAL) != 0)
+ set.add(OFIpv6ExthdrFlags.DEST);
+ if((val & FRAG_VAL) != 0)
+ set.add(OFIpv6ExthdrFlags.FRAG);
+ if((val & ROUTER_VAL) != 0)
+ set.add(OFIpv6ExthdrFlags.ROUTER);
+ if((val & HOP_VAL) != 0)
+ set.add(OFIpv6ExthdrFlags.HOP);
+ if((val & UNREP_VAL) != 0)
+ set.add(OFIpv6ExthdrFlags.UNREP);
+ if((val & UNSEQ_VAL) != 0)
+ set.add(OFIpv6ExthdrFlags.UNSEQ);
+ return Collections.unmodifiableSet(set);
+ }
+
+ public static short toWireValue(Set<OFIpv6ExthdrFlags> set) {
+ short wireValue = 0;
+
+ for(OFIpv6ExthdrFlags e: set) {
+ switch(e) {
+ case NONEXT:
+ wireValue |= NONEXT_VAL;
+ break;
+ case ESP:
+ wireValue |= ESP_VAL;
+ break;
+ case AUTH:
+ wireValue |= AUTH_VAL;
+ break;
+ case DEST:
+ wireValue |= DEST_VAL;
+ break;
+ case FRAG:
+ wireValue |= FRAG_VAL;
+ break;
+ case ROUTER:
+ wireValue |= ROUTER_VAL;
+ break;
+ case HOP:
+ wireValue |= HOP_VAL;
+ break;
+ case UNREP:
+ wireValue |= UNREP_VAL;
+ break;
+ case UNSEQ:
+ wireValue |= UNSEQ_VAL;
+ break;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFIpv6ExthdrFlags in version 1.3: " + e);
+ }
+ }
+ return wireValue;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMatchTypeSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMatchTypeSerializerVer13.java
new file mode 100644
index 0000000..0f27141
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMatchTypeSerializerVer13.java
@@ -0,0 +1,74 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFMatchType;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+
+public class OFMatchTypeSerializerVer13 {
+
+ public final static short STANDARD_VAL = (short) 0x0;
+ public final static short OXM_VAL = (short) 0x1;
+
+ public static OFMatchType readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readShort());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, OFMatchType e) {
+ bb.writeShort(toWireValue(e));
+ }
+
+ public static void putTo(OFMatchType e, PrimitiveSink sink) {
+ sink.putShort(toWireValue(e));
+ }
+
+ public static OFMatchType ofWireValue(short val) {
+ switch(val) {
+ case STANDARD_VAL:
+ return OFMatchType.STANDARD;
+ case OXM_VAL:
+ return OFMatchType.OXM;
+ default:
+ throw new IllegalArgumentException("Illegal wire value for type OFMatchType in version 1.3: " + val);
+ }
+ }
+
+
+ public static short toWireValue(OFMatchType e) {
+ switch(e) {
+ case STANDARD:
+ return STANDARD_VAL;
+ case OXM:
+ return OXM_VAL;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFMatchType in version 1.3: " + e);
+ }
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMatchV3Ver13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMatchV3Ver13.java
new file mode 100644
index 0000000..4ca8864
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMatchV3Ver13.java
@@ -0,0 +1,659 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.List;
+import java.util.Iterator;
+import com.google.common.collect.AbstractIterator;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFMatchV3Ver13 implements OFMatchV3 {
+ private static final Logger logger = LoggerFactory.getLogger(OFMatchV3Ver13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 4;
+
+ private final static OFOxmList DEFAULT_OXM_LIST = OFOxmList.EMPTY;
+
+ // OF message fields
+ private final OFOxmList oxmList;
+//
+ // Immutable default instance
+ final static OFMatchV3Ver13 DEFAULT = new OFMatchV3Ver13(
+ DEFAULT_OXM_LIST
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFMatchV3Ver13(OFOxmList oxmList) {
+ this.oxmList = oxmList;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public int getType() {
+ return 0x1;
+ }
+
+ @Override
+ public OFOxmList getOxmList() {
+ return oxmList;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+ @Override
+ public <F extends OFValueType<F>> F get(MatchField<F> field)
+ throws UnsupportedOperationException {
+ if (!supports(field))
+ throw new UnsupportedOperationException("OFMatchV3Ver13 does not support matching on field " + field.getName());
+
+ OFOxm<F> oxm = this.oxmList.get(field);
+
+ if (oxm == null || !field.arePrerequisitesOK(this))
+ return null;
+
+ return oxm.getValue();
+ }
+
+ @Override
+ public <F extends OFValueType<F>> Masked<F> getMasked(MatchField<F> field)
+ throws UnsupportedOperationException {
+ if (!supportsMasked(field))
+ throw new UnsupportedOperationException("OFMatchV3Ver13 does not support masked matching on field " + field.getName());
+
+ OFOxm<F> oxm = this.oxmList.get(field);
+
+ if (oxm == null || !field.arePrerequisitesOK(this))
+ return null;
+
+ if (oxm.getMask() == null)
+ return null;
+
+ // TODO: Make OfOxm extend Masked and just return the OXM?
+ return Masked.of(oxm.getValue(), oxm.getMask());
+ }
+
+ private static boolean supportsField(MatchField<?> field) {
+ switch (field.id) {
+ case ARP_OP:
+ case ARP_SHA:
+ case ARP_SPA:
+ case ARP_THA:
+ case ARP_TPA:
+ case BSN_EGR_PORT_GROUP_ID:
+ case BSN_GLOBAL_VRF_ALLOWED:
+ case BSN_IN_PORTS_128:
+ case BSN_L3_DST_CLASS_ID:
+ case BSN_L3_INTERFACE_CLASS_ID:
+ case BSN_L3_SRC_CLASS_ID:
+ case BSN_LAG_ID:
+ case BSN_TCP_FLAGS:
+ case BSN_UDF0:
+ case BSN_UDF1:
+ case BSN_UDF2:
+ case BSN_UDF3:
+ case BSN_UDF4:
+ case BSN_UDF5:
+ case BSN_UDF6:
+ case BSN_UDF7:
+ case BSN_VLAN_XLATE_PORT_GROUP_ID:
+ case BSN_VRF:
+ case ETH_DST:
+ case ETH_SRC:
+ case ETH_TYPE:
+ case ICMPV4_CODE:
+ case ICMPV4_TYPE:
+ case ICMPV6_CODE:
+ case ICMPV6_TYPE:
+ case IN_PHY_PORT:
+ case IN_PORT:
+ case IPV4_DST:
+ case IPV4_SRC:
+ case IPV6_DST:
+ case IPV6_FLABEL:
+ case IPV6_ND_SLL:
+ case IPV6_ND_TARGET:
+ case IPV6_ND_TLL:
+ case IPV6_SRC:
+ case IP_DSCP:
+ case IP_ECN:
+ case IP_PROTO:
+ case METADATA:
+ case MPLS_LABEL:
+ case MPLS_TC:
+ case SCTP_DST:
+ case SCTP_SRC:
+ case TCP_DST:
+ case TCP_SRC:
+ case TUNNEL_ID:
+ case UDP_DST:
+ case UDP_SRC:
+ case VLAN_PCP:
+ case VLAN_VID:
+ return true;
+ default:
+ return false;
+ }
+ }
+
+ @Override
+ public boolean supports(MatchField<?> field) {
+ return supportsField(field);
+ }
+
+ @Override
+ public boolean supportsMasked(MatchField<?> field) {
+ return supportsField(field);
+ }
+
+ @Override
+ public boolean isExact(MatchField<?> field) {
+ if (!supports(field))
+ throw new UnsupportedOperationException("OFMatchV3Ver13 does not support matching on field " + field.getName());
+
+ OFOxm<?> oxm = this.oxmList.get(field);
+
+ return oxm != null && !oxm.isMasked();
+ }
+
+ @Override
+ public boolean isFullyWildcarded(MatchField<?> field) {
+ if (!supports(field))
+ throw new UnsupportedOperationException("OFMatchV3Ver13 does not support matching on field " + field.getName());
+
+ OFOxm<?> oxm = this.oxmList.get(field);
+
+ return oxm == null;
+ }
+
+ @Override
+ public boolean isPartiallyMasked(MatchField<?> field) {
+ if (!supports(field))
+ throw new UnsupportedOperationException("OFMatchV3Ver13 does not support matching on field " + field.getName());
+
+ OFOxm<?> oxm = this.oxmList.get(field);
+
+ return oxm != null && oxm.isMasked();
+ }
+
+ private class MatchFieldIterator extends AbstractIterator<MatchField<?>> {
+ private Iterator<OFOxm<?>> oxmIterator;
+
+ MatchFieldIterator() {
+ oxmIterator = oxmList.iterator();
+ }
+
+ @Override
+ protected MatchField<?> computeNext() {
+ while(oxmIterator.hasNext()) {
+ OFOxm<?> oxm = oxmIterator.next();
+ if(oxm.getMatchField().arePrerequisitesOK(OFMatchV3Ver13.this))
+ return oxm.getMatchField();
+ }
+ endOfData();
+ return null;
+ }
+ }
+
+ @Override
+ public Iterable<MatchField<?>> getMatchFields() {
+ return new Iterable<MatchField<?>>() {
+ public Iterator<MatchField<?>> iterator() {
+ return new MatchFieldIterator();
+ }
+ };
+ }
+
+ public OFMatchV3.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFMatchV3.Builder {
+ final OFMatchV3Ver13 parentMessage;
+
+ // OF message fields
+ private boolean oxmListSet;
+ private OFOxmList oxmList;
+
+ BuilderWithParent(OFMatchV3Ver13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public int getType() {
+ return 0x1;
+ }
+
+ @Override
+ public OFOxmList getOxmList() {
+ return oxmList;
+ }
+
+ @Override
+ public OFMatchV3.Builder setOxmList(OFOxmList oxmList) {
+ this.oxmList = oxmList;
+ this.oxmListSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFMatchV3 build() {
+ OFOxmList oxmList = this.oxmListSet ? this.oxmList : parentMessage.oxmList;
+ if(oxmList == null)
+ throw new NullPointerException("Property oxmList must not be null");
+
+ //
+ return new OFMatchV3Ver13(
+ oxmList
+ );
+ }
+
+ private OFOxmList.Builder oxmListBuilder;
+
+ private void initBuilder() {
+ if (oxmListBuilder != null)
+ return;
+ oxmListBuilder = new OFOxmList.Builder();
+ }
+
+ private void updateOxmList() {
+ this.oxmList = this.oxmListBuilder.build();
+ this.oxmListSet = true;
+ }
+
+ private <F extends OFValueType<F>> OFOxm<F> getOxm(MatchField<F> field) {
+ return this.oxmListSet ? this.oxmList.get(field) : parentMessage.oxmList.get(field);
+ }
+
+ @Override
+ public <F extends OFValueType<F>> F get(MatchField<F> field)
+ throws UnsupportedOperationException {
+ OFOxm<F> value = getOxm(field);
+ if (value == null)
+ return null;
+ return value.getValue();
+ }
+
+ @Override
+ public <F extends OFValueType<F>> Masked<F> getMasked(MatchField<F> field)
+ throws UnsupportedOperationException {
+ OFOxm<F> value = getOxm(field);
+ if (value == null || !value.isMasked())
+ return null;
+ // TODO: If changing OXMs to extend Masked, then use it here
+ return Masked.of(value.getValue(), value.getMask());
+ }
+
+ @Override
+ public boolean supports(MatchField<?> field) {
+ return supportsField(field);
+ }
+
+ @Override
+ public boolean supportsMasked(MatchField<?> field) {
+ return supportsField(field);
+ }
+
+ @Override
+ public boolean isExact(MatchField<?> field) {
+ OFOxm<?> value = getOxm(field);
+ return (value != null && !value.isMasked());
+ }
+
+ @Override
+ public boolean isFullyWildcarded(MatchField<?> field) {
+ OFOxm<?> value = getOxm(field);
+ return (value == null);
+ }
+
+ @Override
+ public boolean isPartiallyMasked(MatchField<?> field) {
+ OFOxm<?> value = getOxm(field);
+ return (value != null && value.isMasked());
+ }
+
+ @Override
+ public <F extends OFValueType<F>> Match.Builder setExact(
+ MatchField<F> field, F value) {
+ initBuilder();
+ OFOxm<F> oxm = OFFactories.getFactory(OFVersion.OF_13).oxms().fromValue(value, field);
+ this.oxmListBuilder.set(oxm);
+ updateOxmList();
+ return this;
+ }
+
+ @Override
+ public <F extends OFValueType<F>> Match.Builder setMasked(
+ MatchField<F> field, F value, F mask) {
+ initBuilder();
+ OFOxm<F> oxm = OFFactories.getFactory(OFVersion.OF_13).oxms().fromValueAndMask(value, mask, field);
+ this.oxmListBuilder.set(oxm);
+ updateOxmList();
+ return this;
+ }
+
+ @Override
+ public <F extends OFValueType<F>> Match.Builder setMasked(
+ MatchField<F> field, Masked<F> valueWithMask) {
+ initBuilder();
+ OFOxm<F> oxm = OFFactories.getFactory(OFVersion.OF_13).oxms().fromMasked(valueWithMask, field);
+ this.oxmListBuilder.set(oxm);
+ updateOxmList();
+ return this;
+ }
+
+ @Override
+ public <F extends OFValueType<F>> Match.Builder wildcard(MatchField<F> field) {
+ initBuilder();
+ this.oxmListBuilder.unset(field);
+ updateOxmList();
+ return this;
+ }
+
+
+ }
+
+ static class Builder implements OFMatchV3.Builder {
+ // OF message fields
+ private boolean oxmListSet;
+ private OFOxmList oxmList;
+
+ @Override
+ public int getType() {
+ return 0x1;
+ }
+
+ @Override
+ public OFOxmList getOxmList() {
+ return oxmList;
+ }
+
+ @Override
+ public OFMatchV3.Builder setOxmList(OFOxmList oxmList) {
+ this.oxmList = oxmList;
+ this.oxmListSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFMatchV3 build() {
+ OFOxmList oxmList = this.oxmListSet ? this.oxmList : DEFAULT_OXM_LIST;
+ if(oxmList == null)
+ throw new NullPointerException("Property oxmList must not be null");
+
+
+ return new OFMatchV3Ver13(
+ oxmList
+ );
+ }
+
+ private OFOxmList.Builder oxmListBuilder;
+
+ private void initBuilder() {
+ if (oxmListBuilder != null)
+ return;
+ oxmListBuilder = new OFOxmList.Builder();
+ }
+
+ private void updateOxmList() {
+ this.oxmList = this.oxmListBuilder.build();
+ this.oxmListSet = true;
+ }
+
+ private <F extends OFValueType<F>> OFOxm<F> getOxm(MatchField<F> field) {
+ return this.oxmListSet ? this.oxmList.get(field) : null;
+ }
+
+ @Override
+ public <F extends OFValueType<F>> F get(MatchField<F> field)
+ throws UnsupportedOperationException {
+ OFOxm<F> value = getOxm(field);
+ if (value == null)
+ return null;
+ return value.getValue();
+ }
+
+ @Override
+ public <F extends OFValueType<F>> Masked<F> getMasked(MatchField<F> field)
+ throws UnsupportedOperationException {
+ OFOxm<F> value = getOxm(field);
+ if (value == null || !value.isMasked())
+ return null;
+ // TODO: If changing OXMs to extend Masked, then use it here
+ return Masked.of(value.getValue(), value.getMask());
+ }
+
+ @Override
+ public boolean supports(MatchField<?> field) {
+ return supportsField(field);
+ }
+
+ @Override
+ public boolean supportsMasked(MatchField<?> field) {
+ return supportsField(field);
+ }
+
+ @Override
+ public boolean isExact(MatchField<?> field) {
+ OFOxm<?> value = getOxm(field);
+ return (value != null && !value.isMasked());
+ }
+
+ @Override
+ public boolean isFullyWildcarded(MatchField<?> field) {
+ OFOxm<?> value = getOxm(field);
+ return (value == null);
+ }
+
+ @Override
+ public boolean isPartiallyMasked(MatchField<?> field) {
+ OFOxm<?> value = getOxm(field);
+ return (value != null && value.isMasked());
+ }
+
+ @Override
+ public <F extends OFValueType<F>> Match.Builder setExact(
+ MatchField<F> field, F value) {
+ initBuilder();
+ OFOxm<F> oxm = OFFactories.getFactory(OFVersion.OF_13).oxms().fromValue(value, field);
+ this.oxmListBuilder.set(oxm);
+ updateOxmList();
+ return this;
+ }
+
+ @Override
+ public <F extends OFValueType<F>> Match.Builder setMasked(
+ MatchField<F> field, F value, F mask) {
+ initBuilder();
+ OFOxm<F> oxm = OFFactories.getFactory(OFVersion.OF_13).oxms().fromValueAndMask(value, mask, field);
+ this.oxmListBuilder.set(oxm);
+ updateOxmList();
+ return this;
+ }
+
+ @Override
+ public <F extends OFValueType<F>> Match.Builder setMasked(
+ MatchField<F> field, Masked<F> valueWithMask) {
+ initBuilder();
+ OFOxm<F> oxm = OFFactories.getFactory(OFVersion.OF_13).oxms().fromMasked(valueWithMask, field);
+ this.oxmListBuilder.set(oxm);
+ updateOxmList();
+ return this;
+ }
+
+ @Override
+ public <F extends OFValueType<F>> Match.Builder wildcard(MatchField<F> field) {
+ initBuilder();
+ this.oxmListBuilder.unset(field);
+ updateOxmList();
+ return this;
+ }
+
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFMatchV3> {
+ @Override
+ public OFMatchV3 readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 0x1
+ short type = bb.readShort();
+ if(type != (short) 0x1)
+ throw new OFParseError("Wrong type: Expected=0x1(0x1), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ OFOxmList oxmList = OFOxmList.readFrom(bb, length - (bb.readerIndex() - start), OFOxmVer13.READER);
+ // align message to 8 bytes (length does not contain alignment)
+ bb.skipBytes(((length + 7)/8 * 8 ) - length );
+
+ OFMatchV3Ver13 matchV3Ver13 = new OFMatchV3Ver13(
+ oxmList
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", matchV3Ver13);
+ return matchV3Ver13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFMatchV3Ver13Funnel FUNNEL = new OFMatchV3Ver13Funnel();
+ static class OFMatchV3Ver13Funnel implements Funnel<OFMatchV3Ver13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFMatchV3Ver13 message, PrimitiveSink sink) {
+ // fixed value property type = 0x1
+ sink.putShort((short) 0x1);
+ // FIXME: skip funnel of length
+ message.oxmList.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFMatchV3Ver13> {
+ @Override
+ public void write(ChannelBuffer bb, OFMatchV3Ver13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property type = 0x1
+ bb.writeShort((short) 0x1);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ message.oxmList.writeTo(bb);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ int alignedLength = ((length + 7)/8 * 8);
+ bb.setShort(lengthIndex, length);
+ // align message to 8 bytes
+ bb.writeZero(alignedLength - length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFMatchV3Ver13(");
+ boolean first = true;
+ for(MatchField<?> field : getMatchFields()) {
+ if(first)
+ first = false;
+ else
+ b.append(", ");
+ String name = field.getName();
+ b.append(name).append('=').append(this.get(field));
+ if(isPartiallyMasked(field)) {
+ b.append('/').append(this.getMasked(field).getMask());
+ }
+ }
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFMatchV3Ver13 other = (OFMatchV3Ver13) obj;
+
+ if (oxmList == null) {
+ if (other.oxmList != null)
+ return false;
+ } else if (!oxmList.equals(other.oxmList))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((oxmList == null) ? 0 : oxmList.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMessageVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMessageVer13.java
new file mode 100644
index 0000000..b98160c
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMessageVer13.java
@@ -0,0 +1,145 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_virtual_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.jboss.netty.buffer.ChannelBuffer;
+import java.util.Set;
+
+abstract class OFMessageVer13 {
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 8;
+
+
+ public final static OFMessageVer13.Reader READER = new Reader();
+
+ static class Reader implements OFMessageReader<OFMessage> {
+ @Override
+ public OFMessage readFrom(ChannelBuffer bb) throws OFParseError {
+ if(bb.readableBytes() < MINIMUM_LENGTH)
+ return null;
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ byte type = bb.readByte();
+ bb.readerIndex(start);
+ switch(type) {
+ case (byte) 0x13:
+ // discriminator value OFType.STATS_REPLY=19 for class OFStatsReplyVer13
+ return OFStatsReplyVer13.READER.readFrom(bb);
+ case (byte) 0x12:
+ // discriminator value OFType.STATS_REQUEST=18 for class OFStatsRequestVer13
+ return OFStatsRequestVer13.READER.readFrom(bb);
+ case (byte) 0x1:
+ // discriminator value OFType.ERROR=1 for class OFErrorMsgVer13
+ return OFErrorMsgVer13.READER.readFrom(bb);
+ case (byte) 0x15:
+ // discriminator value OFType.BARRIER_REPLY=21 for class OFBarrierReplyVer13
+ return OFBarrierReplyVer13.READER.readFrom(bb);
+ case (byte) 0x14:
+ // discriminator value OFType.BARRIER_REQUEST=20 for class OFBarrierRequestVer13
+ return OFBarrierRequestVer13.READER.readFrom(bb);
+ case (byte) 0x4:
+ // discriminator value OFType.EXPERIMENTER=4 for class OFExperimenterVer13
+ return OFExperimenterVer13.READER.readFrom(bb);
+ case (byte) 0x3:
+ // discriminator value OFType.ECHO_REPLY=3 for class OFEchoReplyVer13
+ return OFEchoReplyVer13.READER.readFrom(bb);
+ case (byte) 0x2:
+ // discriminator value OFType.ECHO_REQUEST=2 for class OFEchoRequestVer13
+ return OFEchoRequestVer13.READER.readFrom(bb);
+ case (byte) 0x6:
+ // discriminator value OFType.FEATURES_REPLY=6 for class OFFeaturesReplyVer13
+ return OFFeaturesReplyVer13.READER.readFrom(bb);
+ case (byte) 0x5:
+ // discriminator value OFType.FEATURES_REQUEST=5 for class OFFeaturesRequestVer13
+ return OFFeaturesRequestVer13.READER.readFrom(bb);
+ case (byte) 0xe:
+ // discriminator value OFType.FLOW_MOD=14 for class OFFlowModVer13
+ return OFFlowModVer13.READER.readFrom(bb);
+ case (byte) 0xb:
+ // discriminator value OFType.FLOW_REMOVED=11 for class OFFlowRemovedVer13
+ return OFFlowRemovedVer13.READER.readFrom(bb);
+ case (byte) 0x8:
+ // discriminator value OFType.GET_CONFIG_REPLY=8 for class OFGetConfigReplyVer13
+ return OFGetConfigReplyVer13.READER.readFrom(bb);
+ case (byte) 0x7:
+ // discriminator value OFType.GET_CONFIG_REQUEST=7 for class OFGetConfigRequestVer13
+ return OFGetConfigRequestVer13.READER.readFrom(bb);
+ case (byte) 0x0:
+ // discriminator value OFType.HELLO=0 for class OFHelloVer13
+ return OFHelloVer13.READER.readFrom(bb);
+ case (byte) 0xa:
+ // discriminator value OFType.PACKET_IN=10 for class OFPacketInVer13
+ return OFPacketInVer13.READER.readFrom(bb);
+ case (byte) 0xd:
+ // discriminator value OFType.PACKET_OUT=13 for class OFPacketOutVer13
+ return OFPacketOutVer13.READER.readFrom(bb);
+ case (byte) 0x10:
+ // discriminator value OFType.PORT_MOD=16 for class OFPortModVer13
+ return OFPortModVer13.READER.readFrom(bb);
+ case (byte) 0xc:
+ // discriminator value OFType.PORT_STATUS=12 for class OFPortStatusVer13
+ return OFPortStatusVer13.READER.readFrom(bb);
+ case (byte) 0x17:
+ // discriminator value OFType.QUEUE_GET_CONFIG_REPLY=23 for class OFQueueGetConfigReplyVer13
+ return OFQueueGetConfigReplyVer13.READER.readFrom(bb);
+ case (byte) 0x16:
+ // discriminator value OFType.QUEUE_GET_CONFIG_REQUEST=22 for class OFQueueGetConfigRequestVer13
+ return OFQueueGetConfigRequestVer13.READER.readFrom(bb);
+ case (byte) 0x9:
+ // discriminator value OFType.SET_CONFIG=9 for class OFSetConfigVer13
+ return OFSetConfigVer13.READER.readFrom(bb);
+ case (byte) 0x11:
+ // discriminator value OFType.TABLE_MOD=17 for class OFTableModVer13
+ return OFTableModVer13.READER.readFrom(bb);
+ case (byte) 0xf:
+ // discriminator value OFType.GROUP_MOD=15 for class OFGroupModVer13
+ return OFGroupModVer13.READER.readFrom(bb);
+ case (byte) 0x19:
+ // discriminator value OFType.ROLE_REPLY=25 for class OFRoleReplyVer13
+ return OFRoleReplyVer13.READER.readFrom(bb);
+ case (byte) 0x18:
+ // discriminator value OFType.ROLE_REQUEST=24 for class OFRoleRequestVer13
+ return OFRoleRequestVer13.READER.readFrom(bb);
+ case (byte) 0x1b:
+ // discriminator value OFType.GET_ASYNC_REPLY=27 for class OFAsyncGetReplyVer13
+ return OFAsyncGetReplyVer13.READER.readFrom(bb);
+ case (byte) 0x1a:
+ // discriminator value OFType.GET_ASYNC_REQUEST=26 for class OFAsyncGetRequestVer13
+ return OFAsyncGetRequestVer13.READER.readFrom(bb);
+ case (byte) 0x1c:
+ // discriminator value OFType.SET_ASYNC=28 for class OFAsyncSetVer13
+ return OFAsyncSetVer13.READER.readFrom(bb);
+ case (byte) 0x1d:
+ // discriminator value OFType.METER_MOD=29 for class OFMeterModVer13
+ return OFMeterModVer13.READER.readFrom(bb);
+ default:
+ throw new OFParseError("Unknown value for discriminator type of class OFMessageVer13: " + type);
+ }
+ }
+ }
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterBandDropVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterBandDropVer13.java
new file mode 100644
index 0000000..3bbe176
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterBandDropVer13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFMeterBandDropVer13 implements OFMeterBandDrop {
+ private static final Logger logger = LoggerFactory.getLogger(OFMeterBandDropVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 16;
+
+ private final static long DEFAULT_RATE = 0x0L;
+ private final static long DEFAULT_BURST_SIZE = 0x0L;
+
+ // OF message fields
+ private final long rate;
+ private final long burstSize;
+//
+ // Immutable default instance
+ final static OFMeterBandDropVer13 DEFAULT = new OFMeterBandDropVer13(
+ DEFAULT_RATE, DEFAULT_BURST_SIZE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFMeterBandDropVer13(long rate, long burstSize) {
+ this.rate = rate;
+ this.burstSize = burstSize;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public int getType() {
+ return 0x1;
+ }
+
+ @Override
+ public long getRate() {
+ return rate;
+ }
+
+ @Override
+ public long getBurstSize() {
+ return burstSize;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFMeterBandDrop.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFMeterBandDrop.Builder {
+ final OFMeterBandDropVer13 parentMessage;
+
+ // OF message fields
+ private boolean rateSet;
+ private long rate;
+ private boolean burstSizeSet;
+ private long burstSize;
+
+ BuilderWithParent(OFMeterBandDropVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public int getType() {
+ return 0x1;
+ }
+
+ @Override
+ public long getRate() {
+ return rate;
+ }
+
+ @Override
+ public OFMeterBandDrop.Builder setRate(long rate) {
+ this.rate = rate;
+ this.rateSet = true;
+ return this;
+ }
+ @Override
+ public long getBurstSize() {
+ return burstSize;
+ }
+
+ @Override
+ public OFMeterBandDrop.Builder setBurstSize(long burstSize) {
+ this.burstSize = burstSize;
+ this.burstSizeSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFMeterBandDrop build() {
+ long rate = this.rateSet ? this.rate : parentMessage.rate;
+ long burstSize = this.burstSizeSet ? this.burstSize : parentMessage.burstSize;
+
+ //
+ return new OFMeterBandDropVer13(
+ rate,
+ burstSize
+ );
+ }
+
+ }
+
+ static class Builder implements OFMeterBandDrop.Builder {
+ // OF message fields
+ private boolean rateSet;
+ private long rate;
+ private boolean burstSizeSet;
+ private long burstSize;
+
+ @Override
+ public int getType() {
+ return 0x1;
+ }
+
+ @Override
+ public long getRate() {
+ return rate;
+ }
+
+ @Override
+ public OFMeterBandDrop.Builder setRate(long rate) {
+ this.rate = rate;
+ this.rateSet = true;
+ return this;
+ }
+ @Override
+ public long getBurstSize() {
+ return burstSize;
+ }
+
+ @Override
+ public OFMeterBandDrop.Builder setBurstSize(long burstSize) {
+ this.burstSize = burstSize;
+ this.burstSizeSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFMeterBandDrop build() {
+ long rate = this.rateSet ? this.rate : DEFAULT_RATE;
+ long burstSize = this.burstSizeSet ? this.burstSize : DEFAULT_BURST_SIZE;
+
+
+ return new OFMeterBandDropVer13(
+ rate,
+ burstSize
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFMeterBandDrop> {
+ @Override
+ public OFMeterBandDrop readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 0x1
+ short type = bb.readShort();
+ if(type != (short) 0x1)
+ throw new OFParseError("Wrong type: Expected=0x1(0x1), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 16)
+ throw new OFParseError("Wrong length: Expected=16(16), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long rate = U32.f(bb.readInt());
+ long burstSize = U32.f(bb.readInt());
+ // pad: 4 bytes
+ bb.skipBytes(4);
+
+ OFMeterBandDropVer13 meterBandDropVer13 = new OFMeterBandDropVer13(
+ rate,
+ burstSize
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", meterBandDropVer13);
+ return meterBandDropVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFMeterBandDropVer13Funnel FUNNEL = new OFMeterBandDropVer13Funnel();
+ static class OFMeterBandDropVer13Funnel implements Funnel<OFMeterBandDropVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFMeterBandDropVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 0x1
+ sink.putShort((short) 0x1);
+ // fixed value property length = 16
+ sink.putShort((short) 0x10);
+ sink.putLong(message.rate);
+ sink.putLong(message.burstSize);
+ // skip pad (4 bytes)
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFMeterBandDropVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFMeterBandDropVer13 message) {
+ // fixed value property type = 0x1
+ bb.writeShort((short) 0x1);
+ // fixed value property length = 16
+ bb.writeShort((short) 0x10);
+ bb.writeInt(U32.t(message.rate));
+ bb.writeInt(U32.t(message.burstSize));
+ // pad: 4 bytes
+ bb.writeZero(4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFMeterBandDropVer13(");
+ b.append("rate=").append(rate);
+ b.append(", ");
+ b.append("burstSize=").append(burstSize);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFMeterBandDropVer13 other = (OFMeterBandDropVer13) obj;
+
+ if( rate != other.rate)
+ return false;
+ if( burstSize != other.burstSize)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (rate ^ (rate >>> 32));
+ result = prime * (int) (burstSize ^ (burstSize >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterBandDscpRemarkVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterBandDscpRemarkVer13.java
new file mode 100644
index 0000000..9321db4
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterBandDscpRemarkVer13.java
@@ -0,0 +1,359 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFMeterBandDscpRemarkVer13 implements OFMeterBandDscpRemark {
+ private static final Logger logger = LoggerFactory.getLogger(OFMeterBandDscpRemarkVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 16;
+
+ private final static long DEFAULT_RATE = 0x0L;
+ private final static long DEFAULT_BURST_SIZE = 0x0L;
+ private final static short DEFAULT_PREC_LEVEL = (short) 0x0;
+
+ // OF message fields
+ private final long rate;
+ private final long burstSize;
+ private final short precLevel;
+//
+ // Immutable default instance
+ final static OFMeterBandDscpRemarkVer13 DEFAULT = new OFMeterBandDscpRemarkVer13(
+ DEFAULT_RATE, DEFAULT_BURST_SIZE, DEFAULT_PREC_LEVEL
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFMeterBandDscpRemarkVer13(long rate, long burstSize, short precLevel) {
+ this.rate = rate;
+ this.burstSize = burstSize;
+ this.precLevel = precLevel;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public int getType() {
+ return 0x2;
+ }
+
+ @Override
+ public long getRate() {
+ return rate;
+ }
+
+ @Override
+ public long getBurstSize() {
+ return burstSize;
+ }
+
+ @Override
+ public short getPrecLevel() {
+ return precLevel;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFMeterBandDscpRemark.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFMeterBandDscpRemark.Builder {
+ final OFMeterBandDscpRemarkVer13 parentMessage;
+
+ // OF message fields
+ private boolean rateSet;
+ private long rate;
+ private boolean burstSizeSet;
+ private long burstSize;
+ private boolean precLevelSet;
+ private short precLevel;
+
+ BuilderWithParent(OFMeterBandDscpRemarkVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public int getType() {
+ return 0x2;
+ }
+
+ @Override
+ public long getRate() {
+ return rate;
+ }
+
+ @Override
+ public OFMeterBandDscpRemark.Builder setRate(long rate) {
+ this.rate = rate;
+ this.rateSet = true;
+ return this;
+ }
+ @Override
+ public long getBurstSize() {
+ return burstSize;
+ }
+
+ @Override
+ public OFMeterBandDscpRemark.Builder setBurstSize(long burstSize) {
+ this.burstSize = burstSize;
+ this.burstSizeSet = true;
+ return this;
+ }
+ @Override
+ public short getPrecLevel() {
+ return precLevel;
+ }
+
+ @Override
+ public OFMeterBandDscpRemark.Builder setPrecLevel(short precLevel) {
+ this.precLevel = precLevel;
+ this.precLevelSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFMeterBandDscpRemark build() {
+ long rate = this.rateSet ? this.rate : parentMessage.rate;
+ long burstSize = this.burstSizeSet ? this.burstSize : parentMessage.burstSize;
+ short precLevel = this.precLevelSet ? this.precLevel : parentMessage.precLevel;
+
+ //
+ return new OFMeterBandDscpRemarkVer13(
+ rate,
+ burstSize,
+ precLevel
+ );
+ }
+
+ }
+
+ static class Builder implements OFMeterBandDscpRemark.Builder {
+ // OF message fields
+ private boolean rateSet;
+ private long rate;
+ private boolean burstSizeSet;
+ private long burstSize;
+ private boolean precLevelSet;
+ private short precLevel;
+
+ @Override
+ public int getType() {
+ return 0x2;
+ }
+
+ @Override
+ public long getRate() {
+ return rate;
+ }
+
+ @Override
+ public OFMeterBandDscpRemark.Builder setRate(long rate) {
+ this.rate = rate;
+ this.rateSet = true;
+ return this;
+ }
+ @Override
+ public long getBurstSize() {
+ return burstSize;
+ }
+
+ @Override
+ public OFMeterBandDscpRemark.Builder setBurstSize(long burstSize) {
+ this.burstSize = burstSize;
+ this.burstSizeSet = true;
+ return this;
+ }
+ @Override
+ public short getPrecLevel() {
+ return precLevel;
+ }
+
+ @Override
+ public OFMeterBandDscpRemark.Builder setPrecLevel(short precLevel) {
+ this.precLevel = precLevel;
+ this.precLevelSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFMeterBandDscpRemark build() {
+ long rate = this.rateSet ? this.rate : DEFAULT_RATE;
+ long burstSize = this.burstSizeSet ? this.burstSize : DEFAULT_BURST_SIZE;
+ short precLevel = this.precLevelSet ? this.precLevel : DEFAULT_PREC_LEVEL;
+
+
+ return new OFMeterBandDscpRemarkVer13(
+ rate,
+ burstSize,
+ precLevel
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFMeterBandDscpRemark> {
+ @Override
+ public OFMeterBandDscpRemark readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 0x2
+ short type = bb.readShort();
+ if(type != (short) 0x2)
+ throw new OFParseError("Wrong type: Expected=0x2(0x2), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 16)
+ throw new OFParseError("Wrong length: Expected=16(16), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long rate = U32.f(bb.readInt());
+ long burstSize = U32.f(bb.readInt());
+ short precLevel = U8.f(bb.readByte());
+ // pad: 3 bytes
+ bb.skipBytes(3);
+
+ OFMeterBandDscpRemarkVer13 meterBandDscpRemarkVer13 = new OFMeterBandDscpRemarkVer13(
+ rate,
+ burstSize,
+ precLevel
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", meterBandDscpRemarkVer13);
+ return meterBandDscpRemarkVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFMeterBandDscpRemarkVer13Funnel FUNNEL = new OFMeterBandDscpRemarkVer13Funnel();
+ static class OFMeterBandDscpRemarkVer13Funnel implements Funnel<OFMeterBandDscpRemarkVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFMeterBandDscpRemarkVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 0x2
+ sink.putShort((short) 0x2);
+ // fixed value property length = 16
+ sink.putShort((short) 0x10);
+ sink.putLong(message.rate);
+ sink.putLong(message.burstSize);
+ sink.putShort(message.precLevel);
+ // skip pad (3 bytes)
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFMeterBandDscpRemarkVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFMeterBandDscpRemarkVer13 message) {
+ // fixed value property type = 0x2
+ bb.writeShort((short) 0x2);
+ // fixed value property length = 16
+ bb.writeShort((short) 0x10);
+ bb.writeInt(U32.t(message.rate));
+ bb.writeInt(U32.t(message.burstSize));
+ bb.writeByte(U8.t(message.precLevel));
+ // pad: 3 bytes
+ bb.writeZero(3);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFMeterBandDscpRemarkVer13(");
+ b.append("rate=").append(rate);
+ b.append(", ");
+ b.append("burstSize=").append(burstSize);
+ b.append(", ");
+ b.append("precLevel=").append(precLevel);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFMeterBandDscpRemarkVer13 other = (OFMeterBandDscpRemarkVer13) obj;
+
+ if( rate != other.rate)
+ return false;
+ if( burstSize != other.burstSize)
+ return false;
+ if( precLevel != other.precLevel)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (rate ^ (rate >>> 32));
+ result = prime * (int) (burstSize ^ (burstSize >>> 32));
+ result = prime * result + precLevel;
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterBandExperimenterVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterBandExperimenterVer13.java
new file mode 100644
index 0000000..a85fd93
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterBandExperimenterVer13.java
@@ -0,0 +1,354 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFMeterBandExperimenterVer13 implements OFMeterBandExperimenter {
+ private static final Logger logger = LoggerFactory.getLogger(OFMeterBandExperimenterVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 16;
+
+ private final static long DEFAULT_RATE = 0x0L;
+ private final static long DEFAULT_BURST_SIZE = 0x0L;
+ private final static long DEFAULT_EXPERIMENTER = 0x0L;
+
+ // OF message fields
+ private final long rate;
+ private final long burstSize;
+ private final long experimenter;
+//
+ // Immutable default instance
+ final static OFMeterBandExperimenterVer13 DEFAULT = new OFMeterBandExperimenterVer13(
+ DEFAULT_RATE, DEFAULT_BURST_SIZE, DEFAULT_EXPERIMENTER
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFMeterBandExperimenterVer13(long rate, long burstSize, long experimenter) {
+ this.rate = rate;
+ this.burstSize = burstSize;
+ this.experimenter = experimenter;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public int getType() {
+ return 0xffff;
+ }
+
+ @Override
+ public long getRate() {
+ return rate;
+ }
+
+ @Override
+ public long getBurstSize() {
+ return burstSize;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return experimenter;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFMeterBandExperimenter.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFMeterBandExperimenter.Builder {
+ final OFMeterBandExperimenterVer13 parentMessage;
+
+ // OF message fields
+ private boolean rateSet;
+ private long rate;
+ private boolean burstSizeSet;
+ private long burstSize;
+ private boolean experimenterSet;
+ private long experimenter;
+
+ BuilderWithParent(OFMeterBandExperimenterVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public int getType() {
+ return 0xffff;
+ }
+
+ @Override
+ public long getRate() {
+ return rate;
+ }
+
+ @Override
+ public OFMeterBandExperimenter.Builder setRate(long rate) {
+ this.rate = rate;
+ this.rateSet = true;
+ return this;
+ }
+ @Override
+ public long getBurstSize() {
+ return burstSize;
+ }
+
+ @Override
+ public OFMeterBandExperimenter.Builder setBurstSize(long burstSize) {
+ this.burstSize = burstSize;
+ this.burstSizeSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return experimenter;
+ }
+
+ @Override
+ public OFMeterBandExperimenter.Builder setExperimenter(long experimenter) {
+ this.experimenter = experimenter;
+ this.experimenterSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFMeterBandExperimenter build() {
+ long rate = this.rateSet ? this.rate : parentMessage.rate;
+ long burstSize = this.burstSizeSet ? this.burstSize : parentMessage.burstSize;
+ long experimenter = this.experimenterSet ? this.experimenter : parentMessage.experimenter;
+
+ //
+ return new OFMeterBandExperimenterVer13(
+ rate,
+ burstSize,
+ experimenter
+ );
+ }
+
+ }
+
+ static class Builder implements OFMeterBandExperimenter.Builder {
+ // OF message fields
+ private boolean rateSet;
+ private long rate;
+ private boolean burstSizeSet;
+ private long burstSize;
+ private boolean experimenterSet;
+ private long experimenter;
+
+ @Override
+ public int getType() {
+ return 0xffff;
+ }
+
+ @Override
+ public long getRate() {
+ return rate;
+ }
+
+ @Override
+ public OFMeterBandExperimenter.Builder setRate(long rate) {
+ this.rate = rate;
+ this.rateSet = true;
+ return this;
+ }
+ @Override
+ public long getBurstSize() {
+ return burstSize;
+ }
+
+ @Override
+ public OFMeterBandExperimenter.Builder setBurstSize(long burstSize) {
+ this.burstSize = burstSize;
+ this.burstSizeSet = true;
+ return this;
+ }
+ @Override
+ public long getExperimenter() {
+ return experimenter;
+ }
+
+ @Override
+ public OFMeterBandExperimenter.Builder setExperimenter(long experimenter) {
+ this.experimenter = experimenter;
+ this.experimenterSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFMeterBandExperimenter build() {
+ long rate = this.rateSet ? this.rate : DEFAULT_RATE;
+ long burstSize = this.burstSizeSet ? this.burstSize : DEFAULT_BURST_SIZE;
+ long experimenter = this.experimenterSet ? this.experimenter : DEFAULT_EXPERIMENTER;
+
+
+ return new OFMeterBandExperimenterVer13(
+ rate,
+ burstSize,
+ experimenter
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFMeterBandExperimenter> {
+ @Override
+ public OFMeterBandExperimenter readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 0xffff
+ short type = bb.readShort();
+ if(type != (short) 0xffff)
+ throw new OFParseError("Wrong type: Expected=0xffff(0xffff), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 16)
+ throw new OFParseError("Wrong length: Expected=16(16), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long rate = U32.f(bb.readInt());
+ long burstSize = U32.f(bb.readInt());
+ long experimenter = U32.f(bb.readInt());
+
+ OFMeterBandExperimenterVer13 meterBandExperimenterVer13 = new OFMeterBandExperimenterVer13(
+ rate,
+ burstSize,
+ experimenter
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", meterBandExperimenterVer13);
+ return meterBandExperimenterVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFMeterBandExperimenterVer13Funnel FUNNEL = new OFMeterBandExperimenterVer13Funnel();
+ static class OFMeterBandExperimenterVer13Funnel implements Funnel<OFMeterBandExperimenterVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFMeterBandExperimenterVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 0xffff
+ sink.putShort((short) 0xffff);
+ // fixed value property length = 16
+ sink.putShort((short) 0x10);
+ sink.putLong(message.rate);
+ sink.putLong(message.burstSize);
+ sink.putLong(message.experimenter);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFMeterBandExperimenterVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFMeterBandExperimenterVer13 message) {
+ // fixed value property type = 0xffff
+ bb.writeShort((short) 0xffff);
+ // fixed value property length = 16
+ bb.writeShort((short) 0x10);
+ bb.writeInt(U32.t(message.rate));
+ bb.writeInt(U32.t(message.burstSize));
+ bb.writeInt(U32.t(message.experimenter));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFMeterBandExperimenterVer13(");
+ b.append("rate=").append(rate);
+ b.append(", ");
+ b.append("burstSize=").append(burstSize);
+ b.append(", ");
+ b.append("experimenter=").append(experimenter);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFMeterBandExperimenterVer13 other = (OFMeterBandExperimenterVer13) obj;
+
+ if( rate != other.rate)
+ return false;
+ if( burstSize != other.burstSize)
+ return false;
+ if( experimenter != other.experimenter)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (rate ^ (rate >>> 32));
+ result = prime * (int) (burstSize ^ (burstSize >>> 32));
+ result = prime * (int) (experimenter ^ (experimenter >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterBandStatsVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterBandStatsVer13.java
new file mode 100644
index 0000000..7f641e5
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterBandStatsVer13.java
@@ -0,0 +1,283 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFMeterBandStatsVer13 implements OFMeterBandStats {
+ private static final Logger logger = LoggerFactory.getLogger(OFMeterBandStatsVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 16;
+
+ private final static U64 DEFAULT_PACKET_BAND_COUNT = U64.ZERO;
+ private final static U64 DEFAULT_BYTE_BAND_COUNT = U64.ZERO;
+
+ // OF message fields
+ private final U64 packetBandCount;
+ private final U64 byteBandCount;
+//
+ // Immutable default instance
+ final static OFMeterBandStatsVer13 DEFAULT = new OFMeterBandStatsVer13(
+ DEFAULT_PACKET_BAND_COUNT, DEFAULT_BYTE_BAND_COUNT
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFMeterBandStatsVer13(U64 packetBandCount, U64 byteBandCount) {
+ this.packetBandCount = packetBandCount;
+ this.byteBandCount = byteBandCount;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public U64 getPacketBandCount() {
+ return packetBandCount;
+ }
+
+ @Override
+ public U64 getByteBandCount() {
+ return byteBandCount;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFMeterBandStats.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFMeterBandStats.Builder {
+ final OFMeterBandStatsVer13 parentMessage;
+
+ // OF message fields
+ private boolean packetBandCountSet;
+ private U64 packetBandCount;
+ private boolean byteBandCountSet;
+ private U64 byteBandCount;
+
+ BuilderWithParent(OFMeterBandStatsVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public U64 getPacketBandCount() {
+ return packetBandCount;
+ }
+
+ @Override
+ public OFMeterBandStats.Builder setPacketBandCount(U64 packetBandCount) {
+ this.packetBandCount = packetBandCount;
+ this.packetBandCountSet = true;
+ return this;
+ }
+ @Override
+ public U64 getByteBandCount() {
+ return byteBandCount;
+ }
+
+ @Override
+ public OFMeterBandStats.Builder setByteBandCount(U64 byteBandCount) {
+ this.byteBandCount = byteBandCount;
+ this.byteBandCountSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFMeterBandStats build() {
+ U64 packetBandCount = this.packetBandCountSet ? this.packetBandCount : parentMessage.packetBandCount;
+ if(packetBandCount == null)
+ throw new NullPointerException("Property packetBandCount must not be null");
+ U64 byteBandCount = this.byteBandCountSet ? this.byteBandCount : parentMessage.byteBandCount;
+ if(byteBandCount == null)
+ throw new NullPointerException("Property byteBandCount must not be null");
+
+ //
+ return new OFMeterBandStatsVer13(
+ packetBandCount,
+ byteBandCount
+ );
+ }
+
+ }
+
+ static class Builder implements OFMeterBandStats.Builder {
+ // OF message fields
+ private boolean packetBandCountSet;
+ private U64 packetBandCount;
+ private boolean byteBandCountSet;
+ private U64 byteBandCount;
+
+ @Override
+ public U64 getPacketBandCount() {
+ return packetBandCount;
+ }
+
+ @Override
+ public OFMeterBandStats.Builder setPacketBandCount(U64 packetBandCount) {
+ this.packetBandCount = packetBandCount;
+ this.packetBandCountSet = true;
+ return this;
+ }
+ @Override
+ public U64 getByteBandCount() {
+ return byteBandCount;
+ }
+
+ @Override
+ public OFMeterBandStats.Builder setByteBandCount(U64 byteBandCount) {
+ this.byteBandCount = byteBandCount;
+ this.byteBandCountSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFMeterBandStats build() {
+ U64 packetBandCount = this.packetBandCountSet ? this.packetBandCount : DEFAULT_PACKET_BAND_COUNT;
+ if(packetBandCount == null)
+ throw new NullPointerException("Property packetBandCount must not be null");
+ U64 byteBandCount = this.byteBandCountSet ? this.byteBandCount : DEFAULT_BYTE_BAND_COUNT;
+ if(byteBandCount == null)
+ throw new NullPointerException("Property byteBandCount must not be null");
+
+
+ return new OFMeterBandStatsVer13(
+ packetBandCount,
+ byteBandCount
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFMeterBandStats> {
+ @Override
+ public OFMeterBandStats readFrom(ChannelBuffer bb) throws OFParseError {
+ U64 packetBandCount = U64.ofRaw(bb.readLong());
+ U64 byteBandCount = U64.ofRaw(bb.readLong());
+
+ OFMeterBandStatsVer13 meterBandStatsVer13 = new OFMeterBandStatsVer13(
+ packetBandCount,
+ byteBandCount
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", meterBandStatsVer13);
+ return meterBandStatsVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFMeterBandStatsVer13Funnel FUNNEL = new OFMeterBandStatsVer13Funnel();
+ static class OFMeterBandStatsVer13Funnel implements Funnel<OFMeterBandStatsVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFMeterBandStatsVer13 message, PrimitiveSink sink) {
+ message.packetBandCount.putTo(sink);
+ message.byteBandCount.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFMeterBandStatsVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFMeterBandStatsVer13 message) {
+ bb.writeLong(message.packetBandCount.getValue());
+ bb.writeLong(message.byteBandCount.getValue());
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFMeterBandStatsVer13(");
+ b.append("packetBandCount=").append(packetBandCount);
+ b.append(", ");
+ b.append("byteBandCount=").append(byteBandCount);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFMeterBandStatsVer13 other = (OFMeterBandStatsVer13) obj;
+
+ if (packetBandCount == null) {
+ if (other.packetBandCount != null)
+ return false;
+ } else if (!packetBandCount.equals(other.packetBandCount))
+ return false;
+ if (byteBandCount == null) {
+ if (other.byteBandCount != null)
+ return false;
+ } else if (!byteBandCount.equals(other.byteBandCount))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((packetBandCount == null) ? 0 : packetBandCount.hashCode());
+ result = prime * result + ((byteBandCount == null) ? 0 : byteBandCount.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterBandTypeSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterBandTypeSerializerVer13.java
new file mode 100644
index 0000000..d425c9a
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterBandTypeSerializerVer13.java
@@ -0,0 +1,79 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFMeterBandType;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+
+public class OFMeterBandTypeSerializerVer13 {
+
+ public final static short DROP_VAL = (short) 0x1;
+ public final static short DSCP_REMARK_VAL = (short) 0x2;
+ public final static short EXPERIMENTER_VAL = (short) 0xffff;
+
+ public static OFMeterBandType readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readShort());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, OFMeterBandType e) {
+ bb.writeShort(toWireValue(e));
+ }
+
+ public static void putTo(OFMeterBandType e, PrimitiveSink sink) {
+ sink.putShort(toWireValue(e));
+ }
+
+ public static OFMeterBandType ofWireValue(short val) {
+ switch(val) {
+ case DROP_VAL:
+ return OFMeterBandType.DROP;
+ case DSCP_REMARK_VAL:
+ return OFMeterBandType.DSCP_REMARK;
+ case EXPERIMENTER_VAL:
+ return OFMeterBandType.EXPERIMENTER;
+ default:
+ throw new IllegalArgumentException("Illegal wire value for type OFMeterBandType in version 1.3: " + val);
+ }
+ }
+
+
+ public static short toWireValue(OFMeterBandType e) {
+ switch(e) {
+ case DROP:
+ return DROP_VAL;
+ case DSCP_REMARK:
+ return DSCP_REMARK_VAL;
+ case EXPERIMENTER:
+ return EXPERIMENTER_VAL;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFMeterBandType in version 1.3: " + e);
+ }
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterBandVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterBandVer13.java
new file mode 100644
index 0000000..d7348f2
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterBandVer13.java
@@ -0,0 +1,59 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_virtual_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.jboss.netty.buffer.ChannelBuffer;
+
+abstract class OFMeterBandVer13 {
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 4;
+
+
+ public final static OFMeterBandVer13.Reader READER = new Reader();
+
+ static class Reader implements OFMessageReader<OFMeterBand> {
+ @Override
+ public OFMeterBand readFrom(ChannelBuffer bb) throws OFParseError {
+ if(bb.readableBytes() < MINIMUM_LENGTH)
+ return null;
+ int start = bb.readerIndex();
+ short type = bb.readShort();
+ bb.readerIndex(start);
+ switch(type) {
+ case (short) 0x1:
+ // discriminator value 0x1=0x1 for class OFMeterBandDropVer13
+ return OFMeterBandDropVer13.READER.readFrom(bb);
+ case (short) 0x2:
+ // discriminator value 0x2=0x2 for class OFMeterBandDscpRemarkVer13
+ return OFMeterBandDscpRemarkVer13.READER.readFrom(bb);
+ case (short) 0xffff:
+ // discriminator value 0xffff=0xffff for class OFMeterBandExperimenterVer13
+ return OFMeterBandExperimenterVer13.READER.readFrom(bb);
+ default:
+ throw new OFParseError("Unknown value for discriminator type of class OFMeterBandVer13: " + type);
+ }
+ }
+ }
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterBandsVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterBandsVer13.java
new file mode 100644
index 0000000..f3760dd
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterBandsVer13.java
@@ -0,0 +1,60 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_factory_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+
+
+public class OFMeterBandsVer13 implements OFMeterBands {
+ public final static OFMeterBandsVer13 INSTANCE = new OFMeterBandsVer13();
+
+
+
+
+ public OFMeterBandDrop.Builder buildDrop() {
+ return new OFMeterBandDropVer13.Builder();
+ }
+ public OFMeterBandDrop drop(long rate, long burstSize) {
+ return new OFMeterBandDropVer13(
+ rate,
+ burstSize
+ );
+ }
+
+ public OFMeterBandDscpRemark.Builder buildDscpRemark() {
+ return new OFMeterBandDscpRemarkVer13.Builder();
+ }
+
+ public OFMeterBandExperimenter.Builder buildExperimenter() {
+ return new OFMeterBandExperimenterVer13.Builder();
+ }
+
+ public OFMessageReader<OFMeterBand> getReader() {
+ return OFMeterBandVer13.READER;
+ }
+
+
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterConfigStatsReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterConfigStatsReplyVer13.java
new file mode 100644
index 0000000..90c03dd
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterConfigStatsReplyVer13.java
@@ -0,0 +1,412 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFMeterConfigStatsReplyVer13 implements OFMeterConfigStatsReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFMeterConfigStatsReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 16;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsReplyFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsReplyFlags>of();
+ private final static List<OFMeterBand> DEFAULT_ENTRIES = ImmutableList.<OFMeterBand>of();
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsReplyFlags> flags;
+ private final List<OFMeterBand> entries;
+//
+ // Immutable default instance
+ final static OFMeterConfigStatsReplyVer13 DEFAULT = new OFMeterConfigStatsReplyVer13(
+ DEFAULT_XID, DEFAULT_FLAGS, DEFAULT_ENTRIES
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFMeterConfigStatsReplyVer13(long xid, Set<OFStatsReplyFlags> flags, List<OFMeterBand> entries) {
+ this.xid = xid;
+ this.flags = flags;
+ this.entries = entries;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.METER_CONFIG;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public List<OFMeterBand> getEntries() {
+ return entries;
+ }
+
+
+
+ public OFMeterConfigStatsReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFMeterConfigStatsReply.Builder {
+ final OFMeterConfigStatsReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean entriesSet;
+ private List<OFMeterBand> entries;
+
+ BuilderWithParent(OFMeterConfigStatsReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFMeterConfigStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.METER_CONFIG;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFMeterConfigStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public List<OFMeterBand> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFMeterConfigStatsReply.Builder setEntries(List<OFMeterBand> entries) {
+ this.entries = entries;
+ this.entriesSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFMeterConfigStatsReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ List<OFMeterBand> entries = this.entriesSet ? this.entries : parentMessage.entries;
+ if(entries == null)
+ throw new NullPointerException("Property entries must not be null");
+
+ //
+ return new OFMeterConfigStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ }
+
+ }
+
+ static class Builder implements OFMeterConfigStatsReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean entriesSet;
+ private List<OFMeterBand> entries;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFMeterConfigStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.METER_CONFIG;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFMeterConfigStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public List<OFMeterBand> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFMeterConfigStatsReply.Builder setEntries(List<OFMeterBand> entries) {
+ this.entries = entries;
+ this.entriesSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFMeterConfigStatsReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ List<OFMeterBand> entries = this.entriesSet ? this.entries : DEFAULT_ENTRIES;
+ if(entries == null)
+ throw new NullPointerException("Property entries must not be null");
+
+
+ return new OFMeterConfigStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFMeterConfigStatsReply> {
+ @Override
+ public OFMeterConfigStatsReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 19
+ byte type = bb.readByte();
+ if(type != (byte) 0x13)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REPLY(19), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 10
+ short statsType = bb.readShort();
+ if(statsType != (short) 0xa)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.METER_CONFIG(10), got="+statsType);
+ Set<OFStatsReplyFlags> flags = OFStatsReplyFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ List<OFMeterBand> entries = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFMeterBandVer13.READER);
+
+ OFMeterConfigStatsReplyVer13 meterConfigStatsReplyVer13 = new OFMeterConfigStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", meterConfigStatsReplyVer13);
+ return meterConfigStatsReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFMeterConfigStatsReplyVer13Funnel FUNNEL = new OFMeterConfigStatsReplyVer13Funnel();
+ static class OFMeterConfigStatsReplyVer13Funnel implements Funnel<OFMeterConfigStatsReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFMeterConfigStatsReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 19
+ sink.putByte((byte) 0x13);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property statsType = 10
+ sink.putShort((short) 0xa);
+ OFStatsReplyFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ FunnelUtils.putList(message.entries, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFMeterConfigStatsReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFMeterConfigStatsReplyVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 19
+ bb.writeByte((byte) 0x13);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 10
+ bb.writeShort((short) 0xa);
+ OFStatsReplyFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ ChannelUtils.writeList(bb, message.entries);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFMeterConfigStatsReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("entries=").append(entries);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFMeterConfigStatsReplyVer13 other = (OFMeterConfigStatsReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if (entries == null) {
+ if (other.entries != null)
+ return false;
+ } else if (!entries.equals(other.entries))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * result + ((entries == null) ? 0 : entries.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterConfigStatsRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterConfigStatsRequestVer13.java
new file mode 100644
index 0000000..fcd1ac9
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterConfigStatsRequestVer13.java
@@ -0,0 +1,403 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFMeterConfigStatsRequestVer13 implements OFMeterConfigStatsRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFMeterConfigStatsRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 24;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsRequestFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsRequestFlags>of();
+ private final static long DEFAULT_METER_ID = 0x0L;
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsRequestFlags> flags;
+ private final long meterId;
+//
+ // Immutable default instance
+ final static OFMeterConfigStatsRequestVer13 DEFAULT = new OFMeterConfigStatsRequestVer13(
+ DEFAULT_XID, DEFAULT_FLAGS, DEFAULT_METER_ID
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFMeterConfigStatsRequestVer13(long xid, Set<OFStatsRequestFlags> flags, long meterId) {
+ this.xid = xid;
+ this.flags = flags;
+ this.meterId = meterId;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.METER_CONFIG;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public long getMeterId() {
+ return meterId;
+ }
+
+
+
+ public OFMeterConfigStatsRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFMeterConfigStatsRequest.Builder {
+ final OFMeterConfigStatsRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+ private boolean meterIdSet;
+ private long meterId;
+
+ BuilderWithParent(OFMeterConfigStatsRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFMeterConfigStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.METER_CONFIG;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFMeterConfigStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getMeterId() {
+ return meterId;
+ }
+
+ @Override
+ public OFMeterConfigStatsRequest.Builder setMeterId(long meterId) {
+ this.meterId = meterId;
+ this.meterIdSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFMeterConfigStatsRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ long meterId = this.meterIdSet ? this.meterId : parentMessage.meterId;
+
+ //
+ return new OFMeterConfigStatsRequestVer13(
+ xid,
+ flags,
+ meterId
+ );
+ }
+
+ }
+
+ static class Builder implements OFMeterConfigStatsRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+ private boolean meterIdSet;
+ private long meterId;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFMeterConfigStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.METER_CONFIG;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFMeterConfigStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getMeterId() {
+ return meterId;
+ }
+
+ @Override
+ public OFMeterConfigStatsRequest.Builder setMeterId(long meterId) {
+ this.meterId = meterId;
+ this.meterIdSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFMeterConfigStatsRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ long meterId = this.meterIdSet ? this.meterId : DEFAULT_METER_ID;
+
+
+ return new OFMeterConfigStatsRequestVer13(
+ xid,
+ flags,
+ meterId
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFMeterConfigStatsRequest> {
+ @Override
+ public OFMeterConfigStatsRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 18
+ byte type = bb.readByte();
+ if(type != (byte) 0x12)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REQUEST(18), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 24)
+ throw new OFParseError("Wrong length: Expected=24(24), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 10
+ short statsType = bb.readShort();
+ if(statsType != (short) 0xa)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.METER_CONFIG(10), got="+statsType);
+ Set<OFStatsRequestFlags> flags = OFStatsRequestFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ long meterId = U32.f(bb.readInt());
+ // pad: 4 bytes
+ bb.skipBytes(4);
+
+ OFMeterConfigStatsRequestVer13 meterConfigStatsRequestVer13 = new OFMeterConfigStatsRequestVer13(
+ xid,
+ flags,
+ meterId
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", meterConfigStatsRequestVer13);
+ return meterConfigStatsRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFMeterConfigStatsRequestVer13Funnel FUNNEL = new OFMeterConfigStatsRequestVer13Funnel();
+ static class OFMeterConfigStatsRequestVer13Funnel implements Funnel<OFMeterConfigStatsRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFMeterConfigStatsRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 18
+ sink.putByte((byte) 0x12);
+ // fixed value property length = 24
+ sink.putShort((short) 0x18);
+ sink.putLong(message.xid);
+ // fixed value property statsType = 10
+ sink.putShort((short) 0xa);
+ OFStatsRequestFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ sink.putLong(message.meterId);
+ // skip pad (4 bytes)
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFMeterConfigStatsRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFMeterConfigStatsRequestVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 18
+ bb.writeByte((byte) 0x12);
+ // fixed value property length = 24
+ bb.writeShort((short) 0x18);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 10
+ bb.writeShort((short) 0xa);
+ OFStatsRequestFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ bb.writeInt(U32.t(message.meterId));
+ // pad: 4 bytes
+ bb.writeZero(4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFMeterConfigStatsRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("meterId=").append(meterId);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFMeterConfigStatsRequestVer13 other = (OFMeterConfigStatsRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if( meterId != other.meterId)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * (int) (meterId ^ (meterId >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterConfigVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterConfigVer13.java
new file mode 100644
index 0000000..ac8b348
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterConfigVer13.java
@@ -0,0 +1,345 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFMeterConfigVer13 implements OFMeterConfig {
+ private static final Logger logger = LoggerFactory.getLogger(OFMeterConfigVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 8;
+
+ private final static int DEFAULT_FLAGS = 0x0;
+ private final static long DEFAULT_METER_ID = 0x0L;
+ private final static List<OFMeterBand> DEFAULT_ENTRIES = ImmutableList.<OFMeterBand>of();
+
+ // OF message fields
+ private final int flags;
+ private final long meterId;
+ private final List<OFMeterBand> entries;
+//
+ // Immutable default instance
+ final static OFMeterConfigVer13 DEFAULT = new OFMeterConfigVer13(
+ DEFAULT_FLAGS, DEFAULT_METER_ID, DEFAULT_ENTRIES
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFMeterConfigVer13(int flags, long meterId, List<OFMeterBand> entries) {
+ this.flags = flags;
+ this.meterId = meterId;
+ this.entries = entries;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public int getFlags() {
+ return flags;
+ }
+
+ @Override
+ public long getMeterId() {
+ return meterId;
+ }
+
+ @Override
+ public List<OFMeterBand> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFMeterConfig.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFMeterConfig.Builder {
+ final OFMeterConfigVer13 parentMessage;
+
+ // OF message fields
+ private boolean flagsSet;
+ private int flags;
+ private boolean meterIdSet;
+ private long meterId;
+ private boolean entriesSet;
+ private List<OFMeterBand> entries;
+
+ BuilderWithParent(OFMeterConfigVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public int getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFMeterConfig.Builder setFlags(int flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getMeterId() {
+ return meterId;
+ }
+
+ @Override
+ public OFMeterConfig.Builder setMeterId(long meterId) {
+ this.meterId = meterId;
+ this.meterIdSet = true;
+ return this;
+ }
+ @Override
+ public List<OFMeterBand> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFMeterConfig.Builder setEntries(List<OFMeterBand> entries) {
+ this.entries = entries;
+ this.entriesSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFMeterConfig build() {
+ int flags = this.flagsSet ? this.flags : parentMessage.flags;
+ long meterId = this.meterIdSet ? this.meterId : parentMessage.meterId;
+ List<OFMeterBand> entries = this.entriesSet ? this.entries : parentMessage.entries;
+ if(entries == null)
+ throw new NullPointerException("Property entries must not be null");
+
+ //
+ return new OFMeterConfigVer13(
+ flags,
+ meterId,
+ entries
+ );
+ }
+
+ }
+
+ static class Builder implements OFMeterConfig.Builder {
+ // OF message fields
+ private boolean flagsSet;
+ private int flags;
+ private boolean meterIdSet;
+ private long meterId;
+ private boolean entriesSet;
+ private List<OFMeterBand> entries;
+
+ @Override
+ public int getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFMeterConfig.Builder setFlags(int flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getMeterId() {
+ return meterId;
+ }
+
+ @Override
+ public OFMeterConfig.Builder setMeterId(long meterId) {
+ this.meterId = meterId;
+ this.meterIdSet = true;
+ return this;
+ }
+ @Override
+ public List<OFMeterBand> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFMeterConfig.Builder setEntries(List<OFMeterBand> entries) {
+ this.entries = entries;
+ this.entriesSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFMeterConfig build() {
+ int flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ long meterId = this.meterIdSet ? this.meterId : DEFAULT_METER_ID;
+ List<OFMeterBand> entries = this.entriesSet ? this.entries : DEFAULT_ENTRIES;
+ if(entries == null)
+ throw new NullPointerException("Property entries must not be null");
+
+
+ return new OFMeterConfigVer13(
+ flags,
+ meterId,
+ entries
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFMeterConfig> {
+ @Override
+ public OFMeterConfig readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ int flags = U16.f(bb.readShort());
+ long meterId = U32.f(bb.readInt());
+ List<OFMeterBand> entries = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFMeterBandVer13.READER);
+
+ OFMeterConfigVer13 meterConfigVer13 = new OFMeterConfigVer13(
+ flags,
+ meterId,
+ entries
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", meterConfigVer13);
+ return meterConfigVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFMeterConfigVer13Funnel FUNNEL = new OFMeterConfigVer13Funnel();
+ static class OFMeterConfigVer13Funnel implements Funnel<OFMeterConfigVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFMeterConfigVer13 message, PrimitiveSink sink) {
+ // FIXME: skip funnel of length
+ sink.putInt(message.flags);
+ sink.putLong(message.meterId);
+ FunnelUtils.putList(message.entries, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFMeterConfigVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFMeterConfigVer13 message) {
+ int startIndex = bb.writerIndex();
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeShort(U16.t(message.flags));
+ bb.writeInt(U32.t(message.meterId));
+ ChannelUtils.writeList(bb, message.entries);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFMeterConfigVer13(");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("meterId=").append(meterId);
+ b.append(", ");
+ b.append("entries=").append(entries);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFMeterConfigVer13 other = (OFMeterConfigVer13) obj;
+
+ if( flags != other.flags)
+ return false;
+ if( meterId != other.meterId)
+ return false;
+ if (entries == null) {
+ if (other.entries != null)
+ return false;
+ } else if (!entries.equals(other.entries))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + flags;
+ result = prime * (int) (meterId ^ (meterId >>> 32));
+ result = prime * result + ((entries == null) ? 0 : entries.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterFeaturesStatsReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterFeaturesStatsReplyVer13.java
new file mode 100644
index 0000000..da0f2ec
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterFeaturesStatsReplyVer13.java
@@ -0,0 +1,401 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFMeterFeaturesStatsReplyVer13 implements OFMeterFeaturesStatsReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFMeterFeaturesStatsReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 32;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsReplyFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsReplyFlags>of();
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsReplyFlags> flags;
+ private final OFMeterFeatures features;
+//
+
+ // package private constructor - used by readers, builders, and factory
+ OFMeterFeaturesStatsReplyVer13(long xid, Set<OFStatsReplyFlags> flags, OFMeterFeatures features) {
+ this.xid = xid;
+ this.flags = flags;
+ this.features = features;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.METER_FEATURES;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFMeterFeatures getFeatures() {
+ return features;
+ }
+
+
+
+ public OFMeterFeaturesStatsReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFMeterFeaturesStatsReply.Builder {
+ final OFMeterFeaturesStatsReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean featuresSet;
+ private OFMeterFeatures features;
+
+ BuilderWithParent(OFMeterFeaturesStatsReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFMeterFeaturesStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.METER_FEATURES;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFMeterFeaturesStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public OFMeterFeatures getFeatures() {
+ return features;
+ }
+
+ @Override
+ public OFMeterFeaturesStatsReply.Builder setFeatures(OFMeterFeatures features) {
+ this.features = features;
+ this.featuresSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFMeterFeaturesStatsReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ OFMeterFeatures features = this.featuresSet ? this.features : parentMessage.features;
+ if(features == null)
+ throw new NullPointerException("Property features must not be null");
+
+ //
+ return new OFMeterFeaturesStatsReplyVer13(
+ xid,
+ flags,
+ features
+ );
+ }
+
+ }
+
+ static class Builder implements OFMeterFeaturesStatsReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean featuresSet;
+ private OFMeterFeatures features;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFMeterFeaturesStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.METER_FEATURES;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFMeterFeaturesStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public OFMeterFeatures getFeatures() {
+ return features;
+ }
+
+ @Override
+ public OFMeterFeaturesStatsReply.Builder setFeatures(OFMeterFeatures features) {
+ this.features = features;
+ this.featuresSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFMeterFeaturesStatsReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ if(!this.featuresSet)
+ throw new IllegalStateException("Property features doesn't have default value -- must be set");
+ if(features == null)
+ throw new NullPointerException("Property features must not be null");
+
+
+ return new OFMeterFeaturesStatsReplyVer13(
+ xid,
+ flags,
+ features
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFMeterFeaturesStatsReply> {
+ @Override
+ public OFMeterFeaturesStatsReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 19
+ byte type = bb.readByte();
+ if(type != (byte) 0x13)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REPLY(19), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 32)
+ throw new OFParseError("Wrong length: Expected=32(32), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 11
+ short statsType = bb.readShort();
+ if(statsType != (short) 0xb)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.METER_FEATURES(11), got="+statsType);
+ Set<OFStatsReplyFlags> flags = OFStatsReplyFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ OFMeterFeatures features = OFMeterFeaturesVer13.READER.readFrom(bb);
+
+ OFMeterFeaturesStatsReplyVer13 meterFeaturesStatsReplyVer13 = new OFMeterFeaturesStatsReplyVer13(
+ xid,
+ flags,
+ features
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", meterFeaturesStatsReplyVer13);
+ return meterFeaturesStatsReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFMeterFeaturesStatsReplyVer13Funnel FUNNEL = new OFMeterFeaturesStatsReplyVer13Funnel();
+ static class OFMeterFeaturesStatsReplyVer13Funnel implements Funnel<OFMeterFeaturesStatsReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFMeterFeaturesStatsReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 19
+ sink.putByte((byte) 0x13);
+ // fixed value property length = 32
+ sink.putShort((short) 0x20);
+ sink.putLong(message.xid);
+ // fixed value property statsType = 11
+ sink.putShort((short) 0xb);
+ OFStatsReplyFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ message.features.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFMeterFeaturesStatsReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFMeterFeaturesStatsReplyVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 19
+ bb.writeByte((byte) 0x13);
+ // fixed value property length = 32
+ bb.writeShort((short) 0x20);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 11
+ bb.writeShort((short) 0xb);
+ OFStatsReplyFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ message.features.writeTo(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFMeterFeaturesStatsReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("features=").append(features);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFMeterFeaturesStatsReplyVer13 other = (OFMeterFeaturesStatsReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if (features == null) {
+ if (other.features != null)
+ return false;
+ } else if (!features.equals(other.features))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * result + ((features == null) ? 0 : features.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterFeaturesStatsRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterFeaturesStatsRequestVer13.java
new file mode 100644
index 0000000..2c5c314
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterFeaturesStatsRequestVer13.java
@@ -0,0 +1,351 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFMeterFeaturesStatsRequestVer13 implements OFMeterFeaturesStatsRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFMeterFeaturesStatsRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 16;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsRequestFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsRequestFlags>of();
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsRequestFlags> flags;
+//
+ // Immutable default instance
+ final static OFMeterFeaturesStatsRequestVer13 DEFAULT = new OFMeterFeaturesStatsRequestVer13(
+ DEFAULT_XID, DEFAULT_FLAGS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFMeterFeaturesStatsRequestVer13(long xid, Set<OFStatsRequestFlags> flags) {
+ this.xid = xid;
+ this.flags = flags;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.METER_FEATURES;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+
+
+ public OFMeterFeaturesStatsRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFMeterFeaturesStatsRequest.Builder {
+ final OFMeterFeaturesStatsRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+
+ BuilderWithParent(OFMeterFeaturesStatsRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFMeterFeaturesStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.METER_FEATURES;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFMeterFeaturesStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFMeterFeaturesStatsRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+
+ //
+ return new OFMeterFeaturesStatsRequestVer13(
+ xid,
+ flags
+ );
+ }
+
+ }
+
+ static class Builder implements OFMeterFeaturesStatsRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFMeterFeaturesStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.METER_FEATURES;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFMeterFeaturesStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFMeterFeaturesStatsRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+
+
+ return new OFMeterFeaturesStatsRequestVer13(
+ xid,
+ flags
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFMeterFeaturesStatsRequest> {
+ @Override
+ public OFMeterFeaturesStatsRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 18
+ byte type = bb.readByte();
+ if(type != (byte) 0x12)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REQUEST(18), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 16)
+ throw new OFParseError("Wrong length: Expected=16(16), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 11
+ short statsType = bb.readShort();
+ if(statsType != (short) 0xb)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.METER_FEATURES(11), got="+statsType);
+ Set<OFStatsRequestFlags> flags = OFStatsRequestFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+
+ OFMeterFeaturesStatsRequestVer13 meterFeaturesStatsRequestVer13 = new OFMeterFeaturesStatsRequestVer13(
+ xid,
+ flags
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", meterFeaturesStatsRequestVer13);
+ return meterFeaturesStatsRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFMeterFeaturesStatsRequestVer13Funnel FUNNEL = new OFMeterFeaturesStatsRequestVer13Funnel();
+ static class OFMeterFeaturesStatsRequestVer13Funnel implements Funnel<OFMeterFeaturesStatsRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFMeterFeaturesStatsRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 18
+ sink.putByte((byte) 0x12);
+ // fixed value property length = 16
+ sink.putShort((short) 0x10);
+ sink.putLong(message.xid);
+ // fixed value property statsType = 11
+ sink.putShort((short) 0xb);
+ OFStatsRequestFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFMeterFeaturesStatsRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFMeterFeaturesStatsRequestVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 18
+ bb.writeByte((byte) 0x12);
+ // fixed value property length = 16
+ bb.writeShort((short) 0x10);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 11
+ bb.writeShort((short) 0xb);
+ OFStatsRequestFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFMeterFeaturesStatsRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFMeterFeaturesStatsRequestVer13 other = (OFMeterFeaturesStatsRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterFeaturesVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterFeaturesVer13.java
new file mode 100644
index 0000000..a1168da
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterFeaturesVer13.java
@@ -0,0 +1,415 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFMeterFeaturesVer13 implements OFMeterFeatures {
+ private static final Logger logger = LoggerFactory.getLogger(OFMeterFeaturesVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 16;
+
+ private final static long DEFAULT_MAX_METER = 0x0L;
+ private final static long DEFAULT_BAND_TYPES = 0x0L;
+ private final static long DEFAULT_CAPABILITIES = 0x0L;
+ private final static short DEFAULT_MAX_BANDS = (short) 0x0;
+ private final static short DEFAULT_MAX_COLOR = (short) 0x0;
+
+ // OF message fields
+ private final long maxMeter;
+ private final long bandTypes;
+ private final long capabilities;
+ private final short maxBands;
+ private final short maxColor;
+//
+ // Immutable default instance
+ final static OFMeterFeaturesVer13 DEFAULT = new OFMeterFeaturesVer13(
+ DEFAULT_MAX_METER, DEFAULT_BAND_TYPES, DEFAULT_CAPABILITIES, DEFAULT_MAX_BANDS, DEFAULT_MAX_COLOR
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFMeterFeaturesVer13(long maxMeter, long bandTypes, long capabilities, short maxBands, short maxColor) {
+ this.maxMeter = maxMeter;
+ this.bandTypes = bandTypes;
+ this.capabilities = capabilities;
+ this.maxBands = maxBands;
+ this.maxColor = maxColor;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getMaxMeter() {
+ return maxMeter;
+ }
+
+ @Override
+ public long getBandTypes() {
+ return bandTypes;
+ }
+
+ @Override
+ public long getCapabilities() {
+ return capabilities;
+ }
+
+ @Override
+ public short getMaxBands() {
+ return maxBands;
+ }
+
+ @Override
+ public short getMaxColor() {
+ return maxColor;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFMeterFeatures.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFMeterFeatures.Builder {
+ final OFMeterFeaturesVer13 parentMessage;
+
+ // OF message fields
+ private boolean maxMeterSet;
+ private long maxMeter;
+ private boolean bandTypesSet;
+ private long bandTypes;
+ private boolean capabilitiesSet;
+ private long capabilities;
+ private boolean maxBandsSet;
+ private short maxBands;
+ private boolean maxColorSet;
+ private short maxColor;
+
+ BuilderWithParent(OFMeterFeaturesVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getMaxMeter() {
+ return maxMeter;
+ }
+
+ @Override
+ public OFMeterFeatures.Builder setMaxMeter(long maxMeter) {
+ this.maxMeter = maxMeter;
+ this.maxMeterSet = true;
+ return this;
+ }
+ @Override
+ public long getBandTypes() {
+ return bandTypes;
+ }
+
+ @Override
+ public OFMeterFeatures.Builder setBandTypes(long bandTypes) {
+ this.bandTypes = bandTypes;
+ this.bandTypesSet = true;
+ return this;
+ }
+ @Override
+ public long getCapabilities() {
+ return capabilities;
+ }
+
+ @Override
+ public OFMeterFeatures.Builder setCapabilities(long capabilities) {
+ this.capabilities = capabilities;
+ this.capabilitiesSet = true;
+ return this;
+ }
+ @Override
+ public short getMaxBands() {
+ return maxBands;
+ }
+
+ @Override
+ public OFMeterFeatures.Builder setMaxBands(short maxBands) {
+ this.maxBands = maxBands;
+ this.maxBandsSet = true;
+ return this;
+ }
+ @Override
+ public short getMaxColor() {
+ return maxColor;
+ }
+
+ @Override
+ public OFMeterFeatures.Builder setMaxColor(short maxColor) {
+ this.maxColor = maxColor;
+ this.maxColorSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFMeterFeatures build() {
+ long maxMeter = this.maxMeterSet ? this.maxMeter : parentMessage.maxMeter;
+ long bandTypes = this.bandTypesSet ? this.bandTypes : parentMessage.bandTypes;
+ long capabilities = this.capabilitiesSet ? this.capabilities : parentMessage.capabilities;
+ short maxBands = this.maxBandsSet ? this.maxBands : parentMessage.maxBands;
+ short maxColor = this.maxColorSet ? this.maxColor : parentMessage.maxColor;
+
+ //
+ return new OFMeterFeaturesVer13(
+ maxMeter,
+ bandTypes,
+ capabilities,
+ maxBands,
+ maxColor
+ );
+ }
+
+ }
+
+ static class Builder implements OFMeterFeatures.Builder {
+ // OF message fields
+ private boolean maxMeterSet;
+ private long maxMeter;
+ private boolean bandTypesSet;
+ private long bandTypes;
+ private boolean capabilitiesSet;
+ private long capabilities;
+ private boolean maxBandsSet;
+ private short maxBands;
+ private boolean maxColorSet;
+ private short maxColor;
+
+ @Override
+ public long getMaxMeter() {
+ return maxMeter;
+ }
+
+ @Override
+ public OFMeterFeatures.Builder setMaxMeter(long maxMeter) {
+ this.maxMeter = maxMeter;
+ this.maxMeterSet = true;
+ return this;
+ }
+ @Override
+ public long getBandTypes() {
+ return bandTypes;
+ }
+
+ @Override
+ public OFMeterFeatures.Builder setBandTypes(long bandTypes) {
+ this.bandTypes = bandTypes;
+ this.bandTypesSet = true;
+ return this;
+ }
+ @Override
+ public long getCapabilities() {
+ return capabilities;
+ }
+
+ @Override
+ public OFMeterFeatures.Builder setCapabilities(long capabilities) {
+ this.capabilities = capabilities;
+ this.capabilitiesSet = true;
+ return this;
+ }
+ @Override
+ public short getMaxBands() {
+ return maxBands;
+ }
+
+ @Override
+ public OFMeterFeatures.Builder setMaxBands(short maxBands) {
+ this.maxBands = maxBands;
+ this.maxBandsSet = true;
+ return this;
+ }
+ @Override
+ public short getMaxColor() {
+ return maxColor;
+ }
+
+ @Override
+ public OFMeterFeatures.Builder setMaxColor(short maxColor) {
+ this.maxColor = maxColor;
+ this.maxColorSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFMeterFeatures build() {
+ long maxMeter = this.maxMeterSet ? this.maxMeter : DEFAULT_MAX_METER;
+ long bandTypes = this.bandTypesSet ? this.bandTypes : DEFAULT_BAND_TYPES;
+ long capabilities = this.capabilitiesSet ? this.capabilities : DEFAULT_CAPABILITIES;
+ short maxBands = this.maxBandsSet ? this.maxBands : DEFAULT_MAX_BANDS;
+ short maxColor = this.maxColorSet ? this.maxColor : DEFAULT_MAX_COLOR;
+
+
+ return new OFMeterFeaturesVer13(
+ maxMeter,
+ bandTypes,
+ capabilities,
+ maxBands,
+ maxColor
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFMeterFeatures> {
+ @Override
+ public OFMeterFeatures readFrom(ChannelBuffer bb) throws OFParseError {
+ long maxMeter = U32.f(bb.readInt());
+ long bandTypes = U32.f(bb.readInt());
+ long capabilities = U32.f(bb.readInt());
+ short maxBands = U8.f(bb.readByte());
+ short maxColor = U8.f(bb.readByte());
+ // pad: 2 bytes
+ bb.skipBytes(2);
+
+ OFMeterFeaturesVer13 meterFeaturesVer13 = new OFMeterFeaturesVer13(
+ maxMeter,
+ bandTypes,
+ capabilities,
+ maxBands,
+ maxColor
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", meterFeaturesVer13);
+ return meterFeaturesVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFMeterFeaturesVer13Funnel FUNNEL = new OFMeterFeaturesVer13Funnel();
+ static class OFMeterFeaturesVer13Funnel implements Funnel<OFMeterFeaturesVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFMeterFeaturesVer13 message, PrimitiveSink sink) {
+ sink.putLong(message.maxMeter);
+ sink.putLong(message.bandTypes);
+ sink.putLong(message.capabilities);
+ sink.putShort(message.maxBands);
+ sink.putShort(message.maxColor);
+ // skip pad (2 bytes)
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFMeterFeaturesVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFMeterFeaturesVer13 message) {
+ bb.writeInt(U32.t(message.maxMeter));
+ bb.writeInt(U32.t(message.bandTypes));
+ bb.writeInt(U32.t(message.capabilities));
+ bb.writeByte(U8.t(message.maxBands));
+ bb.writeByte(U8.t(message.maxColor));
+ // pad: 2 bytes
+ bb.writeZero(2);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFMeterFeaturesVer13(");
+ b.append("maxMeter=").append(maxMeter);
+ b.append(", ");
+ b.append("bandTypes=").append(bandTypes);
+ b.append(", ");
+ b.append("capabilities=").append(capabilities);
+ b.append(", ");
+ b.append("maxBands=").append(maxBands);
+ b.append(", ");
+ b.append("maxColor=").append(maxColor);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFMeterFeaturesVer13 other = (OFMeterFeaturesVer13) obj;
+
+ if( maxMeter != other.maxMeter)
+ return false;
+ if( bandTypes != other.bandTypes)
+ return false;
+ if( capabilities != other.capabilities)
+ return false;
+ if( maxBands != other.maxBands)
+ return false;
+ if( maxColor != other.maxColor)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (maxMeter ^ (maxMeter >>> 32));
+ result = prime * (int) (bandTypes ^ (bandTypes >>> 32));
+ result = prime * (int) (capabilities ^ (capabilities >>> 32));
+ result = prime * result + maxBands;
+ result = prime * result + maxColor;
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterFlagsSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterFlagsSerializerVer13.java
new file mode 100644
index 0000000..8a5eb05
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterFlagsSerializerVer13.java
@@ -0,0 +1,96 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_set_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFMeterFlags;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import java.util.EnumSet;
+import java.util.Collections;
+
+
+public class OFMeterFlagsSerializerVer13 {
+
+ public final static short KBPS_VAL = (short) 0x1;
+ public final static short PKTPS_VAL = (short) 0x2;
+ public final static short BURST_VAL = (short) 0x4;
+ public final static short STATS_VAL = (short) 0x8;
+
+ public static Set<OFMeterFlags> readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readShort());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, Set<OFMeterFlags> set) {
+ bb.writeShort(toWireValue(set));
+ }
+
+ public static void putTo(Set<OFMeterFlags> set, PrimitiveSink sink) {
+ sink.putShort(toWireValue(set));
+ }
+
+
+ public static Set<OFMeterFlags> ofWireValue(short val) {
+ EnumSet<OFMeterFlags> set = EnumSet.noneOf(OFMeterFlags.class);
+
+ if((val & KBPS_VAL) != 0)
+ set.add(OFMeterFlags.KBPS);
+ if((val & PKTPS_VAL) != 0)
+ set.add(OFMeterFlags.PKTPS);
+ if((val & BURST_VAL) != 0)
+ set.add(OFMeterFlags.BURST);
+ if((val & STATS_VAL) != 0)
+ set.add(OFMeterFlags.STATS);
+ return Collections.unmodifiableSet(set);
+ }
+
+ public static short toWireValue(Set<OFMeterFlags> set) {
+ short wireValue = 0;
+
+ for(OFMeterFlags e: set) {
+ switch(e) {
+ case KBPS:
+ wireValue |= KBPS_VAL;
+ break;
+ case PKTPS:
+ wireValue |= PKTPS_VAL;
+ break;
+ case BURST:
+ wireValue |= BURST_VAL;
+ break;
+ case STATS:
+ wireValue |= STATS_VAL;
+ break;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFMeterFlags in version 1.3: " + e);
+ }
+ }
+ return wireValue;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterModCommandSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterModCommandSerializerVer13.java
new file mode 100644
index 0000000..4668dab
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterModCommandSerializerVer13.java
@@ -0,0 +1,79 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFMeterModCommand;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+
+public class OFMeterModCommandSerializerVer13 {
+
+ public final static short ADD_VAL = (short) 0x0;
+ public final static short MODIFY_VAL = (short) 0x1;
+ public final static short DELETE_VAL = (short) 0x2;
+
+ public static OFMeterModCommand readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readShort());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, OFMeterModCommand e) {
+ bb.writeShort(toWireValue(e));
+ }
+
+ public static void putTo(OFMeterModCommand e, PrimitiveSink sink) {
+ sink.putShort(toWireValue(e));
+ }
+
+ public static OFMeterModCommand ofWireValue(short val) {
+ switch(val) {
+ case ADD_VAL:
+ return OFMeterModCommand.ADD;
+ case MODIFY_VAL:
+ return OFMeterModCommand.MODIFY;
+ case DELETE_VAL:
+ return OFMeterModCommand.DELETE;
+ default:
+ throw new IllegalArgumentException("Illegal wire value for type OFMeterModCommand in version 1.3: " + val);
+ }
+ }
+
+
+ public static short toWireValue(OFMeterModCommand e) {
+ switch(e) {
+ case ADD:
+ return ADD_VAL;
+ case MODIFY:
+ return MODIFY_VAL;
+ case DELETE:
+ return DELETE_VAL;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFMeterModCommand in version 1.3: " + e);
+ }
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterModFailedCodeSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterModFailedCodeSerializerVer13.java
new file mode 100644
index 0000000..114f21b
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterModFailedCodeSerializerVer13.java
@@ -0,0 +1,124 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFMeterModFailedCode;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+
+public class OFMeterModFailedCodeSerializerVer13 {
+
+ public final static short UNKNOWN_VAL = (short) 0x0;
+ public final static short METER_EXISTS_VAL = (short) 0x1;
+ public final static short INVALID_METER_VAL = (short) 0x2;
+ public final static short UNKNOWN_METER_VAL = (short) 0x3;
+ public final static short BAD_COMMAND_VAL = (short) 0x4;
+ public final static short BAD_FLAGS_VAL = (short) 0x5;
+ public final static short BAD_RATE_VAL = (short) 0x6;
+ public final static short BAD_BURST_VAL = (short) 0x7;
+ public final static short BAD_BAND_VAL = (short) 0x8;
+ public final static short BAD_BAND_VALUE_VAL = (short) 0x9;
+ public final static short OUT_OF_METERS_VAL = (short) 0xa;
+ public final static short OUT_OF_BANDS_VAL = (short) 0xb;
+
+ public static OFMeterModFailedCode readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readShort());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, OFMeterModFailedCode e) {
+ bb.writeShort(toWireValue(e));
+ }
+
+ public static void putTo(OFMeterModFailedCode e, PrimitiveSink sink) {
+ sink.putShort(toWireValue(e));
+ }
+
+ public static OFMeterModFailedCode ofWireValue(short val) {
+ switch(val) {
+ case UNKNOWN_VAL:
+ return OFMeterModFailedCode.UNKNOWN;
+ case METER_EXISTS_VAL:
+ return OFMeterModFailedCode.METER_EXISTS;
+ case INVALID_METER_VAL:
+ return OFMeterModFailedCode.INVALID_METER;
+ case UNKNOWN_METER_VAL:
+ return OFMeterModFailedCode.UNKNOWN_METER;
+ case BAD_COMMAND_VAL:
+ return OFMeterModFailedCode.BAD_COMMAND;
+ case BAD_FLAGS_VAL:
+ return OFMeterModFailedCode.BAD_FLAGS;
+ case BAD_RATE_VAL:
+ return OFMeterModFailedCode.BAD_RATE;
+ case BAD_BURST_VAL:
+ return OFMeterModFailedCode.BAD_BURST;
+ case BAD_BAND_VAL:
+ return OFMeterModFailedCode.BAD_BAND;
+ case BAD_BAND_VALUE_VAL:
+ return OFMeterModFailedCode.BAD_BAND_VALUE;
+ case OUT_OF_METERS_VAL:
+ return OFMeterModFailedCode.OUT_OF_METERS;
+ case OUT_OF_BANDS_VAL:
+ return OFMeterModFailedCode.OUT_OF_BANDS;
+ default:
+ throw new IllegalArgumentException("Illegal wire value for type OFMeterModFailedCode in version 1.3: " + val);
+ }
+ }
+
+
+ public static short toWireValue(OFMeterModFailedCode e) {
+ switch(e) {
+ case UNKNOWN:
+ return UNKNOWN_VAL;
+ case METER_EXISTS:
+ return METER_EXISTS_VAL;
+ case INVALID_METER:
+ return INVALID_METER_VAL;
+ case UNKNOWN_METER:
+ return UNKNOWN_METER_VAL;
+ case BAD_COMMAND:
+ return BAD_COMMAND_VAL;
+ case BAD_FLAGS:
+ return BAD_FLAGS_VAL;
+ case BAD_RATE:
+ return BAD_RATE_VAL;
+ case BAD_BURST:
+ return BAD_BURST_VAL;
+ case BAD_BAND:
+ return BAD_BAND_VAL;
+ case BAD_BAND_VALUE:
+ return BAD_BAND_VALUE_VAL;
+ case OUT_OF_METERS:
+ return OUT_OF_METERS_VAL;
+ case OUT_OF_BANDS:
+ return OUT_OF_BANDS_VAL;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFMeterModFailedCode in version 1.3: " + e);
+ }
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterModFailedErrorMsgVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterModFailedErrorMsgVer13.java
new file mode 100644
index 0000000..be2281d
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterModFailedErrorMsgVer13.java
@@ -0,0 +1,400 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFMeterModFailedErrorMsgVer13 implements OFMeterModFailedErrorMsg {
+ private static final Logger logger = LoggerFactory.getLogger(OFMeterModFailedErrorMsgVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 12;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static OFErrorCauseData DEFAULT_DATA = OFErrorCauseData.NONE;
+
+ // OF message fields
+ private final long xid;
+ private final OFMeterModFailedCode code;
+ private final OFErrorCauseData data;
+//
+
+ // package private constructor - used by readers, builders, and factory
+ OFMeterModFailedErrorMsgVer13(long xid, OFMeterModFailedCode code, OFErrorCauseData data) {
+ this.xid = xid;
+ this.code = code;
+ this.data = data;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ERROR;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFErrorType getErrType() {
+ return OFErrorType.METER_MOD_FAILED;
+ }
+
+ @Override
+ public OFMeterModFailedCode getCode() {
+ return code;
+ }
+
+ @Override
+ public OFErrorCauseData getData() {
+ return data;
+ }
+
+
+
+ public OFMeterModFailedErrorMsg.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFMeterModFailedErrorMsg.Builder {
+ final OFMeterModFailedErrorMsgVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean codeSet;
+ private OFMeterModFailedCode code;
+ private boolean dataSet;
+ private OFErrorCauseData data;
+
+ BuilderWithParent(OFMeterModFailedErrorMsgVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ERROR;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFMeterModFailedErrorMsg.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorType getErrType() {
+ return OFErrorType.METER_MOD_FAILED;
+ }
+
+ @Override
+ public OFMeterModFailedCode getCode() {
+ return code;
+ }
+
+ @Override
+ public OFMeterModFailedErrorMsg.Builder setCode(OFMeterModFailedCode code) {
+ this.code = code;
+ this.codeSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorCauseData getData() {
+ return data;
+ }
+
+ @Override
+ public OFMeterModFailedErrorMsg.Builder setData(OFErrorCauseData data) {
+ this.data = data;
+ this.dataSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFMeterModFailedErrorMsg build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ OFMeterModFailedCode code = this.codeSet ? this.code : parentMessage.code;
+ if(code == null)
+ throw new NullPointerException("Property code must not be null");
+ OFErrorCauseData data = this.dataSet ? this.data : parentMessage.data;
+ if(data == null)
+ throw new NullPointerException("Property data must not be null");
+
+ //
+ return new OFMeterModFailedErrorMsgVer13(
+ xid,
+ code,
+ data
+ );
+ }
+
+ }
+
+ static class Builder implements OFMeterModFailedErrorMsg.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean codeSet;
+ private OFMeterModFailedCode code;
+ private boolean dataSet;
+ private OFErrorCauseData data;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ERROR;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFMeterModFailedErrorMsg.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorType getErrType() {
+ return OFErrorType.METER_MOD_FAILED;
+ }
+
+ @Override
+ public OFMeterModFailedCode getCode() {
+ return code;
+ }
+
+ @Override
+ public OFMeterModFailedErrorMsg.Builder setCode(OFMeterModFailedCode code) {
+ this.code = code;
+ this.codeSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorCauseData getData() {
+ return data;
+ }
+
+ @Override
+ public OFMeterModFailedErrorMsg.Builder setData(OFErrorCauseData data) {
+ this.data = data;
+ this.dataSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFMeterModFailedErrorMsg build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ if(!this.codeSet)
+ throw new IllegalStateException("Property code doesn't have default value -- must be set");
+ if(code == null)
+ throw new NullPointerException("Property code must not be null");
+ OFErrorCauseData data = this.dataSet ? this.data : DEFAULT_DATA;
+ if(data == null)
+ throw new NullPointerException("Property data must not be null");
+
+
+ return new OFMeterModFailedErrorMsgVer13(
+ xid,
+ code,
+ data
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFMeterModFailedErrorMsg> {
+ @Override
+ public OFMeterModFailedErrorMsg readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 1
+ byte type = bb.readByte();
+ if(type != (byte) 0x1)
+ throw new OFParseError("Wrong type: Expected=OFType.ERROR(1), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property errType == 12
+ short errType = bb.readShort();
+ if(errType != (short) 0xc)
+ throw new OFParseError("Wrong errType: Expected=OFErrorType.METER_MOD_FAILED(12), got="+errType);
+ OFMeterModFailedCode code = OFMeterModFailedCodeSerializerVer13.readFrom(bb);
+ OFErrorCauseData data = OFErrorCauseData.read(bb, length - (bb.readerIndex() - start), OFVersion.OF_13);
+
+ OFMeterModFailedErrorMsgVer13 meterModFailedErrorMsgVer13 = new OFMeterModFailedErrorMsgVer13(
+ xid,
+ code,
+ data
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", meterModFailedErrorMsgVer13);
+ return meterModFailedErrorMsgVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFMeterModFailedErrorMsgVer13Funnel FUNNEL = new OFMeterModFailedErrorMsgVer13Funnel();
+ static class OFMeterModFailedErrorMsgVer13Funnel implements Funnel<OFMeterModFailedErrorMsgVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFMeterModFailedErrorMsgVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 1
+ sink.putByte((byte) 0x1);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property errType = 12
+ sink.putShort((short) 0xc);
+ OFMeterModFailedCodeSerializerVer13.putTo(message.code, sink);
+ message.data.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFMeterModFailedErrorMsgVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFMeterModFailedErrorMsgVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 1
+ bb.writeByte((byte) 0x1);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property errType = 12
+ bb.writeShort((short) 0xc);
+ OFMeterModFailedCodeSerializerVer13.writeTo(bb, message.code);
+ message.data.writeTo(bb);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFMeterModFailedErrorMsgVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("code=").append(code);
+ b.append(", ");
+ b.append("data=").append(data);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFMeterModFailedErrorMsgVer13 other = (OFMeterModFailedErrorMsgVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (code == null) {
+ if (other.code != null)
+ return false;
+ } else if (!code.equals(other.code))
+ return false;
+ if (data == null) {
+ if (other.data != null)
+ return false;
+ } else if (!data.equals(other.data))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((code == null) ? 0 : code.hashCode());
+ result = prime * result + ((data == null) ? 0 : data.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterModVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterModVer13.java
new file mode 100644
index 0000000..e9aeb25
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterModVer13.java
@@ -0,0 +1,470 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFMeterModVer13 implements OFMeterMod {
+ private static final Logger logger = LoggerFactory.getLogger(OFMeterModVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 16;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static int DEFAULT_COMMAND = 0x0;
+ private final static int DEFAULT_FLAGS = 0x0;
+ private final static long DEFAULT_METER_ID = 0x0L;
+ private final static List<OFMeterBand> DEFAULT_METERS = ImmutableList.<OFMeterBand>of();
+
+ // OF message fields
+ private final long xid;
+ private final int command;
+ private final int flags;
+ private final long meterId;
+ private final List<OFMeterBand> meters;
+//
+ // Immutable default instance
+ final static OFMeterModVer13 DEFAULT = new OFMeterModVer13(
+ DEFAULT_XID, DEFAULT_COMMAND, DEFAULT_FLAGS, DEFAULT_METER_ID, DEFAULT_METERS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFMeterModVer13(long xid, int command, int flags, long meterId, List<OFMeterBand> meters) {
+ this.xid = xid;
+ this.command = command;
+ this.flags = flags;
+ this.meterId = meterId;
+ this.meters = meters;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.METER_MOD;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public int getCommand() {
+ return command;
+ }
+
+ @Override
+ public int getFlags() {
+ return flags;
+ }
+
+ @Override
+ public long getMeterId() {
+ return meterId;
+ }
+
+ @Override
+ public List<OFMeterBand> getMeters() {
+ return meters;
+ }
+
+
+
+ public OFMeterMod.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFMeterMod.Builder {
+ final OFMeterModVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean commandSet;
+ private int command;
+ private boolean flagsSet;
+ private int flags;
+ private boolean meterIdSet;
+ private long meterId;
+ private boolean metersSet;
+ private List<OFMeterBand> meters;
+
+ BuilderWithParent(OFMeterModVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.METER_MOD;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFMeterMod.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public int getCommand() {
+ return command;
+ }
+
+ @Override
+ public OFMeterMod.Builder setCommand(int command) {
+ this.command = command;
+ this.commandSet = true;
+ return this;
+ }
+ @Override
+ public int getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFMeterMod.Builder setFlags(int flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getMeterId() {
+ return meterId;
+ }
+
+ @Override
+ public OFMeterMod.Builder setMeterId(long meterId) {
+ this.meterId = meterId;
+ this.meterIdSet = true;
+ return this;
+ }
+ @Override
+ public List<OFMeterBand> getMeters() {
+ return meters;
+ }
+
+ @Override
+ public OFMeterMod.Builder setMeters(List<OFMeterBand> meters) {
+ this.meters = meters;
+ this.metersSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFMeterMod build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ int command = this.commandSet ? this.command : parentMessage.command;
+ int flags = this.flagsSet ? this.flags : parentMessage.flags;
+ long meterId = this.meterIdSet ? this.meterId : parentMessage.meterId;
+ List<OFMeterBand> meters = this.metersSet ? this.meters : parentMessage.meters;
+ if(meters == null)
+ throw new NullPointerException("Property meters must not be null");
+
+ //
+ return new OFMeterModVer13(
+ xid,
+ command,
+ flags,
+ meterId,
+ meters
+ );
+ }
+
+ }
+
+ static class Builder implements OFMeterMod.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean commandSet;
+ private int command;
+ private boolean flagsSet;
+ private int flags;
+ private boolean meterIdSet;
+ private long meterId;
+ private boolean metersSet;
+ private List<OFMeterBand> meters;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.METER_MOD;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFMeterMod.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public int getCommand() {
+ return command;
+ }
+
+ @Override
+ public OFMeterMod.Builder setCommand(int command) {
+ this.command = command;
+ this.commandSet = true;
+ return this;
+ }
+ @Override
+ public int getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFMeterMod.Builder setFlags(int flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getMeterId() {
+ return meterId;
+ }
+
+ @Override
+ public OFMeterMod.Builder setMeterId(long meterId) {
+ this.meterId = meterId;
+ this.meterIdSet = true;
+ return this;
+ }
+ @Override
+ public List<OFMeterBand> getMeters() {
+ return meters;
+ }
+
+ @Override
+ public OFMeterMod.Builder setMeters(List<OFMeterBand> meters) {
+ this.meters = meters;
+ this.metersSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFMeterMod build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ int command = this.commandSet ? this.command : DEFAULT_COMMAND;
+ int flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ long meterId = this.meterIdSet ? this.meterId : DEFAULT_METER_ID;
+ List<OFMeterBand> meters = this.metersSet ? this.meters : DEFAULT_METERS;
+ if(meters == null)
+ throw new NullPointerException("Property meters must not be null");
+
+
+ return new OFMeterModVer13(
+ xid,
+ command,
+ flags,
+ meterId,
+ meters
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFMeterMod> {
+ @Override
+ public OFMeterMod readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 29
+ byte type = bb.readByte();
+ if(type != (byte) 0x1d)
+ throw new OFParseError("Wrong type: Expected=OFType.METER_MOD(29), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ int command = U16.f(bb.readShort());
+ int flags = U16.f(bb.readShort());
+ long meterId = U32.f(bb.readInt());
+ List<OFMeterBand> meters = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFMeterBandVer13.READER);
+
+ OFMeterModVer13 meterModVer13 = new OFMeterModVer13(
+ xid,
+ command,
+ flags,
+ meterId,
+ meters
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", meterModVer13);
+ return meterModVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFMeterModVer13Funnel FUNNEL = new OFMeterModVer13Funnel();
+ static class OFMeterModVer13Funnel implements Funnel<OFMeterModVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFMeterModVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 29
+ sink.putByte((byte) 0x1d);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ sink.putInt(message.command);
+ sink.putInt(message.flags);
+ sink.putLong(message.meterId);
+ FunnelUtils.putList(message.meters, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFMeterModVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFMeterModVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 29
+ bb.writeByte((byte) 0x1d);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ bb.writeShort(U16.t(message.command));
+ bb.writeShort(U16.t(message.flags));
+ bb.writeInt(U32.t(message.meterId));
+ ChannelUtils.writeList(bb, message.meters);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFMeterModVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("command=").append(command);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("meterId=").append(meterId);
+ b.append(", ");
+ b.append("meters=").append(meters);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFMeterModVer13 other = (OFMeterModVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if( command != other.command)
+ return false;
+ if( flags != other.flags)
+ return false;
+ if( meterId != other.meterId)
+ return false;
+ if (meters == null) {
+ if (other.meters != null)
+ return false;
+ } else if (!meters.equals(other.meters))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + command;
+ result = prime * result + flags;
+ result = prime * (int) (meterId ^ (meterId >>> 32));
+ result = prime * result + ((meters == null) ? 0 : meters.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterSerializerVer13.java
new file mode 100644
index 0000000..141cfe4
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterSerializerVer13.java
@@ -0,0 +1,84 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFMeter;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+
+public class OFMeterSerializerVer13 {
+
+ public final static int MAX_VAL = (int) 0xffff0000;
+ public final static int SLOWPATH_VAL = (int) 0xfffffffd;
+ public final static int CONTROLLER_VAL = (int) 0xfffffffe;
+ public final static int ALL_VAL = (int) 0xffffffff;
+
+ public static OFMeter readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readInt());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, OFMeter e) {
+ bb.writeInt(toWireValue(e));
+ }
+
+ public static void putTo(OFMeter e, PrimitiveSink sink) {
+ sink.putInt(toWireValue(e));
+ }
+
+ public static OFMeter ofWireValue(int val) {
+ switch(val) {
+ case MAX_VAL:
+ return OFMeter.MAX;
+ case SLOWPATH_VAL:
+ return OFMeter.SLOWPATH;
+ case CONTROLLER_VAL:
+ return OFMeter.CONTROLLER;
+ case ALL_VAL:
+ return OFMeter.ALL;
+ default:
+ throw new IllegalArgumentException("Illegal wire value for type OFMeter in version 1.3: " + val);
+ }
+ }
+
+
+ public static int toWireValue(OFMeter e) {
+ switch(e) {
+ case MAX:
+ return MAX_VAL;
+ case SLOWPATH:
+ return SLOWPATH_VAL;
+ case CONTROLLER:
+ return CONTROLLER_VAL;
+ case ALL:
+ return ALL_VAL;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFMeter in version 1.3: " + e);
+ }
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterStatsReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterStatsReplyVer13.java
new file mode 100644
index 0000000..135f96b
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterStatsReplyVer13.java
@@ -0,0 +1,412 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFMeterStatsReplyVer13 implements OFMeterStatsReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFMeterStatsReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 16;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsReplyFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsReplyFlags>of();
+ private final static List<OFMeterStats> DEFAULT_ENTRIES = ImmutableList.<OFMeterStats>of();
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsReplyFlags> flags;
+ private final List<OFMeterStats> entries;
+//
+ // Immutable default instance
+ final static OFMeterStatsReplyVer13 DEFAULT = new OFMeterStatsReplyVer13(
+ DEFAULT_XID, DEFAULT_FLAGS, DEFAULT_ENTRIES
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFMeterStatsReplyVer13(long xid, Set<OFStatsReplyFlags> flags, List<OFMeterStats> entries) {
+ this.xid = xid;
+ this.flags = flags;
+ this.entries = entries;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.METER;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public List<OFMeterStats> getEntries() {
+ return entries;
+ }
+
+
+
+ public OFMeterStatsReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFMeterStatsReply.Builder {
+ final OFMeterStatsReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean entriesSet;
+ private List<OFMeterStats> entries;
+
+ BuilderWithParent(OFMeterStatsReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFMeterStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.METER;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFMeterStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public List<OFMeterStats> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFMeterStatsReply.Builder setEntries(List<OFMeterStats> entries) {
+ this.entries = entries;
+ this.entriesSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFMeterStatsReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ List<OFMeterStats> entries = this.entriesSet ? this.entries : parentMessage.entries;
+ if(entries == null)
+ throw new NullPointerException("Property entries must not be null");
+
+ //
+ return new OFMeterStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ }
+
+ }
+
+ static class Builder implements OFMeterStatsReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean entriesSet;
+ private List<OFMeterStats> entries;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFMeterStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.METER;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFMeterStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public List<OFMeterStats> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFMeterStatsReply.Builder setEntries(List<OFMeterStats> entries) {
+ this.entries = entries;
+ this.entriesSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFMeterStatsReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ List<OFMeterStats> entries = this.entriesSet ? this.entries : DEFAULT_ENTRIES;
+ if(entries == null)
+ throw new NullPointerException("Property entries must not be null");
+
+
+ return new OFMeterStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFMeterStatsReply> {
+ @Override
+ public OFMeterStatsReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 19
+ byte type = bb.readByte();
+ if(type != (byte) 0x13)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REPLY(19), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 9
+ short statsType = bb.readShort();
+ if(statsType != (short) 0x9)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.METER(9), got="+statsType);
+ Set<OFStatsReplyFlags> flags = OFStatsReplyFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ List<OFMeterStats> entries = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFMeterStatsVer13.READER);
+
+ OFMeterStatsReplyVer13 meterStatsReplyVer13 = new OFMeterStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", meterStatsReplyVer13);
+ return meterStatsReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFMeterStatsReplyVer13Funnel FUNNEL = new OFMeterStatsReplyVer13Funnel();
+ static class OFMeterStatsReplyVer13Funnel implements Funnel<OFMeterStatsReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFMeterStatsReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 19
+ sink.putByte((byte) 0x13);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property statsType = 9
+ sink.putShort((short) 0x9);
+ OFStatsReplyFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ FunnelUtils.putList(message.entries, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFMeterStatsReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFMeterStatsReplyVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 19
+ bb.writeByte((byte) 0x13);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 9
+ bb.writeShort((short) 0x9);
+ OFStatsReplyFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ ChannelUtils.writeList(bb, message.entries);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFMeterStatsReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("entries=").append(entries);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFMeterStatsReplyVer13 other = (OFMeterStatsReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if (entries == null) {
+ if (other.entries != null)
+ return false;
+ } else if (!entries.equals(other.entries))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * result + ((entries == null) ? 0 : entries.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterStatsRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterStatsRequestVer13.java
new file mode 100644
index 0000000..c9a0133
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterStatsRequestVer13.java
@@ -0,0 +1,403 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFMeterStatsRequestVer13 implements OFMeterStatsRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFMeterStatsRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 24;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsRequestFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsRequestFlags>of();
+ private final static long DEFAULT_METER_ID = 0x0L;
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsRequestFlags> flags;
+ private final long meterId;
+//
+ // Immutable default instance
+ final static OFMeterStatsRequestVer13 DEFAULT = new OFMeterStatsRequestVer13(
+ DEFAULT_XID, DEFAULT_FLAGS, DEFAULT_METER_ID
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFMeterStatsRequestVer13(long xid, Set<OFStatsRequestFlags> flags, long meterId) {
+ this.xid = xid;
+ this.flags = flags;
+ this.meterId = meterId;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.METER;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public long getMeterId() {
+ return meterId;
+ }
+
+
+
+ public OFMeterStatsRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFMeterStatsRequest.Builder {
+ final OFMeterStatsRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+ private boolean meterIdSet;
+ private long meterId;
+
+ BuilderWithParent(OFMeterStatsRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFMeterStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.METER;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFMeterStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getMeterId() {
+ return meterId;
+ }
+
+ @Override
+ public OFMeterStatsRequest.Builder setMeterId(long meterId) {
+ this.meterId = meterId;
+ this.meterIdSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFMeterStatsRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ long meterId = this.meterIdSet ? this.meterId : parentMessage.meterId;
+
+ //
+ return new OFMeterStatsRequestVer13(
+ xid,
+ flags,
+ meterId
+ );
+ }
+
+ }
+
+ static class Builder implements OFMeterStatsRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+ private boolean meterIdSet;
+ private long meterId;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFMeterStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.METER;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFMeterStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public long getMeterId() {
+ return meterId;
+ }
+
+ @Override
+ public OFMeterStatsRequest.Builder setMeterId(long meterId) {
+ this.meterId = meterId;
+ this.meterIdSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFMeterStatsRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ long meterId = this.meterIdSet ? this.meterId : DEFAULT_METER_ID;
+
+
+ return new OFMeterStatsRequestVer13(
+ xid,
+ flags,
+ meterId
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFMeterStatsRequest> {
+ @Override
+ public OFMeterStatsRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 18
+ byte type = bb.readByte();
+ if(type != (byte) 0x12)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REQUEST(18), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 24)
+ throw new OFParseError("Wrong length: Expected=24(24), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 9
+ short statsType = bb.readShort();
+ if(statsType != (short) 0x9)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.METER(9), got="+statsType);
+ Set<OFStatsRequestFlags> flags = OFStatsRequestFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ long meterId = U32.f(bb.readInt());
+ // pad: 4 bytes
+ bb.skipBytes(4);
+
+ OFMeterStatsRequestVer13 meterStatsRequestVer13 = new OFMeterStatsRequestVer13(
+ xid,
+ flags,
+ meterId
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", meterStatsRequestVer13);
+ return meterStatsRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFMeterStatsRequestVer13Funnel FUNNEL = new OFMeterStatsRequestVer13Funnel();
+ static class OFMeterStatsRequestVer13Funnel implements Funnel<OFMeterStatsRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFMeterStatsRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 18
+ sink.putByte((byte) 0x12);
+ // fixed value property length = 24
+ sink.putShort((short) 0x18);
+ sink.putLong(message.xid);
+ // fixed value property statsType = 9
+ sink.putShort((short) 0x9);
+ OFStatsRequestFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ sink.putLong(message.meterId);
+ // skip pad (4 bytes)
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFMeterStatsRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFMeterStatsRequestVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 18
+ bb.writeByte((byte) 0x12);
+ // fixed value property length = 24
+ bb.writeShort((short) 0x18);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 9
+ bb.writeShort((short) 0x9);
+ OFStatsRequestFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ bb.writeInt(U32.t(message.meterId));
+ // pad: 4 bytes
+ bb.writeZero(4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFMeterStatsRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("meterId=").append(meterId);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFMeterStatsRequestVer13 other = (OFMeterStatsRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if( meterId != other.meterId)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * (int) (meterId ^ (meterId >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterStatsVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterStatsVer13.java
new file mode 100644
index 0000000..e5f5591
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterStatsVer13.java
@@ -0,0 +1,552 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFMeterStatsVer13 implements OFMeterStats {
+ private static final Logger logger = LoggerFactory.getLogger(OFMeterStatsVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 40;
+
+ private final static long DEFAULT_METER_ID = 0x0L;
+ private final static long DEFAULT_FLOW_COUNT = 0x0L;
+ private final static U64 DEFAULT_PACKET_IN_COUNT = U64.ZERO;
+ private final static U64 DEFAULT_BYTE_IN_COUNT = U64.ZERO;
+ private final static long DEFAULT_DURATION_SEC = 0x0L;
+ private final static long DEFAULT_DURATION_NSEC = 0x0L;
+ private final static List<OFMeterBandStats> DEFAULT_BAND_STATS = ImmutableList.<OFMeterBandStats>of();
+
+ // OF message fields
+ private final long meterId;
+ private final long flowCount;
+ private final U64 packetInCount;
+ private final U64 byteInCount;
+ private final long durationSec;
+ private final long durationNsec;
+ private final List<OFMeterBandStats> bandStats;
+//
+ // Immutable default instance
+ final static OFMeterStatsVer13 DEFAULT = new OFMeterStatsVer13(
+ DEFAULT_METER_ID, DEFAULT_FLOW_COUNT, DEFAULT_PACKET_IN_COUNT, DEFAULT_BYTE_IN_COUNT, DEFAULT_DURATION_SEC, DEFAULT_DURATION_NSEC, DEFAULT_BAND_STATS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFMeterStatsVer13(long meterId, long flowCount, U64 packetInCount, U64 byteInCount, long durationSec, long durationNsec, List<OFMeterBandStats> bandStats) {
+ this.meterId = meterId;
+ this.flowCount = flowCount;
+ this.packetInCount = packetInCount;
+ this.byteInCount = byteInCount;
+ this.durationSec = durationSec;
+ this.durationNsec = durationNsec;
+ this.bandStats = bandStats;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getMeterId() {
+ return meterId;
+ }
+
+ @Override
+ public long getFlowCount() {
+ return flowCount;
+ }
+
+ @Override
+ public U64 getPacketInCount() {
+ return packetInCount;
+ }
+
+ @Override
+ public U64 getByteInCount() {
+ return byteInCount;
+ }
+
+ @Override
+ public long getDurationSec() {
+ return durationSec;
+ }
+
+ @Override
+ public long getDurationNsec() {
+ return durationNsec;
+ }
+
+ @Override
+ public List<OFMeterBandStats> getBandStats() {
+ return bandStats;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFMeterStats.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFMeterStats.Builder {
+ final OFMeterStatsVer13 parentMessage;
+
+ // OF message fields
+ private boolean meterIdSet;
+ private long meterId;
+ private boolean flowCountSet;
+ private long flowCount;
+ private boolean packetInCountSet;
+ private U64 packetInCount;
+ private boolean byteInCountSet;
+ private U64 byteInCount;
+ private boolean durationSecSet;
+ private long durationSec;
+ private boolean durationNsecSet;
+ private long durationNsec;
+ private boolean bandStatsSet;
+ private List<OFMeterBandStats> bandStats;
+
+ BuilderWithParent(OFMeterStatsVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getMeterId() {
+ return meterId;
+ }
+
+ @Override
+ public OFMeterStats.Builder setMeterId(long meterId) {
+ this.meterId = meterId;
+ this.meterIdSet = true;
+ return this;
+ }
+ @Override
+ public long getFlowCount() {
+ return flowCount;
+ }
+
+ @Override
+ public OFMeterStats.Builder setFlowCount(long flowCount) {
+ this.flowCount = flowCount;
+ this.flowCountSet = true;
+ return this;
+ }
+ @Override
+ public U64 getPacketInCount() {
+ return packetInCount;
+ }
+
+ @Override
+ public OFMeterStats.Builder setPacketInCount(U64 packetInCount) {
+ this.packetInCount = packetInCount;
+ this.packetInCountSet = true;
+ return this;
+ }
+ @Override
+ public U64 getByteInCount() {
+ return byteInCount;
+ }
+
+ @Override
+ public OFMeterStats.Builder setByteInCount(U64 byteInCount) {
+ this.byteInCount = byteInCount;
+ this.byteInCountSet = true;
+ return this;
+ }
+ @Override
+ public long getDurationSec() {
+ return durationSec;
+ }
+
+ @Override
+ public OFMeterStats.Builder setDurationSec(long durationSec) {
+ this.durationSec = durationSec;
+ this.durationSecSet = true;
+ return this;
+ }
+ @Override
+ public long getDurationNsec() {
+ return durationNsec;
+ }
+
+ @Override
+ public OFMeterStats.Builder setDurationNsec(long durationNsec) {
+ this.durationNsec = durationNsec;
+ this.durationNsecSet = true;
+ return this;
+ }
+ @Override
+ public List<OFMeterBandStats> getBandStats() {
+ return bandStats;
+ }
+
+ @Override
+ public OFMeterStats.Builder setBandStats(List<OFMeterBandStats> bandStats) {
+ this.bandStats = bandStats;
+ this.bandStatsSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFMeterStats build() {
+ long meterId = this.meterIdSet ? this.meterId : parentMessage.meterId;
+ long flowCount = this.flowCountSet ? this.flowCount : parentMessage.flowCount;
+ U64 packetInCount = this.packetInCountSet ? this.packetInCount : parentMessage.packetInCount;
+ if(packetInCount == null)
+ throw new NullPointerException("Property packetInCount must not be null");
+ U64 byteInCount = this.byteInCountSet ? this.byteInCount : parentMessage.byteInCount;
+ if(byteInCount == null)
+ throw new NullPointerException("Property byteInCount must not be null");
+ long durationSec = this.durationSecSet ? this.durationSec : parentMessage.durationSec;
+ long durationNsec = this.durationNsecSet ? this.durationNsec : parentMessage.durationNsec;
+ List<OFMeterBandStats> bandStats = this.bandStatsSet ? this.bandStats : parentMessage.bandStats;
+ if(bandStats == null)
+ throw new NullPointerException("Property bandStats must not be null");
+
+ //
+ return new OFMeterStatsVer13(
+ meterId,
+ flowCount,
+ packetInCount,
+ byteInCount,
+ durationSec,
+ durationNsec,
+ bandStats
+ );
+ }
+
+ }
+
+ static class Builder implements OFMeterStats.Builder {
+ // OF message fields
+ private boolean meterIdSet;
+ private long meterId;
+ private boolean flowCountSet;
+ private long flowCount;
+ private boolean packetInCountSet;
+ private U64 packetInCount;
+ private boolean byteInCountSet;
+ private U64 byteInCount;
+ private boolean durationSecSet;
+ private long durationSec;
+ private boolean durationNsecSet;
+ private long durationNsec;
+ private boolean bandStatsSet;
+ private List<OFMeterBandStats> bandStats;
+
+ @Override
+ public long getMeterId() {
+ return meterId;
+ }
+
+ @Override
+ public OFMeterStats.Builder setMeterId(long meterId) {
+ this.meterId = meterId;
+ this.meterIdSet = true;
+ return this;
+ }
+ @Override
+ public long getFlowCount() {
+ return flowCount;
+ }
+
+ @Override
+ public OFMeterStats.Builder setFlowCount(long flowCount) {
+ this.flowCount = flowCount;
+ this.flowCountSet = true;
+ return this;
+ }
+ @Override
+ public U64 getPacketInCount() {
+ return packetInCount;
+ }
+
+ @Override
+ public OFMeterStats.Builder setPacketInCount(U64 packetInCount) {
+ this.packetInCount = packetInCount;
+ this.packetInCountSet = true;
+ return this;
+ }
+ @Override
+ public U64 getByteInCount() {
+ return byteInCount;
+ }
+
+ @Override
+ public OFMeterStats.Builder setByteInCount(U64 byteInCount) {
+ this.byteInCount = byteInCount;
+ this.byteInCountSet = true;
+ return this;
+ }
+ @Override
+ public long getDurationSec() {
+ return durationSec;
+ }
+
+ @Override
+ public OFMeterStats.Builder setDurationSec(long durationSec) {
+ this.durationSec = durationSec;
+ this.durationSecSet = true;
+ return this;
+ }
+ @Override
+ public long getDurationNsec() {
+ return durationNsec;
+ }
+
+ @Override
+ public OFMeterStats.Builder setDurationNsec(long durationNsec) {
+ this.durationNsec = durationNsec;
+ this.durationNsecSet = true;
+ return this;
+ }
+ @Override
+ public List<OFMeterBandStats> getBandStats() {
+ return bandStats;
+ }
+
+ @Override
+ public OFMeterStats.Builder setBandStats(List<OFMeterBandStats> bandStats) {
+ this.bandStats = bandStats;
+ this.bandStatsSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFMeterStats build() {
+ long meterId = this.meterIdSet ? this.meterId : DEFAULT_METER_ID;
+ long flowCount = this.flowCountSet ? this.flowCount : DEFAULT_FLOW_COUNT;
+ U64 packetInCount = this.packetInCountSet ? this.packetInCount : DEFAULT_PACKET_IN_COUNT;
+ if(packetInCount == null)
+ throw new NullPointerException("Property packetInCount must not be null");
+ U64 byteInCount = this.byteInCountSet ? this.byteInCount : DEFAULT_BYTE_IN_COUNT;
+ if(byteInCount == null)
+ throw new NullPointerException("Property byteInCount must not be null");
+ long durationSec = this.durationSecSet ? this.durationSec : DEFAULT_DURATION_SEC;
+ long durationNsec = this.durationNsecSet ? this.durationNsec : DEFAULT_DURATION_NSEC;
+ List<OFMeterBandStats> bandStats = this.bandStatsSet ? this.bandStats : DEFAULT_BAND_STATS;
+ if(bandStats == null)
+ throw new NullPointerException("Property bandStats must not be null");
+
+
+ return new OFMeterStatsVer13(
+ meterId,
+ flowCount,
+ packetInCount,
+ byteInCount,
+ durationSec,
+ durationNsec,
+ bandStats
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFMeterStats> {
+ @Override
+ public OFMeterStats readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ long meterId = U32.f(bb.readInt());
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ // pad: 6 bytes
+ bb.skipBytes(6);
+ long flowCount = U32.f(bb.readInt());
+ U64 packetInCount = U64.ofRaw(bb.readLong());
+ U64 byteInCount = U64.ofRaw(bb.readLong());
+ long durationSec = U32.f(bb.readInt());
+ long durationNsec = U32.f(bb.readInt());
+ List<OFMeterBandStats> bandStats = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFMeterBandStatsVer13.READER);
+
+ OFMeterStatsVer13 meterStatsVer13 = new OFMeterStatsVer13(
+ meterId,
+ flowCount,
+ packetInCount,
+ byteInCount,
+ durationSec,
+ durationNsec,
+ bandStats
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", meterStatsVer13);
+ return meterStatsVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFMeterStatsVer13Funnel FUNNEL = new OFMeterStatsVer13Funnel();
+ static class OFMeterStatsVer13Funnel implements Funnel<OFMeterStatsVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFMeterStatsVer13 message, PrimitiveSink sink) {
+ sink.putLong(message.meterId);
+ // FIXME: skip funnel of length
+ // skip pad (6 bytes)
+ sink.putLong(message.flowCount);
+ message.packetInCount.putTo(sink);
+ message.byteInCount.putTo(sink);
+ sink.putLong(message.durationSec);
+ sink.putLong(message.durationNsec);
+ FunnelUtils.putList(message.bandStats, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFMeterStatsVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFMeterStatsVer13 message) {
+ int startIndex = bb.writerIndex();
+ bb.writeInt(U32.t(message.meterId));
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ // pad: 6 bytes
+ bb.writeZero(6);
+ bb.writeInt(U32.t(message.flowCount));
+ bb.writeLong(message.packetInCount.getValue());
+ bb.writeLong(message.byteInCount.getValue());
+ bb.writeInt(U32.t(message.durationSec));
+ bb.writeInt(U32.t(message.durationNsec));
+ ChannelUtils.writeList(bb, message.bandStats);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFMeterStatsVer13(");
+ b.append("meterId=").append(meterId);
+ b.append(", ");
+ b.append("flowCount=").append(flowCount);
+ b.append(", ");
+ b.append("packetInCount=").append(packetInCount);
+ b.append(", ");
+ b.append("byteInCount=").append(byteInCount);
+ b.append(", ");
+ b.append("durationSec=").append(durationSec);
+ b.append(", ");
+ b.append("durationNsec=").append(durationNsec);
+ b.append(", ");
+ b.append("bandStats=").append(bandStats);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFMeterStatsVer13 other = (OFMeterStatsVer13) obj;
+
+ if( meterId != other.meterId)
+ return false;
+ if( flowCount != other.flowCount)
+ return false;
+ if (packetInCount == null) {
+ if (other.packetInCount != null)
+ return false;
+ } else if (!packetInCount.equals(other.packetInCount))
+ return false;
+ if (byteInCount == null) {
+ if (other.byteInCount != null)
+ return false;
+ } else if (!byteInCount.equals(other.byteInCount))
+ return false;
+ if( durationSec != other.durationSec)
+ return false;
+ if( durationNsec != other.durationNsec)
+ return false;
+ if (bandStats == null) {
+ if (other.bandStats != null)
+ return false;
+ } else if (!bandStats.equals(other.bandStats))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (meterId ^ (meterId >>> 32));
+ result = prime * (int) (flowCount ^ (flowCount >>> 32));
+ result = prime * result + ((packetInCount == null) ? 0 : packetInCount.hashCode());
+ result = prime * result + ((byteInCount == null) ? 0 : byteInCount.hashCode());
+ result = prime * (int) (durationSec ^ (durationSec >>> 32));
+ result = prime * (int) (durationNsec ^ (durationNsec >>> 32));
+ result = prime * result + ((bandStats == null) ? 0 : bandStats.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFNiciraHeaderVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFNiciraHeaderVer13.java
new file mode 100644
index 0000000..2c6fbf9
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFNiciraHeaderVer13.java
@@ -0,0 +1,66 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_virtual_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.jboss.netty.buffer.ChannelBuffer;
+
+abstract class OFNiciraHeaderVer13 {
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 16;
+
+
+ public final static OFNiciraHeaderVer13.Reader READER = new Reader();
+
+ static class Reader implements OFMessageReader<OFNiciraHeader> {
+ @Override
+ public OFNiciraHeader readFrom(ChannelBuffer bb) throws OFParseError {
+ if(bb.readableBytes() < MINIMUM_LENGTH)
+ return null;
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 4
+ byte type = bb.readByte();
+ if(type != (byte) 0x4)
+ throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ U32.f(bb.readInt());
+ // fixed value property experimenter == 0x2320L
+ int experimenter = bb.readInt();
+ if(experimenter != 0x2320)
+ throw new OFParseError("Wrong experimenter: Expected=0x2320L(0x2320L), got="+experimenter);
+ int subtype = bb.readInt();
+ bb.readerIndex(start);
+ switch(subtype) {
+ default:
+ throw new OFParseError("Unknown value for discriminator subtype of class OFNiciraHeaderVer13: " + subtype);
+ }
+ }
+ }
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmArpOpMaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmArpOpMaskedVer13.java
new file mode 100644
index 0000000..2505004
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmArpOpMaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmArpOpMaskedVer13 implements OFOxmArpOpMasked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmArpOpMaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static ArpOpcode DEFAULT_VALUE = ArpOpcode.NONE;
+ private final static ArpOpcode DEFAULT_VALUE_MASK = ArpOpcode.NONE;
+
+ // OF message fields
+ private final ArpOpcode value;
+ private final ArpOpcode mask;
+//
+ // Immutable default instance
+ final static OFOxmArpOpMaskedVer13 DEFAULT = new OFOxmArpOpMaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmArpOpMaskedVer13(ArpOpcode value, ArpOpcode mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80002b04L;
+ }
+
+ @Override
+ public ArpOpcode getValue() {
+ return value;
+ }
+
+ @Override
+ public ArpOpcode getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<ArpOpcode> getMatchField() {
+ return MatchField.ARP_OP;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<ArpOpcode> getCanonical() {
+ if (ArpOpcode.NO_MASK.equals(mask)) {
+ return new OFOxmArpOpVer13(value);
+ } else if(ArpOpcode.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmArpOpMasked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmArpOpMasked.Builder {
+ final OFOxmArpOpMaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private ArpOpcode value;
+ private boolean maskSet;
+ private ArpOpcode mask;
+
+ BuilderWithParent(OFOxmArpOpMaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80002b04L;
+ }
+
+ @Override
+ public ArpOpcode getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmArpOpMasked.Builder setValue(ArpOpcode value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public ArpOpcode getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmArpOpMasked.Builder setMask(ArpOpcode mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<ArpOpcode> getMatchField() {
+ return MatchField.ARP_OP;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<ArpOpcode> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmArpOpMasked build() {
+ ArpOpcode value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ ArpOpcode mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmArpOpMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmArpOpMasked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private ArpOpcode value;
+ private boolean maskSet;
+ private ArpOpcode mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80002b04L;
+ }
+
+ @Override
+ public ArpOpcode getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmArpOpMasked.Builder setValue(ArpOpcode value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public ArpOpcode getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmArpOpMasked.Builder setMask(ArpOpcode mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<ArpOpcode> getMatchField() {
+ return MatchField.ARP_OP;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<ArpOpcode> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmArpOpMasked build() {
+ ArpOpcode value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ ArpOpcode mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmArpOpMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmArpOpMasked> {
+ @Override
+ public OFOxmArpOpMasked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80002b04L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80002b04)
+ throw new OFParseError("Wrong typeLen: Expected=0x80002b04L(0x80002b04L), got="+typeLen);
+ ArpOpcode value = ArpOpcode.read2Bytes(bb);
+ ArpOpcode mask = ArpOpcode.read2Bytes(bb);
+
+ OFOxmArpOpMaskedVer13 oxmArpOpMaskedVer13 = new OFOxmArpOpMaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmArpOpMaskedVer13);
+ return oxmArpOpMaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmArpOpMaskedVer13Funnel FUNNEL = new OFOxmArpOpMaskedVer13Funnel();
+ static class OFOxmArpOpMaskedVer13Funnel implements Funnel<OFOxmArpOpMaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmArpOpMaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80002b04L
+ sink.putInt((int) 0x80002b04);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmArpOpMaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmArpOpMaskedVer13 message) {
+ // fixed value property typeLen = 0x80002b04L
+ bb.writeInt((int) 0x80002b04);
+ message.value.write2Bytes(bb);
+ message.mask.write2Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmArpOpMaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmArpOpMaskedVer13 other = (OFOxmArpOpMaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmArpOpVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmArpOpVer13.java
new file mode 100644
index 0000000..e3e2456
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmArpOpVer13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmArpOpVer13 implements OFOxmArpOp {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmArpOpVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 6;
+
+ private final static ArpOpcode DEFAULT_VALUE = ArpOpcode.NONE;
+
+ // OF message fields
+ private final ArpOpcode value;
+//
+ // Immutable default instance
+ final static OFOxmArpOpVer13 DEFAULT = new OFOxmArpOpVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmArpOpVer13(ArpOpcode value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80002a02L;
+ }
+
+ @Override
+ public ArpOpcode getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<ArpOpcode> getMatchField() {
+ return MatchField.ARP_OP;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<ArpOpcode> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public ArpOpcode getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmArpOp.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmArpOp.Builder {
+ final OFOxmArpOpVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private ArpOpcode value;
+
+ BuilderWithParent(OFOxmArpOpVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80002a02L;
+ }
+
+ @Override
+ public ArpOpcode getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmArpOp.Builder setValue(ArpOpcode value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<ArpOpcode> getMatchField() {
+ return MatchField.ARP_OP;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<ArpOpcode> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public ArpOpcode getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmArpOp build() {
+ ArpOpcode value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmArpOpVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmArpOp.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private ArpOpcode value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80002a02L;
+ }
+
+ @Override
+ public ArpOpcode getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmArpOp.Builder setValue(ArpOpcode value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<ArpOpcode> getMatchField() {
+ return MatchField.ARP_OP;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<ArpOpcode> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public ArpOpcode getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmArpOp build() {
+ ArpOpcode value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmArpOpVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmArpOp> {
+ @Override
+ public OFOxmArpOp readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80002a02L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80002a02)
+ throw new OFParseError("Wrong typeLen: Expected=0x80002a02L(0x80002a02L), got="+typeLen);
+ ArpOpcode value = ArpOpcode.read2Bytes(bb);
+
+ OFOxmArpOpVer13 oxmArpOpVer13 = new OFOxmArpOpVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmArpOpVer13);
+ return oxmArpOpVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmArpOpVer13Funnel FUNNEL = new OFOxmArpOpVer13Funnel();
+ static class OFOxmArpOpVer13Funnel implements Funnel<OFOxmArpOpVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmArpOpVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80002a02L
+ sink.putInt((int) 0x80002a02);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmArpOpVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmArpOpVer13 message) {
+ // fixed value property typeLen = 0x80002a02L
+ bb.writeInt((int) 0x80002a02);
+ message.value.write2Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmArpOpVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmArpOpVer13 other = (OFOxmArpOpVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmArpShaMaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmArpShaMaskedVer13.java
new file mode 100644
index 0000000..359cde4
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmArpShaMaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmArpShaMaskedVer13 implements OFOxmArpShaMasked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmArpShaMaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 16;
+
+ private final static MacAddress DEFAULT_VALUE = MacAddress.NONE;
+ private final static MacAddress DEFAULT_VALUE_MASK = MacAddress.NONE;
+
+ // OF message fields
+ private final MacAddress value;
+ private final MacAddress mask;
+//
+ // Immutable default instance
+ final static OFOxmArpShaMaskedVer13 DEFAULT = new OFOxmArpShaMaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmArpShaMaskedVer13(MacAddress value, MacAddress mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x8000310cL;
+ }
+
+ @Override
+ public MacAddress getValue() {
+ return value;
+ }
+
+ @Override
+ public MacAddress getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<MacAddress> getMatchField() {
+ return MatchField.ARP_SHA;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<MacAddress> getCanonical() {
+ if (MacAddress.NO_MASK.equals(mask)) {
+ return new OFOxmArpShaVer13(value);
+ } else if(MacAddress.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmArpShaMasked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmArpShaMasked.Builder {
+ final OFOxmArpShaMaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private MacAddress value;
+ private boolean maskSet;
+ private MacAddress mask;
+
+ BuilderWithParent(OFOxmArpShaMaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x8000310cL;
+ }
+
+ @Override
+ public MacAddress getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmArpShaMasked.Builder setValue(MacAddress value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MacAddress getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmArpShaMasked.Builder setMask(MacAddress mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<MacAddress> getMatchField() {
+ return MatchField.ARP_SHA;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<MacAddress> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmArpShaMasked build() {
+ MacAddress value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ MacAddress mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmArpShaMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmArpShaMasked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private MacAddress value;
+ private boolean maskSet;
+ private MacAddress mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x8000310cL;
+ }
+
+ @Override
+ public MacAddress getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmArpShaMasked.Builder setValue(MacAddress value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MacAddress getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmArpShaMasked.Builder setMask(MacAddress mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<MacAddress> getMatchField() {
+ return MatchField.ARP_SHA;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<MacAddress> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmArpShaMasked build() {
+ MacAddress value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ MacAddress mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmArpShaMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmArpShaMasked> {
+ @Override
+ public OFOxmArpShaMasked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x8000310cL
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x8000310c)
+ throw new OFParseError("Wrong typeLen: Expected=0x8000310cL(0x8000310cL), got="+typeLen);
+ MacAddress value = MacAddress.read6Bytes(bb);
+ MacAddress mask = MacAddress.read6Bytes(bb);
+
+ OFOxmArpShaMaskedVer13 oxmArpShaMaskedVer13 = new OFOxmArpShaMaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmArpShaMaskedVer13);
+ return oxmArpShaMaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmArpShaMaskedVer13Funnel FUNNEL = new OFOxmArpShaMaskedVer13Funnel();
+ static class OFOxmArpShaMaskedVer13Funnel implements Funnel<OFOxmArpShaMaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmArpShaMaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x8000310cL
+ sink.putInt((int) 0x8000310c);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmArpShaMaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmArpShaMaskedVer13 message) {
+ // fixed value property typeLen = 0x8000310cL
+ bb.writeInt((int) 0x8000310c);
+ message.value.write6Bytes(bb);
+ message.mask.write6Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmArpShaMaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmArpShaMaskedVer13 other = (OFOxmArpShaMaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmArpShaVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmArpShaVer13.java
new file mode 100644
index 0000000..7cb0173
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmArpShaVer13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmArpShaVer13 implements OFOxmArpSha {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmArpShaVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 10;
+
+ private final static MacAddress DEFAULT_VALUE = MacAddress.NONE;
+
+ // OF message fields
+ private final MacAddress value;
+//
+ // Immutable default instance
+ final static OFOxmArpShaVer13 DEFAULT = new OFOxmArpShaVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmArpShaVer13(MacAddress value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80003006L;
+ }
+
+ @Override
+ public MacAddress getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<MacAddress> getMatchField() {
+ return MatchField.ARP_SHA;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<MacAddress> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public MacAddress getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmArpSha.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmArpSha.Builder {
+ final OFOxmArpShaVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private MacAddress value;
+
+ BuilderWithParent(OFOxmArpShaVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80003006L;
+ }
+
+ @Override
+ public MacAddress getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmArpSha.Builder setValue(MacAddress value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<MacAddress> getMatchField() {
+ return MatchField.ARP_SHA;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<MacAddress> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public MacAddress getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmArpSha build() {
+ MacAddress value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmArpShaVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmArpSha.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private MacAddress value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80003006L;
+ }
+
+ @Override
+ public MacAddress getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmArpSha.Builder setValue(MacAddress value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<MacAddress> getMatchField() {
+ return MatchField.ARP_SHA;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<MacAddress> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public MacAddress getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmArpSha build() {
+ MacAddress value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmArpShaVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmArpSha> {
+ @Override
+ public OFOxmArpSha readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80003006L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80003006)
+ throw new OFParseError("Wrong typeLen: Expected=0x80003006L(0x80003006L), got="+typeLen);
+ MacAddress value = MacAddress.read6Bytes(bb);
+
+ OFOxmArpShaVer13 oxmArpShaVer13 = new OFOxmArpShaVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmArpShaVer13);
+ return oxmArpShaVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmArpShaVer13Funnel FUNNEL = new OFOxmArpShaVer13Funnel();
+ static class OFOxmArpShaVer13Funnel implements Funnel<OFOxmArpShaVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmArpShaVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80003006L
+ sink.putInt((int) 0x80003006);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmArpShaVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmArpShaVer13 message) {
+ // fixed value property typeLen = 0x80003006L
+ bb.writeInt((int) 0x80003006);
+ message.value.write6Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmArpShaVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmArpShaVer13 other = (OFOxmArpShaVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmArpSpaMaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmArpSpaMaskedVer13.java
new file mode 100644
index 0000000..bd61419
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmArpSpaMaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmArpSpaMaskedVer13 implements OFOxmArpSpaMasked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmArpSpaMaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 12;
+
+ private final static IPv4Address DEFAULT_VALUE = IPv4Address.NONE;
+ private final static IPv4Address DEFAULT_VALUE_MASK = IPv4Address.NONE;
+
+ // OF message fields
+ private final IPv4Address value;
+ private final IPv4Address mask;
+//
+ // Immutable default instance
+ final static OFOxmArpSpaMaskedVer13 DEFAULT = new OFOxmArpSpaMaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmArpSpaMaskedVer13(IPv4Address value, IPv4Address mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80002d08L;
+ }
+
+ @Override
+ public IPv4Address getValue() {
+ return value;
+ }
+
+ @Override
+ public IPv4Address getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<IPv4Address> getMatchField() {
+ return MatchField.ARP_SPA;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<IPv4Address> getCanonical() {
+ if (IPv4Address.NO_MASK.equals(mask)) {
+ return new OFOxmArpSpaVer13(value);
+ } else if(IPv4Address.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmArpSpaMasked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmArpSpaMasked.Builder {
+ final OFOxmArpSpaMaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private IPv4Address value;
+ private boolean maskSet;
+ private IPv4Address mask;
+
+ BuilderWithParent(OFOxmArpSpaMaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80002d08L;
+ }
+
+ @Override
+ public IPv4Address getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmArpSpaMasked.Builder setValue(IPv4Address value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public IPv4Address getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmArpSpaMasked.Builder setMask(IPv4Address mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<IPv4Address> getMatchField() {
+ return MatchField.ARP_SPA;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<IPv4Address> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmArpSpaMasked build() {
+ IPv4Address value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ IPv4Address mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmArpSpaMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmArpSpaMasked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private IPv4Address value;
+ private boolean maskSet;
+ private IPv4Address mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80002d08L;
+ }
+
+ @Override
+ public IPv4Address getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmArpSpaMasked.Builder setValue(IPv4Address value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public IPv4Address getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmArpSpaMasked.Builder setMask(IPv4Address mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<IPv4Address> getMatchField() {
+ return MatchField.ARP_SPA;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<IPv4Address> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmArpSpaMasked build() {
+ IPv4Address value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ IPv4Address mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmArpSpaMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmArpSpaMasked> {
+ @Override
+ public OFOxmArpSpaMasked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80002d08L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80002d08)
+ throw new OFParseError("Wrong typeLen: Expected=0x80002d08L(0x80002d08L), got="+typeLen);
+ IPv4Address value = IPv4Address.read4Bytes(bb);
+ IPv4Address mask = IPv4Address.read4Bytes(bb);
+
+ OFOxmArpSpaMaskedVer13 oxmArpSpaMaskedVer13 = new OFOxmArpSpaMaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmArpSpaMaskedVer13);
+ return oxmArpSpaMaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmArpSpaMaskedVer13Funnel FUNNEL = new OFOxmArpSpaMaskedVer13Funnel();
+ static class OFOxmArpSpaMaskedVer13Funnel implements Funnel<OFOxmArpSpaMaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmArpSpaMaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80002d08L
+ sink.putInt((int) 0x80002d08);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmArpSpaMaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmArpSpaMaskedVer13 message) {
+ // fixed value property typeLen = 0x80002d08L
+ bb.writeInt((int) 0x80002d08);
+ message.value.write4Bytes(bb);
+ message.mask.write4Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmArpSpaMaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmArpSpaMaskedVer13 other = (OFOxmArpSpaMaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmArpSpaVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmArpSpaVer13.java
new file mode 100644
index 0000000..ee87344
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmArpSpaVer13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmArpSpaVer13 implements OFOxmArpSpa {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmArpSpaVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static IPv4Address DEFAULT_VALUE = IPv4Address.NONE;
+
+ // OF message fields
+ private final IPv4Address value;
+//
+ // Immutable default instance
+ final static OFOxmArpSpaVer13 DEFAULT = new OFOxmArpSpaVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmArpSpaVer13(IPv4Address value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80002c04L;
+ }
+
+ @Override
+ public IPv4Address getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<IPv4Address> getMatchField() {
+ return MatchField.ARP_SPA;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<IPv4Address> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public IPv4Address getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmArpSpa.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmArpSpa.Builder {
+ final OFOxmArpSpaVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private IPv4Address value;
+
+ BuilderWithParent(OFOxmArpSpaVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80002c04L;
+ }
+
+ @Override
+ public IPv4Address getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmArpSpa.Builder setValue(IPv4Address value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<IPv4Address> getMatchField() {
+ return MatchField.ARP_SPA;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<IPv4Address> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public IPv4Address getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmArpSpa build() {
+ IPv4Address value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmArpSpaVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmArpSpa.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private IPv4Address value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80002c04L;
+ }
+
+ @Override
+ public IPv4Address getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmArpSpa.Builder setValue(IPv4Address value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<IPv4Address> getMatchField() {
+ return MatchField.ARP_SPA;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<IPv4Address> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public IPv4Address getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmArpSpa build() {
+ IPv4Address value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmArpSpaVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmArpSpa> {
+ @Override
+ public OFOxmArpSpa readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80002c04L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80002c04)
+ throw new OFParseError("Wrong typeLen: Expected=0x80002c04L(0x80002c04L), got="+typeLen);
+ IPv4Address value = IPv4Address.read4Bytes(bb);
+
+ OFOxmArpSpaVer13 oxmArpSpaVer13 = new OFOxmArpSpaVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmArpSpaVer13);
+ return oxmArpSpaVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmArpSpaVer13Funnel FUNNEL = new OFOxmArpSpaVer13Funnel();
+ static class OFOxmArpSpaVer13Funnel implements Funnel<OFOxmArpSpaVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmArpSpaVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80002c04L
+ sink.putInt((int) 0x80002c04);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmArpSpaVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmArpSpaVer13 message) {
+ // fixed value property typeLen = 0x80002c04L
+ bb.writeInt((int) 0x80002c04);
+ message.value.write4Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmArpSpaVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmArpSpaVer13 other = (OFOxmArpSpaVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmArpThaMaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmArpThaMaskedVer13.java
new file mode 100644
index 0000000..5ee778d
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmArpThaMaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmArpThaMaskedVer13 implements OFOxmArpThaMasked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmArpThaMaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 16;
+
+ private final static MacAddress DEFAULT_VALUE = MacAddress.NONE;
+ private final static MacAddress DEFAULT_VALUE_MASK = MacAddress.NONE;
+
+ // OF message fields
+ private final MacAddress value;
+ private final MacAddress mask;
+//
+ // Immutable default instance
+ final static OFOxmArpThaMaskedVer13 DEFAULT = new OFOxmArpThaMaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmArpThaMaskedVer13(MacAddress value, MacAddress mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x8000330cL;
+ }
+
+ @Override
+ public MacAddress getValue() {
+ return value;
+ }
+
+ @Override
+ public MacAddress getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<MacAddress> getMatchField() {
+ return MatchField.ARP_THA;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<MacAddress> getCanonical() {
+ if (MacAddress.NO_MASK.equals(mask)) {
+ return new OFOxmArpThaVer13(value);
+ } else if(MacAddress.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmArpThaMasked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmArpThaMasked.Builder {
+ final OFOxmArpThaMaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private MacAddress value;
+ private boolean maskSet;
+ private MacAddress mask;
+
+ BuilderWithParent(OFOxmArpThaMaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x8000330cL;
+ }
+
+ @Override
+ public MacAddress getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmArpThaMasked.Builder setValue(MacAddress value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MacAddress getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmArpThaMasked.Builder setMask(MacAddress mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<MacAddress> getMatchField() {
+ return MatchField.ARP_THA;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<MacAddress> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmArpThaMasked build() {
+ MacAddress value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ MacAddress mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmArpThaMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmArpThaMasked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private MacAddress value;
+ private boolean maskSet;
+ private MacAddress mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x8000330cL;
+ }
+
+ @Override
+ public MacAddress getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmArpThaMasked.Builder setValue(MacAddress value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MacAddress getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmArpThaMasked.Builder setMask(MacAddress mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<MacAddress> getMatchField() {
+ return MatchField.ARP_THA;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<MacAddress> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmArpThaMasked build() {
+ MacAddress value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ MacAddress mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmArpThaMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmArpThaMasked> {
+ @Override
+ public OFOxmArpThaMasked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x8000330cL
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x8000330c)
+ throw new OFParseError("Wrong typeLen: Expected=0x8000330cL(0x8000330cL), got="+typeLen);
+ MacAddress value = MacAddress.read6Bytes(bb);
+ MacAddress mask = MacAddress.read6Bytes(bb);
+
+ OFOxmArpThaMaskedVer13 oxmArpThaMaskedVer13 = new OFOxmArpThaMaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmArpThaMaskedVer13);
+ return oxmArpThaMaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmArpThaMaskedVer13Funnel FUNNEL = new OFOxmArpThaMaskedVer13Funnel();
+ static class OFOxmArpThaMaskedVer13Funnel implements Funnel<OFOxmArpThaMaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmArpThaMaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x8000330cL
+ sink.putInt((int) 0x8000330c);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmArpThaMaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmArpThaMaskedVer13 message) {
+ // fixed value property typeLen = 0x8000330cL
+ bb.writeInt((int) 0x8000330c);
+ message.value.write6Bytes(bb);
+ message.mask.write6Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmArpThaMaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmArpThaMaskedVer13 other = (OFOxmArpThaMaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmArpThaVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmArpThaVer13.java
new file mode 100644
index 0000000..44773e8
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmArpThaVer13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmArpThaVer13 implements OFOxmArpTha {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmArpThaVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 10;
+
+ private final static MacAddress DEFAULT_VALUE = MacAddress.NONE;
+
+ // OF message fields
+ private final MacAddress value;
+//
+ // Immutable default instance
+ final static OFOxmArpThaVer13 DEFAULT = new OFOxmArpThaVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmArpThaVer13(MacAddress value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80003206L;
+ }
+
+ @Override
+ public MacAddress getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<MacAddress> getMatchField() {
+ return MatchField.ARP_THA;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<MacAddress> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public MacAddress getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmArpTha.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmArpTha.Builder {
+ final OFOxmArpThaVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private MacAddress value;
+
+ BuilderWithParent(OFOxmArpThaVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80003206L;
+ }
+
+ @Override
+ public MacAddress getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmArpTha.Builder setValue(MacAddress value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<MacAddress> getMatchField() {
+ return MatchField.ARP_THA;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<MacAddress> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public MacAddress getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmArpTha build() {
+ MacAddress value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmArpThaVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmArpTha.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private MacAddress value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80003206L;
+ }
+
+ @Override
+ public MacAddress getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmArpTha.Builder setValue(MacAddress value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<MacAddress> getMatchField() {
+ return MatchField.ARP_THA;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<MacAddress> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public MacAddress getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmArpTha build() {
+ MacAddress value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmArpThaVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmArpTha> {
+ @Override
+ public OFOxmArpTha readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80003206L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80003206)
+ throw new OFParseError("Wrong typeLen: Expected=0x80003206L(0x80003206L), got="+typeLen);
+ MacAddress value = MacAddress.read6Bytes(bb);
+
+ OFOxmArpThaVer13 oxmArpThaVer13 = new OFOxmArpThaVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmArpThaVer13);
+ return oxmArpThaVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmArpThaVer13Funnel FUNNEL = new OFOxmArpThaVer13Funnel();
+ static class OFOxmArpThaVer13Funnel implements Funnel<OFOxmArpThaVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmArpThaVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80003206L
+ sink.putInt((int) 0x80003206);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmArpThaVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmArpThaVer13 message) {
+ // fixed value property typeLen = 0x80003206L
+ bb.writeInt((int) 0x80003206);
+ message.value.write6Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmArpThaVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmArpThaVer13 other = (OFOxmArpThaVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmArpTpaMaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmArpTpaMaskedVer13.java
new file mode 100644
index 0000000..4abe2fe
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmArpTpaMaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmArpTpaMaskedVer13 implements OFOxmArpTpaMasked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmArpTpaMaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 12;
+
+ private final static IPv4Address DEFAULT_VALUE = IPv4Address.NONE;
+ private final static IPv4Address DEFAULT_VALUE_MASK = IPv4Address.NONE;
+
+ // OF message fields
+ private final IPv4Address value;
+ private final IPv4Address mask;
+//
+ // Immutable default instance
+ final static OFOxmArpTpaMaskedVer13 DEFAULT = new OFOxmArpTpaMaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmArpTpaMaskedVer13(IPv4Address value, IPv4Address mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80002f08L;
+ }
+
+ @Override
+ public IPv4Address getValue() {
+ return value;
+ }
+
+ @Override
+ public IPv4Address getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<IPv4Address> getMatchField() {
+ return MatchField.ARP_TPA;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<IPv4Address> getCanonical() {
+ if (IPv4Address.NO_MASK.equals(mask)) {
+ return new OFOxmArpTpaVer13(value);
+ } else if(IPv4Address.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmArpTpaMasked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmArpTpaMasked.Builder {
+ final OFOxmArpTpaMaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private IPv4Address value;
+ private boolean maskSet;
+ private IPv4Address mask;
+
+ BuilderWithParent(OFOxmArpTpaMaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80002f08L;
+ }
+
+ @Override
+ public IPv4Address getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmArpTpaMasked.Builder setValue(IPv4Address value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public IPv4Address getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmArpTpaMasked.Builder setMask(IPv4Address mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<IPv4Address> getMatchField() {
+ return MatchField.ARP_TPA;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<IPv4Address> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmArpTpaMasked build() {
+ IPv4Address value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ IPv4Address mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmArpTpaMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmArpTpaMasked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private IPv4Address value;
+ private boolean maskSet;
+ private IPv4Address mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80002f08L;
+ }
+
+ @Override
+ public IPv4Address getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmArpTpaMasked.Builder setValue(IPv4Address value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public IPv4Address getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmArpTpaMasked.Builder setMask(IPv4Address mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<IPv4Address> getMatchField() {
+ return MatchField.ARP_TPA;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<IPv4Address> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmArpTpaMasked build() {
+ IPv4Address value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ IPv4Address mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmArpTpaMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmArpTpaMasked> {
+ @Override
+ public OFOxmArpTpaMasked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80002f08L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80002f08)
+ throw new OFParseError("Wrong typeLen: Expected=0x80002f08L(0x80002f08L), got="+typeLen);
+ IPv4Address value = IPv4Address.read4Bytes(bb);
+ IPv4Address mask = IPv4Address.read4Bytes(bb);
+
+ OFOxmArpTpaMaskedVer13 oxmArpTpaMaskedVer13 = new OFOxmArpTpaMaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmArpTpaMaskedVer13);
+ return oxmArpTpaMaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmArpTpaMaskedVer13Funnel FUNNEL = new OFOxmArpTpaMaskedVer13Funnel();
+ static class OFOxmArpTpaMaskedVer13Funnel implements Funnel<OFOxmArpTpaMaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmArpTpaMaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80002f08L
+ sink.putInt((int) 0x80002f08);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmArpTpaMaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmArpTpaMaskedVer13 message) {
+ // fixed value property typeLen = 0x80002f08L
+ bb.writeInt((int) 0x80002f08);
+ message.value.write4Bytes(bb);
+ message.mask.write4Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmArpTpaMaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmArpTpaMaskedVer13 other = (OFOxmArpTpaMaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmArpTpaVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmArpTpaVer13.java
new file mode 100644
index 0000000..db2492e
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmArpTpaVer13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmArpTpaVer13 implements OFOxmArpTpa {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmArpTpaVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static IPv4Address DEFAULT_VALUE = IPv4Address.NONE;
+
+ // OF message fields
+ private final IPv4Address value;
+//
+ // Immutable default instance
+ final static OFOxmArpTpaVer13 DEFAULT = new OFOxmArpTpaVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmArpTpaVer13(IPv4Address value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80002e04L;
+ }
+
+ @Override
+ public IPv4Address getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<IPv4Address> getMatchField() {
+ return MatchField.ARP_TPA;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<IPv4Address> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public IPv4Address getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmArpTpa.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmArpTpa.Builder {
+ final OFOxmArpTpaVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private IPv4Address value;
+
+ BuilderWithParent(OFOxmArpTpaVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80002e04L;
+ }
+
+ @Override
+ public IPv4Address getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmArpTpa.Builder setValue(IPv4Address value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<IPv4Address> getMatchField() {
+ return MatchField.ARP_TPA;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<IPv4Address> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public IPv4Address getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmArpTpa build() {
+ IPv4Address value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmArpTpaVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmArpTpa.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private IPv4Address value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80002e04L;
+ }
+
+ @Override
+ public IPv4Address getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmArpTpa.Builder setValue(IPv4Address value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<IPv4Address> getMatchField() {
+ return MatchField.ARP_TPA;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<IPv4Address> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public IPv4Address getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmArpTpa build() {
+ IPv4Address value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmArpTpaVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmArpTpa> {
+ @Override
+ public OFOxmArpTpa readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80002e04L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80002e04)
+ throw new OFParseError("Wrong typeLen: Expected=0x80002e04L(0x80002e04L), got="+typeLen);
+ IPv4Address value = IPv4Address.read4Bytes(bb);
+
+ OFOxmArpTpaVer13 oxmArpTpaVer13 = new OFOxmArpTpaVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmArpTpaVer13);
+ return oxmArpTpaVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmArpTpaVer13Funnel FUNNEL = new OFOxmArpTpaVer13Funnel();
+ static class OFOxmArpTpaVer13Funnel implements Funnel<OFOxmArpTpaVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmArpTpaVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80002e04L
+ sink.putInt((int) 0x80002e04);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmArpTpaVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmArpTpaVer13 message) {
+ // fixed value property typeLen = 0x80002e04L
+ bb.writeInt((int) 0x80002e04);
+ message.value.write4Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmArpTpaVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmArpTpaVer13 other = (OFOxmArpTpaVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnEgrPortGroupIdMaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnEgrPortGroupIdMaskedVer13.java
new file mode 100644
index 0000000..b0d05f5
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnEgrPortGroupIdMaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmBsnEgrPortGroupIdMaskedVer13 implements OFOxmBsnEgrPortGroupIdMasked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmBsnEgrPortGroupIdMaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 12;
+
+ private final static ClassId DEFAULT_VALUE = ClassId.NONE;
+ private final static ClassId DEFAULT_VALUE_MASK = ClassId.NONE;
+
+ // OF message fields
+ private final ClassId value;
+ private final ClassId mask;
+//
+ // Immutable default instance
+ final static OFOxmBsnEgrPortGroupIdMaskedVer13 DEFAULT = new OFOxmBsnEgrPortGroupIdMaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmBsnEgrPortGroupIdMaskedVer13(ClassId value, ClassId mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x30f08L;
+ }
+
+ @Override
+ public ClassId getValue() {
+ return value;
+ }
+
+ @Override
+ public ClassId getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<ClassId> getMatchField() {
+ return MatchField.BSN_EGR_PORT_GROUP_ID;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<ClassId> getCanonical() {
+ if (ClassId.NO_MASK.equals(mask)) {
+ return new OFOxmBsnEgrPortGroupIdVer13(value);
+ } else if(ClassId.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmBsnEgrPortGroupIdMasked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmBsnEgrPortGroupIdMasked.Builder {
+ final OFOxmBsnEgrPortGroupIdMaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private ClassId value;
+ private boolean maskSet;
+ private ClassId mask;
+
+ BuilderWithParent(OFOxmBsnEgrPortGroupIdMaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x30f08L;
+ }
+
+ @Override
+ public ClassId getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnEgrPortGroupIdMasked.Builder setValue(ClassId value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public ClassId getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmBsnEgrPortGroupIdMasked.Builder setMask(ClassId mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<ClassId> getMatchField() {
+ return MatchField.BSN_EGR_PORT_GROUP_ID;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<ClassId> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmBsnEgrPortGroupIdMasked build() {
+ ClassId value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ ClassId mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmBsnEgrPortGroupIdMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmBsnEgrPortGroupIdMasked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private ClassId value;
+ private boolean maskSet;
+ private ClassId mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x30f08L;
+ }
+
+ @Override
+ public ClassId getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnEgrPortGroupIdMasked.Builder setValue(ClassId value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public ClassId getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmBsnEgrPortGroupIdMasked.Builder setMask(ClassId mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<ClassId> getMatchField() {
+ return MatchField.BSN_EGR_PORT_GROUP_ID;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<ClassId> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmBsnEgrPortGroupIdMasked build() {
+ ClassId value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ ClassId mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmBsnEgrPortGroupIdMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmBsnEgrPortGroupIdMasked> {
+ @Override
+ public OFOxmBsnEgrPortGroupIdMasked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x30f08L
+ int typeLen = bb.readInt();
+ if(typeLen != 0x30f08)
+ throw new OFParseError("Wrong typeLen: Expected=0x30f08L(0x30f08L), got="+typeLen);
+ ClassId value = ClassId.read4Bytes(bb);
+ ClassId mask = ClassId.read4Bytes(bb);
+
+ OFOxmBsnEgrPortGroupIdMaskedVer13 oxmBsnEgrPortGroupIdMaskedVer13 = new OFOxmBsnEgrPortGroupIdMaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmBsnEgrPortGroupIdMaskedVer13);
+ return oxmBsnEgrPortGroupIdMaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmBsnEgrPortGroupIdMaskedVer13Funnel FUNNEL = new OFOxmBsnEgrPortGroupIdMaskedVer13Funnel();
+ static class OFOxmBsnEgrPortGroupIdMaskedVer13Funnel implements Funnel<OFOxmBsnEgrPortGroupIdMaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmBsnEgrPortGroupIdMaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x30f08L
+ sink.putInt(0x30f08);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmBsnEgrPortGroupIdMaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmBsnEgrPortGroupIdMaskedVer13 message) {
+ // fixed value property typeLen = 0x30f08L
+ bb.writeInt(0x30f08);
+ message.value.write4Bytes(bb);
+ message.mask.write4Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmBsnEgrPortGroupIdMaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmBsnEgrPortGroupIdMaskedVer13 other = (OFOxmBsnEgrPortGroupIdMaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnEgrPortGroupIdVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnEgrPortGroupIdVer13.java
new file mode 100644
index 0000000..249f1ee
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnEgrPortGroupIdVer13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmBsnEgrPortGroupIdVer13 implements OFOxmBsnEgrPortGroupId {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmBsnEgrPortGroupIdVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static ClassId DEFAULT_VALUE = ClassId.NONE;
+
+ // OF message fields
+ private final ClassId value;
+//
+ // Immutable default instance
+ final static OFOxmBsnEgrPortGroupIdVer13 DEFAULT = new OFOxmBsnEgrPortGroupIdVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmBsnEgrPortGroupIdVer13(ClassId value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x30e04L;
+ }
+
+ @Override
+ public ClassId getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<ClassId> getMatchField() {
+ return MatchField.BSN_EGR_PORT_GROUP_ID;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<ClassId> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public ClassId getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmBsnEgrPortGroupId.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmBsnEgrPortGroupId.Builder {
+ final OFOxmBsnEgrPortGroupIdVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private ClassId value;
+
+ BuilderWithParent(OFOxmBsnEgrPortGroupIdVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x30e04L;
+ }
+
+ @Override
+ public ClassId getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnEgrPortGroupId.Builder setValue(ClassId value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<ClassId> getMatchField() {
+ return MatchField.BSN_EGR_PORT_GROUP_ID;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<ClassId> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public ClassId getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmBsnEgrPortGroupId build() {
+ ClassId value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmBsnEgrPortGroupIdVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmBsnEgrPortGroupId.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private ClassId value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x30e04L;
+ }
+
+ @Override
+ public ClassId getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnEgrPortGroupId.Builder setValue(ClassId value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<ClassId> getMatchField() {
+ return MatchField.BSN_EGR_PORT_GROUP_ID;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<ClassId> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public ClassId getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmBsnEgrPortGroupId build() {
+ ClassId value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmBsnEgrPortGroupIdVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmBsnEgrPortGroupId> {
+ @Override
+ public OFOxmBsnEgrPortGroupId readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x30e04L
+ int typeLen = bb.readInt();
+ if(typeLen != 0x30e04)
+ throw new OFParseError("Wrong typeLen: Expected=0x30e04L(0x30e04L), got="+typeLen);
+ ClassId value = ClassId.read4Bytes(bb);
+
+ OFOxmBsnEgrPortGroupIdVer13 oxmBsnEgrPortGroupIdVer13 = new OFOxmBsnEgrPortGroupIdVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmBsnEgrPortGroupIdVer13);
+ return oxmBsnEgrPortGroupIdVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmBsnEgrPortGroupIdVer13Funnel FUNNEL = new OFOxmBsnEgrPortGroupIdVer13Funnel();
+ static class OFOxmBsnEgrPortGroupIdVer13Funnel implements Funnel<OFOxmBsnEgrPortGroupIdVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmBsnEgrPortGroupIdVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x30e04L
+ sink.putInt(0x30e04);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmBsnEgrPortGroupIdVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmBsnEgrPortGroupIdVer13 message) {
+ // fixed value property typeLen = 0x30e04L
+ bb.writeInt(0x30e04);
+ message.value.write4Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmBsnEgrPortGroupIdVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmBsnEgrPortGroupIdVer13 other = (OFOxmBsnEgrPortGroupIdVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnGlobalVrfAllowedMaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnGlobalVrfAllowedMaskedVer13.java
new file mode 100644
index 0000000..296e1d7
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnGlobalVrfAllowedMaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmBsnGlobalVrfAllowedMaskedVer13 implements OFOxmBsnGlobalVrfAllowedMasked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmBsnGlobalVrfAllowedMaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 6;
+
+ private final static OFBooleanValue DEFAULT_VALUE = OFBooleanValue.FALSE;
+ private final static OFBooleanValue DEFAULT_VALUE_MASK = OFBooleanValue.FALSE;
+
+ // OF message fields
+ private final OFBooleanValue value;
+ private final OFBooleanValue mask;
+//
+ // Immutable default instance
+ final static OFOxmBsnGlobalVrfAllowedMaskedVer13 DEFAULT = new OFOxmBsnGlobalVrfAllowedMaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmBsnGlobalVrfAllowedMaskedVer13(OFBooleanValue value, OFBooleanValue mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x30702L;
+ }
+
+ @Override
+ public OFBooleanValue getValue() {
+ return value;
+ }
+
+ @Override
+ public OFBooleanValue getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<OFBooleanValue> getMatchField() {
+ return MatchField.BSN_GLOBAL_VRF_ALLOWED;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<OFBooleanValue> getCanonical() {
+ if (OFBooleanValue.NO_MASK.equals(mask)) {
+ return new OFOxmBsnGlobalVrfAllowedVer13(value);
+ } else if(OFBooleanValue.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmBsnGlobalVrfAllowedMasked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmBsnGlobalVrfAllowedMasked.Builder {
+ final OFOxmBsnGlobalVrfAllowedMaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private OFBooleanValue value;
+ private boolean maskSet;
+ private OFBooleanValue mask;
+
+ BuilderWithParent(OFOxmBsnGlobalVrfAllowedMaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x30702L;
+ }
+
+ @Override
+ public OFBooleanValue getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnGlobalVrfAllowedMasked.Builder setValue(OFBooleanValue value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFBooleanValue getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmBsnGlobalVrfAllowedMasked.Builder setMask(OFBooleanValue mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<OFBooleanValue> getMatchField() {
+ return MatchField.BSN_GLOBAL_VRF_ALLOWED;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<OFBooleanValue> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmBsnGlobalVrfAllowedMasked build() {
+ OFBooleanValue value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ OFBooleanValue mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmBsnGlobalVrfAllowedMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmBsnGlobalVrfAllowedMasked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private OFBooleanValue value;
+ private boolean maskSet;
+ private OFBooleanValue mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x30702L;
+ }
+
+ @Override
+ public OFBooleanValue getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnGlobalVrfAllowedMasked.Builder setValue(OFBooleanValue value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFBooleanValue getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmBsnGlobalVrfAllowedMasked.Builder setMask(OFBooleanValue mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<OFBooleanValue> getMatchField() {
+ return MatchField.BSN_GLOBAL_VRF_ALLOWED;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<OFBooleanValue> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmBsnGlobalVrfAllowedMasked build() {
+ OFBooleanValue value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ OFBooleanValue mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmBsnGlobalVrfAllowedMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmBsnGlobalVrfAllowedMasked> {
+ @Override
+ public OFOxmBsnGlobalVrfAllowedMasked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x30702L
+ int typeLen = bb.readInt();
+ if(typeLen != 0x30702)
+ throw new OFParseError("Wrong typeLen: Expected=0x30702L(0x30702L), got="+typeLen);
+ OFBooleanValue value = OFBooleanValue.of(bb.readByte() != 0);
+ OFBooleanValue mask = OFBooleanValue.of(bb.readByte() != 0);
+
+ OFOxmBsnGlobalVrfAllowedMaskedVer13 oxmBsnGlobalVrfAllowedMaskedVer13 = new OFOxmBsnGlobalVrfAllowedMaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmBsnGlobalVrfAllowedMaskedVer13);
+ return oxmBsnGlobalVrfAllowedMaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmBsnGlobalVrfAllowedMaskedVer13Funnel FUNNEL = new OFOxmBsnGlobalVrfAllowedMaskedVer13Funnel();
+ static class OFOxmBsnGlobalVrfAllowedMaskedVer13Funnel implements Funnel<OFOxmBsnGlobalVrfAllowedMaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmBsnGlobalVrfAllowedMaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x30702L
+ sink.putInt(0x30702);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmBsnGlobalVrfAllowedMaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmBsnGlobalVrfAllowedMaskedVer13 message) {
+ // fixed value property typeLen = 0x30702L
+ bb.writeInt(0x30702);
+ bb.writeByte(message.value.getInt());
+ bb.writeByte(message.mask.getInt());
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmBsnGlobalVrfAllowedMaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmBsnGlobalVrfAllowedMaskedVer13 other = (OFOxmBsnGlobalVrfAllowedMaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnGlobalVrfAllowedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnGlobalVrfAllowedVer13.java
new file mode 100644
index 0000000..c1add8a
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnGlobalVrfAllowedVer13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmBsnGlobalVrfAllowedVer13 implements OFOxmBsnGlobalVrfAllowed {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmBsnGlobalVrfAllowedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 5;
+
+ private final static OFBooleanValue DEFAULT_VALUE = OFBooleanValue.FALSE;
+
+ // OF message fields
+ private final OFBooleanValue value;
+//
+ // Immutable default instance
+ final static OFOxmBsnGlobalVrfAllowedVer13 DEFAULT = new OFOxmBsnGlobalVrfAllowedVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmBsnGlobalVrfAllowedVer13(OFBooleanValue value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x30601L;
+ }
+
+ @Override
+ public OFBooleanValue getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<OFBooleanValue> getMatchField() {
+ return MatchField.BSN_GLOBAL_VRF_ALLOWED;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<OFBooleanValue> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public OFBooleanValue getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmBsnGlobalVrfAllowed.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmBsnGlobalVrfAllowed.Builder {
+ final OFOxmBsnGlobalVrfAllowedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private OFBooleanValue value;
+
+ BuilderWithParent(OFOxmBsnGlobalVrfAllowedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x30601L;
+ }
+
+ @Override
+ public OFBooleanValue getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnGlobalVrfAllowed.Builder setValue(OFBooleanValue value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<OFBooleanValue> getMatchField() {
+ return MatchField.BSN_GLOBAL_VRF_ALLOWED;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<OFBooleanValue> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFBooleanValue getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmBsnGlobalVrfAllowed build() {
+ OFBooleanValue value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmBsnGlobalVrfAllowedVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmBsnGlobalVrfAllowed.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private OFBooleanValue value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x30601L;
+ }
+
+ @Override
+ public OFBooleanValue getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnGlobalVrfAllowed.Builder setValue(OFBooleanValue value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<OFBooleanValue> getMatchField() {
+ return MatchField.BSN_GLOBAL_VRF_ALLOWED;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<OFBooleanValue> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFBooleanValue getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmBsnGlobalVrfAllowed build() {
+ OFBooleanValue value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmBsnGlobalVrfAllowedVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmBsnGlobalVrfAllowed> {
+ @Override
+ public OFOxmBsnGlobalVrfAllowed readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x30601L
+ int typeLen = bb.readInt();
+ if(typeLen != 0x30601)
+ throw new OFParseError("Wrong typeLen: Expected=0x30601L(0x30601L), got="+typeLen);
+ OFBooleanValue value = OFBooleanValue.of(bb.readByte() != 0);
+
+ OFOxmBsnGlobalVrfAllowedVer13 oxmBsnGlobalVrfAllowedVer13 = new OFOxmBsnGlobalVrfAllowedVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmBsnGlobalVrfAllowedVer13);
+ return oxmBsnGlobalVrfAllowedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmBsnGlobalVrfAllowedVer13Funnel FUNNEL = new OFOxmBsnGlobalVrfAllowedVer13Funnel();
+ static class OFOxmBsnGlobalVrfAllowedVer13Funnel implements Funnel<OFOxmBsnGlobalVrfAllowedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmBsnGlobalVrfAllowedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x30601L
+ sink.putInt(0x30601);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmBsnGlobalVrfAllowedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmBsnGlobalVrfAllowedVer13 message) {
+ // fixed value property typeLen = 0x30601L
+ bb.writeInt(0x30601);
+ bb.writeByte(message.value.getInt());
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmBsnGlobalVrfAllowedVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmBsnGlobalVrfAllowedVer13 other = (OFOxmBsnGlobalVrfAllowedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnInPorts128MaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnInPorts128MaskedVer13.java
new file mode 100644
index 0000000..6a90ff6
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnInPorts128MaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmBsnInPorts128MaskedVer13 implements OFOxmBsnInPorts128Masked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmBsnInPorts128MaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 36;
+
+ private final static OFBitMask128 DEFAULT_VALUE = OFBitMask128.NONE;
+ private final static OFBitMask128 DEFAULT_VALUE_MASK = OFBitMask128.NONE;
+
+ // OF message fields
+ private final OFBitMask128 value;
+ private final OFBitMask128 mask;
+//
+ // Immutable default instance
+ final static OFOxmBsnInPorts128MaskedVer13 DEFAULT = new OFOxmBsnInPorts128MaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmBsnInPorts128MaskedVer13(OFBitMask128 value, OFBitMask128 mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x30120L;
+ }
+
+ @Override
+ public OFBitMask128 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFBitMask128 getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<OFBitMask128> getMatchField() {
+ return MatchField.BSN_IN_PORTS_128;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<OFBitMask128> getCanonical() {
+ if (OFBitMask128.NO_MASK.equals(mask)) {
+ return new OFOxmBsnInPorts128Ver13(value);
+ } else if(OFBitMask128.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmBsnInPorts128Masked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmBsnInPorts128Masked.Builder {
+ final OFOxmBsnInPorts128MaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private OFBitMask128 value;
+ private boolean maskSet;
+ private OFBitMask128 mask;
+
+ BuilderWithParent(OFOxmBsnInPorts128MaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x30120L;
+ }
+
+ @Override
+ public OFBitMask128 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnInPorts128Masked.Builder setValue(OFBitMask128 value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFBitMask128 getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmBsnInPorts128Masked.Builder setMask(OFBitMask128 mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<OFBitMask128> getMatchField() {
+ return MatchField.BSN_IN_PORTS_128;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<OFBitMask128> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmBsnInPorts128Masked build() {
+ OFBitMask128 value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ OFBitMask128 mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmBsnInPorts128MaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmBsnInPorts128Masked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private OFBitMask128 value;
+ private boolean maskSet;
+ private OFBitMask128 mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x30120L;
+ }
+
+ @Override
+ public OFBitMask128 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnInPorts128Masked.Builder setValue(OFBitMask128 value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFBitMask128 getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmBsnInPorts128Masked.Builder setMask(OFBitMask128 mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<OFBitMask128> getMatchField() {
+ return MatchField.BSN_IN_PORTS_128;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<OFBitMask128> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmBsnInPorts128Masked build() {
+ OFBitMask128 value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ OFBitMask128 mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmBsnInPorts128MaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmBsnInPorts128Masked> {
+ @Override
+ public OFOxmBsnInPorts128Masked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x30120L
+ int typeLen = bb.readInt();
+ if(typeLen != 0x30120)
+ throw new OFParseError("Wrong typeLen: Expected=0x30120L(0x30120L), got="+typeLen);
+ OFBitMask128 value = OFBitMask128.read16Bytes(bb);
+ OFBitMask128 mask = OFBitMask128.read16Bytes(bb);
+
+ OFOxmBsnInPorts128MaskedVer13 oxmBsnInPorts128MaskedVer13 = new OFOxmBsnInPorts128MaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmBsnInPorts128MaskedVer13);
+ return oxmBsnInPorts128MaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmBsnInPorts128MaskedVer13Funnel FUNNEL = new OFOxmBsnInPorts128MaskedVer13Funnel();
+ static class OFOxmBsnInPorts128MaskedVer13Funnel implements Funnel<OFOxmBsnInPorts128MaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmBsnInPorts128MaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x30120L
+ sink.putInt(0x30120);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmBsnInPorts128MaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmBsnInPorts128MaskedVer13 message) {
+ // fixed value property typeLen = 0x30120L
+ bb.writeInt(0x30120);
+ message.value.write16Bytes(bb);
+ message.mask.write16Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmBsnInPorts128MaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmBsnInPorts128MaskedVer13 other = (OFOxmBsnInPorts128MaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnInPorts128Ver13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnInPorts128Ver13.java
new file mode 100644
index 0000000..13fc1fb
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnInPorts128Ver13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmBsnInPorts128Ver13 implements OFOxmBsnInPorts128 {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmBsnInPorts128Ver13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 20;
+
+ private final static OFBitMask128 DEFAULT_VALUE = OFBitMask128.NONE;
+
+ // OF message fields
+ private final OFBitMask128 value;
+//
+ // Immutable default instance
+ final static OFOxmBsnInPorts128Ver13 DEFAULT = new OFOxmBsnInPorts128Ver13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmBsnInPorts128Ver13(OFBitMask128 value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x30010L;
+ }
+
+ @Override
+ public OFBitMask128 getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<OFBitMask128> getMatchField() {
+ return MatchField.BSN_IN_PORTS_128;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<OFBitMask128> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public OFBitMask128 getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmBsnInPorts128.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmBsnInPorts128.Builder {
+ final OFOxmBsnInPorts128Ver13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private OFBitMask128 value;
+
+ BuilderWithParent(OFOxmBsnInPorts128Ver13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x30010L;
+ }
+
+ @Override
+ public OFBitMask128 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnInPorts128.Builder setValue(OFBitMask128 value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<OFBitMask128> getMatchField() {
+ return MatchField.BSN_IN_PORTS_128;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<OFBitMask128> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFBitMask128 getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmBsnInPorts128 build() {
+ OFBitMask128 value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmBsnInPorts128Ver13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmBsnInPorts128.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private OFBitMask128 value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x30010L;
+ }
+
+ @Override
+ public OFBitMask128 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnInPorts128.Builder setValue(OFBitMask128 value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<OFBitMask128> getMatchField() {
+ return MatchField.BSN_IN_PORTS_128;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<OFBitMask128> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFBitMask128 getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmBsnInPorts128 build() {
+ OFBitMask128 value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmBsnInPorts128Ver13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmBsnInPorts128> {
+ @Override
+ public OFOxmBsnInPorts128 readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x30010L
+ int typeLen = bb.readInt();
+ if(typeLen != 0x30010)
+ throw new OFParseError("Wrong typeLen: Expected=0x30010L(0x30010L), got="+typeLen);
+ OFBitMask128 value = OFBitMask128.read16Bytes(bb);
+
+ OFOxmBsnInPorts128Ver13 oxmBsnInPorts128Ver13 = new OFOxmBsnInPorts128Ver13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmBsnInPorts128Ver13);
+ return oxmBsnInPorts128Ver13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmBsnInPorts128Ver13Funnel FUNNEL = new OFOxmBsnInPorts128Ver13Funnel();
+ static class OFOxmBsnInPorts128Ver13Funnel implements Funnel<OFOxmBsnInPorts128Ver13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmBsnInPorts128Ver13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x30010L
+ sink.putInt(0x30010);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmBsnInPorts128Ver13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmBsnInPorts128Ver13 message) {
+ // fixed value property typeLen = 0x30010L
+ bb.writeInt(0x30010);
+ message.value.write16Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmBsnInPorts128Ver13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmBsnInPorts128Ver13 other = (OFOxmBsnInPorts128Ver13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnL3DstClassIdMaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnL3DstClassIdMaskedVer13.java
new file mode 100644
index 0000000..61b009d
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnL3DstClassIdMaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmBsnL3DstClassIdMaskedVer13 implements OFOxmBsnL3DstClassIdMasked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmBsnL3DstClassIdMaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 12;
+
+ private final static ClassId DEFAULT_VALUE = ClassId.NONE;
+ private final static ClassId DEFAULT_VALUE_MASK = ClassId.NONE;
+
+ // OF message fields
+ private final ClassId value;
+ private final ClassId mask;
+//
+ // Immutable default instance
+ final static OFOxmBsnL3DstClassIdMaskedVer13 DEFAULT = new OFOxmBsnL3DstClassIdMaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmBsnL3DstClassIdMaskedVer13(ClassId value, ClassId mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x30d08L;
+ }
+
+ @Override
+ public ClassId getValue() {
+ return value;
+ }
+
+ @Override
+ public ClassId getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<ClassId> getMatchField() {
+ return MatchField.BSN_L3_DST_CLASS_ID;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<ClassId> getCanonical() {
+ if (ClassId.NO_MASK.equals(mask)) {
+ return new OFOxmBsnL3DstClassIdVer13(value);
+ } else if(ClassId.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmBsnL3DstClassIdMasked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmBsnL3DstClassIdMasked.Builder {
+ final OFOxmBsnL3DstClassIdMaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private ClassId value;
+ private boolean maskSet;
+ private ClassId mask;
+
+ BuilderWithParent(OFOxmBsnL3DstClassIdMaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x30d08L;
+ }
+
+ @Override
+ public ClassId getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnL3DstClassIdMasked.Builder setValue(ClassId value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public ClassId getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmBsnL3DstClassIdMasked.Builder setMask(ClassId mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<ClassId> getMatchField() {
+ return MatchField.BSN_L3_DST_CLASS_ID;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<ClassId> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmBsnL3DstClassIdMasked build() {
+ ClassId value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ ClassId mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmBsnL3DstClassIdMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmBsnL3DstClassIdMasked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private ClassId value;
+ private boolean maskSet;
+ private ClassId mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x30d08L;
+ }
+
+ @Override
+ public ClassId getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnL3DstClassIdMasked.Builder setValue(ClassId value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public ClassId getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmBsnL3DstClassIdMasked.Builder setMask(ClassId mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<ClassId> getMatchField() {
+ return MatchField.BSN_L3_DST_CLASS_ID;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<ClassId> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmBsnL3DstClassIdMasked build() {
+ ClassId value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ ClassId mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmBsnL3DstClassIdMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmBsnL3DstClassIdMasked> {
+ @Override
+ public OFOxmBsnL3DstClassIdMasked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x30d08L
+ int typeLen = bb.readInt();
+ if(typeLen != 0x30d08)
+ throw new OFParseError("Wrong typeLen: Expected=0x30d08L(0x30d08L), got="+typeLen);
+ ClassId value = ClassId.read4Bytes(bb);
+ ClassId mask = ClassId.read4Bytes(bb);
+
+ OFOxmBsnL3DstClassIdMaskedVer13 oxmBsnL3DstClassIdMaskedVer13 = new OFOxmBsnL3DstClassIdMaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmBsnL3DstClassIdMaskedVer13);
+ return oxmBsnL3DstClassIdMaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmBsnL3DstClassIdMaskedVer13Funnel FUNNEL = new OFOxmBsnL3DstClassIdMaskedVer13Funnel();
+ static class OFOxmBsnL3DstClassIdMaskedVer13Funnel implements Funnel<OFOxmBsnL3DstClassIdMaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmBsnL3DstClassIdMaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x30d08L
+ sink.putInt(0x30d08);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmBsnL3DstClassIdMaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmBsnL3DstClassIdMaskedVer13 message) {
+ // fixed value property typeLen = 0x30d08L
+ bb.writeInt(0x30d08);
+ message.value.write4Bytes(bb);
+ message.mask.write4Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmBsnL3DstClassIdMaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmBsnL3DstClassIdMaskedVer13 other = (OFOxmBsnL3DstClassIdMaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnL3DstClassIdVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnL3DstClassIdVer13.java
new file mode 100644
index 0000000..4aa45ba
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnL3DstClassIdVer13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmBsnL3DstClassIdVer13 implements OFOxmBsnL3DstClassId {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmBsnL3DstClassIdVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static ClassId DEFAULT_VALUE = ClassId.NONE;
+
+ // OF message fields
+ private final ClassId value;
+//
+ // Immutable default instance
+ final static OFOxmBsnL3DstClassIdVer13 DEFAULT = new OFOxmBsnL3DstClassIdVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmBsnL3DstClassIdVer13(ClassId value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x30c04L;
+ }
+
+ @Override
+ public ClassId getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<ClassId> getMatchField() {
+ return MatchField.BSN_L3_DST_CLASS_ID;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<ClassId> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public ClassId getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmBsnL3DstClassId.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmBsnL3DstClassId.Builder {
+ final OFOxmBsnL3DstClassIdVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private ClassId value;
+
+ BuilderWithParent(OFOxmBsnL3DstClassIdVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x30c04L;
+ }
+
+ @Override
+ public ClassId getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnL3DstClassId.Builder setValue(ClassId value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<ClassId> getMatchField() {
+ return MatchField.BSN_L3_DST_CLASS_ID;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<ClassId> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public ClassId getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmBsnL3DstClassId build() {
+ ClassId value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmBsnL3DstClassIdVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmBsnL3DstClassId.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private ClassId value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x30c04L;
+ }
+
+ @Override
+ public ClassId getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnL3DstClassId.Builder setValue(ClassId value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<ClassId> getMatchField() {
+ return MatchField.BSN_L3_DST_CLASS_ID;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<ClassId> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public ClassId getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmBsnL3DstClassId build() {
+ ClassId value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmBsnL3DstClassIdVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmBsnL3DstClassId> {
+ @Override
+ public OFOxmBsnL3DstClassId readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x30c04L
+ int typeLen = bb.readInt();
+ if(typeLen != 0x30c04)
+ throw new OFParseError("Wrong typeLen: Expected=0x30c04L(0x30c04L), got="+typeLen);
+ ClassId value = ClassId.read4Bytes(bb);
+
+ OFOxmBsnL3DstClassIdVer13 oxmBsnL3DstClassIdVer13 = new OFOxmBsnL3DstClassIdVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmBsnL3DstClassIdVer13);
+ return oxmBsnL3DstClassIdVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmBsnL3DstClassIdVer13Funnel FUNNEL = new OFOxmBsnL3DstClassIdVer13Funnel();
+ static class OFOxmBsnL3DstClassIdVer13Funnel implements Funnel<OFOxmBsnL3DstClassIdVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmBsnL3DstClassIdVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x30c04L
+ sink.putInt(0x30c04);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmBsnL3DstClassIdVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmBsnL3DstClassIdVer13 message) {
+ // fixed value property typeLen = 0x30c04L
+ bb.writeInt(0x30c04);
+ message.value.write4Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmBsnL3DstClassIdVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmBsnL3DstClassIdVer13 other = (OFOxmBsnL3DstClassIdVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnL3InterfaceClassIdMaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnL3InterfaceClassIdMaskedVer13.java
new file mode 100644
index 0000000..b3523d9
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnL3InterfaceClassIdMaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmBsnL3InterfaceClassIdMaskedVer13 implements OFOxmBsnL3InterfaceClassIdMasked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmBsnL3InterfaceClassIdMaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 12;
+
+ private final static ClassId DEFAULT_VALUE = ClassId.NONE;
+ private final static ClassId DEFAULT_VALUE_MASK = ClassId.NONE;
+
+ // OF message fields
+ private final ClassId value;
+ private final ClassId mask;
+//
+ // Immutable default instance
+ final static OFOxmBsnL3InterfaceClassIdMaskedVer13 DEFAULT = new OFOxmBsnL3InterfaceClassIdMaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmBsnL3InterfaceClassIdMaskedVer13(ClassId value, ClassId mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x30908L;
+ }
+
+ @Override
+ public ClassId getValue() {
+ return value;
+ }
+
+ @Override
+ public ClassId getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<ClassId> getMatchField() {
+ return MatchField.BSN_L3_INTERFACE_CLASS_ID;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<ClassId> getCanonical() {
+ if (ClassId.NO_MASK.equals(mask)) {
+ return new OFOxmBsnL3InterfaceClassIdVer13(value);
+ } else if(ClassId.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmBsnL3InterfaceClassIdMasked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmBsnL3InterfaceClassIdMasked.Builder {
+ final OFOxmBsnL3InterfaceClassIdMaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private ClassId value;
+ private boolean maskSet;
+ private ClassId mask;
+
+ BuilderWithParent(OFOxmBsnL3InterfaceClassIdMaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x30908L;
+ }
+
+ @Override
+ public ClassId getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnL3InterfaceClassIdMasked.Builder setValue(ClassId value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public ClassId getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmBsnL3InterfaceClassIdMasked.Builder setMask(ClassId mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<ClassId> getMatchField() {
+ return MatchField.BSN_L3_INTERFACE_CLASS_ID;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<ClassId> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmBsnL3InterfaceClassIdMasked build() {
+ ClassId value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ ClassId mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmBsnL3InterfaceClassIdMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmBsnL3InterfaceClassIdMasked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private ClassId value;
+ private boolean maskSet;
+ private ClassId mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x30908L;
+ }
+
+ @Override
+ public ClassId getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnL3InterfaceClassIdMasked.Builder setValue(ClassId value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public ClassId getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmBsnL3InterfaceClassIdMasked.Builder setMask(ClassId mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<ClassId> getMatchField() {
+ return MatchField.BSN_L3_INTERFACE_CLASS_ID;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<ClassId> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmBsnL3InterfaceClassIdMasked build() {
+ ClassId value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ ClassId mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmBsnL3InterfaceClassIdMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmBsnL3InterfaceClassIdMasked> {
+ @Override
+ public OFOxmBsnL3InterfaceClassIdMasked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x30908L
+ int typeLen = bb.readInt();
+ if(typeLen != 0x30908)
+ throw new OFParseError("Wrong typeLen: Expected=0x30908L(0x30908L), got="+typeLen);
+ ClassId value = ClassId.read4Bytes(bb);
+ ClassId mask = ClassId.read4Bytes(bb);
+
+ OFOxmBsnL3InterfaceClassIdMaskedVer13 oxmBsnL3InterfaceClassIdMaskedVer13 = new OFOxmBsnL3InterfaceClassIdMaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmBsnL3InterfaceClassIdMaskedVer13);
+ return oxmBsnL3InterfaceClassIdMaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmBsnL3InterfaceClassIdMaskedVer13Funnel FUNNEL = new OFOxmBsnL3InterfaceClassIdMaskedVer13Funnel();
+ static class OFOxmBsnL3InterfaceClassIdMaskedVer13Funnel implements Funnel<OFOxmBsnL3InterfaceClassIdMaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmBsnL3InterfaceClassIdMaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x30908L
+ sink.putInt(0x30908);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmBsnL3InterfaceClassIdMaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmBsnL3InterfaceClassIdMaskedVer13 message) {
+ // fixed value property typeLen = 0x30908L
+ bb.writeInt(0x30908);
+ message.value.write4Bytes(bb);
+ message.mask.write4Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmBsnL3InterfaceClassIdMaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmBsnL3InterfaceClassIdMaskedVer13 other = (OFOxmBsnL3InterfaceClassIdMaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnL3InterfaceClassIdVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnL3InterfaceClassIdVer13.java
new file mode 100644
index 0000000..0a0c306
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnL3InterfaceClassIdVer13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmBsnL3InterfaceClassIdVer13 implements OFOxmBsnL3InterfaceClassId {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmBsnL3InterfaceClassIdVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static ClassId DEFAULT_VALUE = ClassId.NONE;
+
+ // OF message fields
+ private final ClassId value;
+//
+ // Immutable default instance
+ final static OFOxmBsnL3InterfaceClassIdVer13 DEFAULT = new OFOxmBsnL3InterfaceClassIdVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmBsnL3InterfaceClassIdVer13(ClassId value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x30804L;
+ }
+
+ @Override
+ public ClassId getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<ClassId> getMatchField() {
+ return MatchField.BSN_L3_INTERFACE_CLASS_ID;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<ClassId> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public ClassId getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmBsnL3InterfaceClassId.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmBsnL3InterfaceClassId.Builder {
+ final OFOxmBsnL3InterfaceClassIdVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private ClassId value;
+
+ BuilderWithParent(OFOxmBsnL3InterfaceClassIdVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x30804L;
+ }
+
+ @Override
+ public ClassId getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnL3InterfaceClassId.Builder setValue(ClassId value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<ClassId> getMatchField() {
+ return MatchField.BSN_L3_INTERFACE_CLASS_ID;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<ClassId> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public ClassId getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmBsnL3InterfaceClassId build() {
+ ClassId value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmBsnL3InterfaceClassIdVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmBsnL3InterfaceClassId.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private ClassId value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x30804L;
+ }
+
+ @Override
+ public ClassId getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnL3InterfaceClassId.Builder setValue(ClassId value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<ClassId> getMatchField() {
+ return MatchField.BSN_L3_INTERFACE_CLASS_ID;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<ClassId> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public ClassId getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmBsnL3InterfaceClassId build() {
+ ClassId value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmBsnL3InterfaceClassIdVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmBsnL3InterfaceClassId> {
+ @Override
+ public OFOxmBsnL3InterfaceClassId readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x30804L
+ int typeLen = bb.readInt();
+ if(typeLen != 0x30804)
+ throw new OFParseError("Wrong typeLen: Expected=0x30804L(0x30804L), got="+typeLen);
+ ClassId value = ClassId.read4Bytes(bb);
+
+ OFOxmBsnL3InterfaceClassIdVer13 oxmBsnL3InterfaceClassIdVer13 = new OFOxmBsnL3InterfaceClassIdVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmBsnL3InterfaceClassIdVer13);
+ return oxmBsnL3InterfaceClassIdVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmBsnL3InterfaceClassIdVer13Funnel FUNNEL = new OFOxmBsnL3InterfaceClassIdVer13Funnel();
+ static class OFOxmBsnL3InterfaceClassIdVer13Funnel implements Funnel<OFOxmBsnL3InterfaceClassIdVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmBsnL3InterfaceClassIdVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x30804L
+ sink.putInt(0x30804);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmBsnL3InterfaceClassIdVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmBsnL3InterfaceClassIdVer13 message) {
+ // fixed value property typeLen = 0x30804L
+ bb.writeInt(0x30804);
+ message.value.write4Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmBsnL3InterfaceClassIdVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmBsnL3InterfaceClassIdVer13 other = (OFOxmBsnL3InterfaceClassIdVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnL3SrcClassIdMaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnL3SrcClassIdMaskedVer13.java
new file mode 100644
index 0000000..87326ab
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnL3SrcClassIdMaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmBsnL3SrcClassIdMaskedVer13 implements OFOxmBsnL3SrcClassIdMasked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmBsnL3SrcClassIdMaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 12;
+
+ private final static ClassId DEFAULT_VALUE = ClassId.NONE;
+ private final static ClassId DEFAULT_VALUE_MASK = ClassId.NONE;
+
+ // OF message fields
+ private final ClassId value;
+ private final ClassId mask;
+//
+ // Immutable default instance
+ final static OFOxmBsnL3SrcClassIdMaskedVer13 DEFAULT = new OFOxmBsnL3SrcClassIdMaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmBsnL3SrcClassIdMaskedVer13(ClassId value, ClassId mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x30b08L;
+ }
+
+ @Override
+ public ClassId getValue() {
+ return value;
+ }
+
+ @Override
+ public ClassId getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<ClassId> getMatchField() {
+ return MatchField.BSN_L3_SRC_CLASS_ID;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<ClassId> getCanonical() {
+ if (ClassId.NO_MASK.equals(mask)) {
+ return new OFOxmBsnL3SrcClassIdVer13(value);
+ } else if(ClassId.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmBsnL3SrcClassIdMasked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmBsnL3SrcClassIdMasked.Builder {
+ final OFOxmBsnL3SrcClassIdMaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private ClassId value;
+ private boolean maskSet;
+ private ClassId mask;
+
+ BuilderWithParent(OFOxmBsnL3SrcClassIdMaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x30b08L;
+ }
+
+ @Override
+ public ClassId getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnL3SrcClassIdMasked.Builder setValue(ClassId value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public ClassId getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmBsnL3SrcClassIdMasked.Builder setMask(ClassId mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<ClassId> getMatchField() {
+ return MatchField.BSN_L3_SRC_CLASS_ID;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<ClassId> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmBsnL3SrcClassIdMasked build() {
+ ClassId value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ ClassId mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmBsnL3SrcClassIdMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmBsnL3SrcClassIdMasked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private ClassId value;
+ private boolean maskSet;
+ private ClassId mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x30b08L;
+ }
+
+ @Override
+ public ClassId getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnL3SrcClassIdMasked.Builder setValue(ClassId value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public ClassId getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmBsnL3SrcClassIdMasked.Builder setMask(ClassId mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<ClassId> getMatchField() {
+ return MatchField.BSN_L3_SRC_CLASS_ID;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<ClassId> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmBsnL3SrcClassIdMasked build() {
+ ClassId value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ ClassId mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmBsnL3SrcClassIdMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmBsnL3SrcClassIdMasked> {
+ @Override
+ public OFOxmBsnL3SrcClassIdMasked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x30b08L
+ int typeLen = bb.readInt();
+ if(typeLen != 0x30b08)
+ throw new OFParseError("Wrong typeLen: Expected=0x30b08L(0x30b08L), got="+typeLen);
+ ClassId value = ClassId.read4Bytes(bb);
+ ClassId mask = ClassId.read4Bytes(bb);
+
+ OFOxmBsnL3SrcClassIdMaskedVer13 oxmBsnL3SrcClassIdMaskedVer13 = new OFOxmBsnL3SrcClassIdMaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmBsnL3SrcClassIdMaskedVer13);
+ return oxmBsnL3SrcClassIdMaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmBsnL3SrcClassIdMaskedVer13Funnel FUNNEL = new OFOxmBsnL3SrcClassIdMaskedVer13Funnel();
+ static class OFOxmBsnL3SrcClassIdMaskedVer13Funnel implements Funnel<OFOxmBsnL3SrcClassIdMaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmBsnL3SrcClassIdMaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x30b08L
+ sink.putInt(0x30b08);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmBsnL3SrcClassIdMaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmBsnL3SrcClassIdMaskedVer13 message) {
+ // fixed value property typeLen = 0x30b08L
+ bb.writeInt(0x30b08);
+ message.value.write4Bytes(bb);
+ message.mask.write4Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmBsnL3SrcClassIdMaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmBsnL3SrcClassIdMaskedVer13 other = (OFOxmBsnL3SrcClassIdMaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnL3SrcClassIdVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnL3SrcClassIdVer13.java
new file mode 100644
index 0000000..e1eca44
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnL3SrcClassIdVer13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmBsnL3SrcClassIdVer13 implements OFOxmBsnL3SrcClassId {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmBsnL3SrcClassIdVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static ClassId DEFAULT_VALUE = ClassId.NONE;
+
+ // OF message fields
+ private final ClassId value;
+//
+ // Immutable default instance
+ final static OFOxmBsnL3SrcClassIdVer13 DEFAULT = new OFOxmBsnL3SrcClassIdVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmBsnL3SrcClassIdVer13(ClassId value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x30a04L;
+ }
+
+ @Override
+ public ClassId getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<ClassId> getMatchField() {
+ return MatchField.BSN_L3_SRC_CLASS_ID;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<ClassId> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public ClassId getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmBsnL3SrcClassId.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmBsnL3SrcClassId.Builder {
+ final OFOxmBsnL3SrcClassIdVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private ClassId value;
+
+ BuilderWithParent(OFOxmBsnL3SrcClassIdVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x30a04L;
+ }
+
+ @Override
+ public ClassId getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnL3SrcClassId.Builder setValue(ClassId value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<ClassId> getMatchField() {
+ return MatchField.BSN_L3_SRC_CLASS_ID;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<ClassId> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public ClassId getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmBsnL3SrcClassId build() {
+ ClassId value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmBsnL3SrcClassIdVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmBsnL3SrcClassId.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private ClassId value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x30a04L;
+ }
+
+ @Override
+ public ClassId getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnL3SrcClassId.Builder setValue(ClassId value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<ClassId> getMatchField() {
+ return MatchField.BSN_L3_SRC_CLASS_ID;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<ClassId> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public ClassId getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmBsnL3SrcClassId build() {
+ ClassId value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmBsnL3SrcClassIdVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmBsnL3SrcClassId> {
+ @Override
+ public OFOxmBsnL3SrcClassId readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x30a04L
+ int typeLen = bb.readInt();
+ if(typeLen != 0x30a04)
+ throw new OFParseError("Wrong typeLen: Expected=0x30a04L(0x30a04L), got="+typeLen);
+ ClassId value = ClassId.read4Bytes(bb);
+
+ OFOxmBsnL3SrcClassIdVer13 oxmBsnL3SrcClassIdVer13 = new OFOxmBsnL3SrcClassIdVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmBsnL3SrcClassIdVer13);
+ return oxmBsnL3SrcClassIdVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmBsnL3SrcClassIdVer13Funnel FUNNEL = new OFOxmBsnL3SrcClassIdVer13Funnel();
+ static class OFOxmBsnL3SrcClassIdVer13Funnel implements Funnel<OFOxmBsnL3SrcClassIdVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmBsnL3SrcClassIdVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x30a04L
+ sink.putInt(0x30a04);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmBsnL3SrcClassIdVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmBsnL3SrcClassIdVer13 message) {
+ // fixed value property typeLen = 0x30a04L
+ bb.writeInt(0x30a04);
+ message.value.write4Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmBsnL3SrcClassIdVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmBsnL3SrcClassIdVer13 other = (OFOxmBsnL3SrcClassIdVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnLagIdMaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnLagIdMaskedVer13.java
new file mode 100644
index 0000000..44837f1
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnLagIdMaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmBsnLagIdMaskedVer13 implements OFOxmBsnLagIdMasked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmBsnLagIdMaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 12;
+
+ private final static LagId DEFAULT_VALUE = LagId.NONE;
+ private final static LagId DEFAULT_VALUE_MASK = LagId.NONE;
+
+ // OF message fields
+ private final LagId value;
+ private final LagId mask;
+//
+ // Immutable default instance
+ final static OFOxmBsnLagIdMaskedVer13 DEFAULT = new OFOxmBsnLagIdMaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmBsnLagIdMaskedVer13(LagId value, LagId mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x30308L;
+ }
+
+ @Override
+ public LagId getValue() {
+ return value;
+ }
+
+ @Override
+ public LagId getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<LagId> getMatchField() {
+ return MatchField.BSN_LAG_ID;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<LagId> getCanonical() {
+ if (LagId.NO_MASK.equals(mask)) {
+ return new OFOxmBsnLagIdVer13(value);
+ } else if(LagId.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmBsnLagIdMasked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmBsnLagIdMasked.Builder {
+ final OFOxmBsnLagIdMaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private LagId value;
+ private boolean maskSet;
+ private LagId mask;
+
+ BuilderWithParent(OFOxmBsnLagIdMaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x30308L;
+ }
+
+ @Override
+ public LagId getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnLagIdMasked.Builder setValue(LagId value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public LagId getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmBsnLagIdMasked.Builder setMask(LagId mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<LagId> getMatchField() {
+ return MatchField.BSN_LAG_ID;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<LagId> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmBsnLagIdMasked build() {
+ LagId value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ LagId mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmBsnLagIdMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmBsnLagIdMasked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private LagId value;
+ private boolean maskSet;
+ private LagId mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x30308L;
+ }
+
+ @Override
+ public LagId getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnLagIdMasked.Builder setValue(LagId value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public LagId getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmBsnLagIdMasked.Builder setMask(LagId mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<LagId> getMatchField() {
+ return MatchField.BSN_LAG_ID;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<LagId> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmBsnLagIdMasked build() {
+ LagId value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ LagId mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmBsnLagIdMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmBsnLagIdMasked> {
+ @Override
+ public OFOxmBsnLagIdMasked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x30308L
+ int typeLen = bb.readInt();
+ if(typeLen != 0x30308)
+ throw new OFParseError("Wrong typeLen: Expected=0x30308L(0x30308L), got="+typeLen);
+ LagId value = LagId.read4Bytes(bb);
+ LagId mask = LagId.read4Bytes(bb);
+
+ OFOxmBsnLagIdMaskedVer13 oxmBsnLagIdMaskedVer13 = new OFOxmBsnLagIdMaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmBsnLagIdMaskedVer13);
+ return oxmBsnLagIdMaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmBsnLagIdMaskedVer13Funnel FUNNEL = new OFOxmBsnLagIdMaskedVer13Funnel();
+ static class OFOxmBsnLagIdMaskedVer13Funnel implements Funnel<OFOxmBsnLagIdMaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmBsnLagIdMaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x30308L
+ sink.putInt(0x30308);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmBsnLagIdMaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmBsnLagIdMaskedVer13 message) {
+ // fixed value property typeLen = 0x30308L
+ bb.writeInt(0x30308);
+ message.value.write4Bytes(bb);
+ message.mask.write4Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmBsnLagIdMaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmBsnLagIdMaskedVer13 other = (OFOxmBsnLagIdMaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnLagIdVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnLagIdVer13.java
new file mode 100644
index 0000000..66bd513
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnLagIdVer13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmBsnLagIdVer13 implements OFOxmBsnLagId {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmBsnLagIdVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static LagId DEFAULT_VALUE = LagId.NONE;
+
+ // OF message fields
+ private final LagId value;
+//
+ // Immutable default instance
+ final static OFOxmBsnLagIdVer13 DEFAULT = new OFOxmBsnLagIdVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmBsnLagIdVer13(LagId value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x30204L;
+ }
+
+ @Override
+ public LagId getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<LagId> getMatchField() {
+ return MatchField.BSN_LAG_ID;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<LagId> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public LagId getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmBsnLagId.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmBsnLagId.Builder {
+ final OFOxmBsnLagIdVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private LagId value;
+
+ BuilderWithParent(OFOxmBsnLagIdVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x30204L;
+ }
+
+ @Override
+ public LagId getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnLagId.Builder setValue(LagId value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<LagId> getMatchField() {
+ return MatchField.BSN_LAG_ID;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<LagId> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public LagId getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmBsnLagId build() {
+ LagId value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmBsnLagIdVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmBsnLagId.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private LagId value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x30204L;
+ }
+
+ @Override
+ public LagId getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnLagId.Builder setValue(LagId value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<LagId> getMatchField() {
+ return MatchField.BSN_LAG_ID;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<LagId> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public LagId getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmBsnLagId build() {
+ LagId value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmBsnLagIdVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmBsnLagId> {
+ @Override
+ public OFOxmBsnLagId readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x30204L
+ int typeLen = bb.readInt();
+ if(typeLen != 0x30204)
+ throw new OFParseError("Wrong typeLen: Expected=0x30204L(0x30204L), got="+typeLen);
+ LagId value = LagId.read4Bytes(bb);
+
+ OFOxmBsnLagIdVer13 oxmBsnLagIdVer13 = new OFOxmBsnLagIdVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmBsnLagIdVer13);
+ return oxmBsnLagIdVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmBsnLagIdVer13Funnel FUNNEL = new OFOxmBsnLagIdVer13Funnel();
+ static class OFOxmBsnLagIdVer13Funnel implements Funnel<OFOxmBsnLagIdVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmBsnLagIdVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x30204L
+ sink.putInt(0x30204);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmBsnLagIdVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmBsnLagIdVer13 message) {
+ // fixed value property typeLen = 0x30204L
+ bb.writeInt(0x30204);
+ message.value.write4Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmBsnLagIdVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmBsnLagIdVer13 other = (OFOxmBsnLagIdVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnTcpFlagsMaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnTcpFlagsMaskedVer13.java
new file mode 100644
index 0000000..dc18e36
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnTcpFlagsMaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmBsnTcpFlagsMaskedVer13 implements OFOxmBsnTcpFlagsMasked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmBsnTcpFlagsMaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static U16 DEFAULT_VALUE = U16.ZERO;
+ private final static U16 DEFAULT_VALUE_MASK = U16.ZERO;
+
+ // OF message fields
+ private final U16 value;
+ private final U16 mask;
+//
+ // Immutable default instance
+ final static OFOxmBsnTcpFlagsMaskedVer13 DEFAULT = new OFOxmBsnTcpFlagsMaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmBsnTcpFlagsMaskedVer13(U16 value, U16 mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x32104L;
+ }
+
+ @Override
+ public U16 getValue() {
+ return value;
+ }
+
+ @Override
+ public U16 getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<U16> getMatchField() {
+ return MatchField.BSN_TCP_FLAGS;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<U16> getCanonical() {
+ if (U16.NO_MASK.equals(mask)) {
+ return new OFOxmBsnTcpFlagsVer13(value);
+ } else if(U16.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmBsnTcpFlagsMasked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmBsnTcpFlagsMasked.Builder {
+ final OFOxmBsnTcpFlagsMaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private U16 value;
+ private boolean maskSet;
+ private U16 mask;
+
+ BuilderWithParent(OFOxmBsnTcpFlagsMaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x32104L;
+ }
+
+ @Override
+ public U16 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnTcpFlagsMasked.Builder setValue(U16 value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public U16 getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmBsnTcpFlagsMasked.Builder setMask(U16 mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<U16> getMatchField() {
+ return MatchField.BSN_TCP_FLAGS;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<U16> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmBsnTcpFlagsMasked build() {
+ U16 value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ U16 mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmBsnTcpFlagsMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmBsnTcpFlagsMasked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private U16 value;
+ private boolean maskSet;
+ private U16 mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x32104L;
+ }
+
+ @Override
+ public U16 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnTcpFlagsMasked.Builder setValue(U16 value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public U16 getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmBsnTcpFlagsMasked.Builder setMask(U16 mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<U16> getMatchField() {
+ return MatchField.BSN_TCP_FLAGS;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<U16> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmBsnTcpFlagsMasked build() {
+ U16 value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ U16 mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmBsnTcpFlagsMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmBsnTcpFlagsMasked> {
+ @Override
+ public OFOxmBsnTcpFlagsMasked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x32104L
+ int typeLen = bb.readInt();
+ if(typeLen != 0x32104)
+ throw new OFParseError("Wrong typeLen: Expected=0x32104L(0x32104L), got="+typeLen);
+ U16 value = U16.of(bb.readShort());
+ U16 mask = U16.of(bb.readShort());
+
+ OFOxmBsnTcpFlagsMaskedVer13 oxmBsnTcpFlagsMaskedVer13 = new OFOxmBsnTcpFlagsMaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmBsnTcpFlagsMaskedVer13);
+ return oxmBsnTcpFlagsMaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmBsnTcpFlagsMaskedVer13Funnel FUNNEL = new OFOxmBsnTcpFlagsMaskedVer13Funnel();
+ static class OFOxmBsnTcpFlagsMaskedVer13Funnel implements Funnel<OFOxmBsnTcpFlagsMaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmBsnTcpFlagsMaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x32104L
+ sink.putInt(0x32104);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmBsnTcpFlagsMaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmBsnTcpFlagsMaskedVer13 message) {
+ // fixed value property typeLen = 0x32104L
+ bb.writeInt(0x32104);
+ bb.writeShort(message.value.getRaw());
+ bb.writeShort(message.mask.getRaw());
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmBsnTcpFlagsMaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmBsnTcpFlagsMaskedVer13 other = (OFOxmBsnTcpFlagsMaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnTcpFlagsVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnTcpFlagsVer13.java
new file mode 100644
index 0000000..75d5243
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnTcpFlagsVer13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmBsnTcpFlagsVer13 implements OFOxmBsnTcpFlags {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmBsnTcpFlagsVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 6;
+
+ private final static U16 DEFAULT_VALUE = U16.ZERO;
+
+ // OF message fields
+ private final U16 value;
+//
+ // Immutable default instance
+ final static OFOxmBsnTcpFlagsVer13 DEFAULT = new OFOxmBsnTcpFlagsVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmBsnTcpFlagsVer13(U16 value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x32002L;
+ }
+
+ @Override
+ public U16 getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<U16> getMatchField() {
+ return MatchField.BSN_TCP_FLAGS;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<U16> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public U16 getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmBsnTcpFlags.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmBsnTcpFlags.Builder {
+ final OFOxmBsnTcpFlagsVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private U16 value;
+
+ BuilderWithParent(OFOxmBsnTcpFlagsVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x32002L;
+ }
+
+ @Override
+ public U16 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnTcpFlags.Builder setValue(U16 value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<U16> getMatchField() {
+ return MatchField.BSN_TCP_FLAGS;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<U16> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public U16 getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmBsnTcpFlags build() {
+ U16 value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmBsnTcpFlagsVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmBsnTcpFlags.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private U16 value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x32002L;
+ }
+
+ @Override
+ public U16 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnTcpFlags.Builder setValue(U16 value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<U16> getMatchField() {
+ return MatchField.BSN_TCP_FLAGS;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<U16> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public U16 getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmBsnTcpFlags build() {
+ U16 value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmBsnTcpFlagsVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmBsnTcpFlags> {
+ @Override
+ public OFOxmBsnTcpFlags readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x32002L
+ int typeLen = bb.readInt();
+ if(typeLen != 0x32002)
+ throw new OFParseError("Wrong typeLen: Expected=0x32002L(0x32002L), got="+typeLen);
+ U16 value = U16.of(bb.readShort());
+
+ OFOxmBsnTcpFlagsVer13 oxmBsnTcpFlagsVer13 = new OFOxmBsnTcpFlagsVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmBsnTcpFlagsVer13);
+ return oxmBsnTcpFlagsVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmBsnTcpFlagsVer13Funnel FUNNEL = new OFOxmBsnTcpFlagsVer13Funnel();
+ static class OFOxmBsnTcpFlagsVer13Funnel implements Funnel<OFOxmBsnTcpFlagsVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmBsnTcpFlagsVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x32002L
+ sink.putInt(0x32002);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmBsnTcpFlagsVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmBsnTcpFlagsVer13 message) {
+ // fixed value property typeLen = 0x32002L
+ bb.writeInt(0x32002);
+ bb.writeShort(message.value.getRaw());
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmBsnTcpFlagsVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmBsnTcpFlagsVer13 other = (OFOxmBsnTcpFlagsVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnUdf0MaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnUdf0MaskedVer13.java
new file mode 100644
index 0000000..6efe442
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnUdf0MaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmBsnUdf0MaskedVer13 implements OFOxmBsnUdf0Masked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmBsnUdf0MaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 12;
+
+ private final static UDF DEFAULT_VALUE = UDF.ZERO;
+ private final static UDF DEFAULT_VALUE_MASK = UDF.ZERO;
+
+ // OF message fields
+ private final UDF value;
+ private final UDF mask;
+//
+ // Immutable default instance
+ final static OFOxmBsnUdf0MaskedVer13 DEFAULT = new OFOxmBsnUdf0MaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmBsnUdf0MaskedVer13(UDF value, UDF mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x31108L;
+ }
+
+ @Override
+ public UDF getValue() {
+ return value;
+ }
+
+ @Override
+ public UDF getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<UDF> getMatchField() {
+ return MatchField.BSN_UDF0;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<UDF> getCanonical() {
+ if (UDF.NO_MASK.equals(mask)) {
+ return new OFOxmBsnUdf0Ver13(value);
+ } else if(UDF.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmBsnUdf0Masked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmBsnUdf0Masked.Builder {
+ final OFOxmBsnUdf0MaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private UDF value;
+ private boolean maskSet;
+ private UDF mask;
+
+ BuilderWithParent(OFOxmBsnUdf0MaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x31108L;
+ }
+
+ @Override
+ public UDF getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnUdf0Masked.Builder setValue(UDF value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public UDF getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmBsnUdf0Masked.Builder setMask(UDF mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<UDF> getMatchField() {
+ return MatchField.BSN_UDF0;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<UDF> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmBsnUdf0Masked build() {
+ UDF value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ UDF mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmBsnUdf0MaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmBsnUdf0Masked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private UDF value;
+ private boolean maskSet;
+ private UDF mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x31108L;
+ }
+
+ @Override
+ public UDF getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnUdf0Masked.Builder setValue(UDF value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public UDF getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmBsnUdf0Masked.Builder setMask(UDF mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<UDF> getMatchField() {
+ return MatchField.BSN_UDF0;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<UDF> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmBsnUdf0Masked build() {
+ UDF value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ UDF mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmBsnUdf0MaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmBsnUdf0Masked> {
+ @Override
+ public OFOxmBsnUdf0Masked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x31108L
+ int typeLen = bb.readInt();
+ if(typeLen != 0x31108)
+ throw new OFParseError("Wrong typeLen: Expected=0x31108L(0x31108L), got="+typeLen);
+ UDF value = UDF.read4Bytes(bb);
+ UDF mask = UDF.read4Bytes(bb);
+
+ OFOxmBsnUdf0MaskedVer13 oxmBsnUdf0MaskedVer13 = new OFOxmBsnUdf0MaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmBsnUdf0MaskedVer13);
+ return oxmBsnUdf0MaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmBsnUdf0MaskedVer13Funnel FUNNEL = new OFOxmBsnUdf0MaskedVer13Funnel();
+ static class OFOxmBsnUdf0MaskedVer13Funnel implements Funnel<OFOxmBsnUdf0MaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmBsnUdf0MaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x31108L
+ sink.putInt(0x31108);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmBsnUdf0MaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmBsnUdf0MaskedVer13 message) {
+ // fixed value property typeLen = 0x31108L
+ bb.writeInt(0x31108);
+ message.value.write4Bytes(bb);
+ message.mask.write4Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmBsnUdf0MaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmBsnUdf0MaskedVer13 other = (OFOxmBsnUdf0MaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnUdf0Ver13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnUdf0Ver13.java
new file mode 100644
index 0000000..4ce015f
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnUdf0Ver13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmBsnUdf0Ver13 implements OFOxmBsnUdf0 {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmBsnUdf0Ver13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static UDF DEFAULT_VALUE = UDF.ZERO;
+
+ // OF message fields
+ private final UDF value;
+//
+ // Immutable default instance
+ final static OFOxmBsnUdf0Ver13 DEFAULT = new OFOxmBsnUdf0Ver13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmBsnUdf0Ver13(UDF value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x31004L;
+ }
+
+ @Override
+ public UDF getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<UDF> getMatchField() {
+ return MatchField.BSN_UDF0;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<UDF> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public UDF getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmBsnUdf0.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmBsnUdf0.Builder {
+ final OFOxmBsnUdf0Ver13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private UDF value;
+
+ BuilderWithParent(OFOxmBsnUdf0Ver13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x31004L;
+ }
+
+ @Override
+ public UDF getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnUdf0.Builder setValue(UDF value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<UDF> getMatchField() {
+ return MatchField.BSN_UDF0;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<UDF> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public UDF getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmBsnUdf0 build() {
+ UDF value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmBsnUdf0Ver13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmBsnUdf0.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private UDF value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x31004L;
+ }
+
+ @Override
+ public UDF getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnUdf0.Builder setValue(UDF value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<UDF> getMatchField() {
+ return MatchField.BSN_UDF0;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<UDF> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public UDF getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmBsnUdf0 build() {
+ UDF value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmBsnUdf0Ver13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmBsnUdf0> {
+ @Override
+ public OFOxmBsnUdf0 readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x31004L
+ int typeLen = bb.readInt();
+ if(typeLen != 0x31004)
+ throw new OFParseError("Wrong typeLen: Expected=0x31004L(0x31004L), got="+typeLen);
+ UDF value = UDF.read4Bytes(bb);
+
+ OFOxmBsnUdf0Ver13 oxmBsnUdf0Ver13 = new OFOxmBsnUdf0Ver13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmBsnUdf0Ver13);
+ return oxmBsnUdf0Ver13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmBsnUdf0Ver13Funnel FUNNEL = new OFOxmBsnUdf0Ver13Funnel();
+ static class OFOxmBsnUdf0Ver13Funnel implements Funnel<OFOxmBsnUdf0Ver13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmBsnUdf0Ver13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x31004L
+ sink.putInt(0x31004);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmBsnUdf0Ver13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmBsnUdf0Ver13 message) {
+ // fixed value property typeLen = 0x31004L
+ bb.writeInt(0x31004);
+ message.value.write4Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmBsnUdf0Ver13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmBsnUdf0Ver13 other = (OFOxmBsnUdf0Ver13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnUdf1MaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnUdf1MaskedVer13.java
new file mode 100644
index 0000000..f57ef31
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnUdf1MaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmBsnUdf1MaskedVer13 implements OFOxmBsnUdf1Masked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmBsnUdf1MaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 12;
+
+ private final static UDF DEFAULT_VALUE = UDF.ZERO;
+ private final static UDF DEFAULT_VALUE_MASK = UDF.ZERO;
+
+ // OF message fields
+ private final UDF value;
+ private final UDF mask;
+//
+ // Immutable default instance
+ final static OFOxmBsnUdf1MaskedVer13 DEFAULT = new OFOxmBsnUdf1MaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmBsnUdf1MaskedVer13(UDF value, UDF mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x31308L;
+ }
+
+ @Override
+ public UDF getValue() {
+ return value;
+ }
+
+ @Override
+ public UDF getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<UDF> getMatchField() {
+ return MatchField.BSN_UDF1;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<UDF> getCanonical() {
+ if (UDF.NO_MASK.equals(mask)) {
+ return new OFOxmBsnUdf1Ver13(value);
+ } else if(UDF.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmBsnUdf1Masked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmBsnUdf1Masked.Builder {
+ final OFOxmBsnUdf1MaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private UDF value;
+ private boolean maskSet;
+ private UDF mask;
+
+ BuilderWithParent(OFOxmBsnUdf1MaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x31308L;
+ }
+
+ @Override
+ public UDF getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnUdf1Masked.Builder setValue(UDF value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public UDF getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmBsnUdf1Masked.Builder setMask(UDF mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<UDF> getMatchField() {
+ return MatchField.BSN_UDF1;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<UDF> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmBsnUdf1Masked build() {
+ UDF value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ UDF mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmBsnUdf1MaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmBsnUdf1Masked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private UDF value;
+ private boolean maskSet;
+ private UDF mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x31308L;
+ }
+
+ @Override
+ public UDF getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnUdf1Masked.Builder setValue(UDF value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public UDF getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmBsnUdf1Masked.Builder setMask(UDF mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<UDF> getMatchField() {
+ return MatchField.BSN_UDF1;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<UDF> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmBsnUdf1Masked build() {
+ UDF value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ UDF mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmBsnUdf1MaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmBsnUdf1Masked> {
+ @Override
+ public OFOxmBsnUdf1Masked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x31308L
+ int typeLen = bb.readInt();
+ if(typeLen != 0x31308)
+ throw new OFParseError("Wrong typeLen: Expected=0x31308L(0x31308L), got="+typeLen);
+ UDF value = UDF.read4Bytes(bb);
+ UDF mask = UDF.read4Bytes(bb);
+
+ OFOxmBsnUdf1MaskedVer13 oxmBsnUdf1MaskedVer13 = new OFOxmBsnUdf1MaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmBsnUdf1MaskedVer13);
+ return oxmBsnUdf1MaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmBsnUdf1MaskedVer13Funnel FUNNEL = new OFOxmBsnUdf1MaskedVer13Funnel();
+ static class OFOxmBsnUdf1MaskedVer13Funnel implements Funnel<OFOxmBsnUdf1MaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmBsnUdf1MaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x31308L
+ sink.putInt(0x31308);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmBsnUdf1MaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmBsnUdf1MaskedVer13 message) {
+ // fixed value property typeLen = 0x31308L
+ bb.writeInt(0x31308);
+ message.value.write4Bytes(bb);
+ message.mask.write4Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmBsnUdf1MaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmBsnUdf1MaskedVer13 other = (OFOxmBsnUdf1MaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnUdf1Ver13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnUdf1Ver13.java
new file mode 100644
index 0000000..1f54e29
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnUdf1Ver13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmBsnUdf1Ver13 implements OFOxmBsnUdf1 {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmBsnUdf1Ver13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static UDF DEFAULT_VALUE = UDF.ZERO;
+
+ // OF message fields
+ private final UDF value;
+//
+ // Immutable default instance
+ final static OFOxmBsnUdf1Ver13 DEFAULT = new OFOxmBsnUdf1Ver13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmBsnUdf1Ver13(UDF value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x31204L;
+ }
+
+ @Override
+ public UDF getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<UDF> getMatchField() {
+ return MatchField.BSN_UDF1;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<UDF> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public UDF getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmBsnUdf1.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmBsnUdf1.Builder {
+ final OFOxmBsnUdf1Ver13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private UDF value;
+
+ BuilderWithParent(OFOxmBsnUdf1Ver13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x31204L;
+ }
+
+ @Override
+ public UDF getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnUdf1.Builder setValue(UDF value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<UDF> getMatchField() {
+ return MatchField.BSN_UDF1;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<UDF> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public UDF getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmBsnUdf1 build() {
+ UDF value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmBsnUdf1Ver13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmBsnUdf1.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private UDF value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x31204L;
+ }
+
+ @Override
+ public UDF getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnUdf1.Builder setValue(UDF value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<UDF> getMatchField() {
+ return MatchField.BSN_UDF1;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<UDF> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public UDF getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmBsnUdf1 build() {
+ UDF value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmBsnUdf1Ver13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmBsnUdf1> {
+ @Override
+ public OFOxmBsnUdf1 readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x31204L
+ int typeLen = bb.readInt();
+ if(typeLen != 0x31204)
+ throw new OFParseError("Wrong typeLen: Expected=0x31204L(0x31204L), got="+typeLen);
+ UDF value = UDF.read4Bytes(bb);
+
+ OFOxmBsnUdf1Ver13 oxmBsnUdf1Ver13 = new OFOxmBsnUdf1Ver13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmBsnUdf1Ver13);
+ return oxmBsnUdf1Ver13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmBsnUdf1Ver13Funnel FUNNEL = new OFOxmBsnUdf1Ver13Funnel();
+ static class OFOxmBsnUdf1Ver13Funnel implements Funnel<OFOxmBsnUdf1Ver13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmBsnUdf1Ver13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x31204L
+ sink.putInt(0x31204);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmBsnUdf1Ver13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmBsnUdf1Ver13 message) {
+ // fixed value property typeLen = 0x31204L
+ bb.writeInt(0x31204);
+ message.value.write4Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmBsnUdf1Ver13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmBsnUdf1Ver13 other = (OFOxmBsnUdf1Ver13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnUdf2MaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnUdf2MaskedVer13.java
new file mode 100644
index 0000000..368eacb
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnUdf2MaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmBsnUdf2MaskedVer13 implements OFOxmBsnUdf2Masked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmBsnUdf2MaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 12;
+
+ private final static UDF DEFAULT_VALUE = UDF.ZERO;
+ private final static UDF DEFAULT_VALUE_MASK = UDF.ZERO;
+
+ // OF message fields
+ private final UDF value;
+ private final UDF mask;
+//
+ // Immutable default instance
+ final static OFOxmBsnUdf2MaskedVer13 DEFAULT = new OFOxmBsnUdf2MaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmBsnUdf2MaskedVer13(UDF value, UDF mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x31508L;
+ }
+
+ @Override
+ public UDF getValue() {
+ return value;
+ }
+
+ @Override
+ public UDF getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<UDF> getMatchField() {
+ return MatchField.BSN_UDF2;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<UDF> getCanonical() {
+ if (UDF.NO_MASK.equals(mask)) {
+ return new OFOxmBsnUdf2Ver13(value);
+ } else if(UDF.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmBsnUdf2Masked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmBsnUdf2Masked.Builder {
+ final OFOxmBsnUdf2MaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private UDF value;
+ private boolean maskSet;
+ private UDF mask;
+
+ BuilderWithParent(OFOxmBsnUdf2MaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x31508L;
+ }
+
+ @Override
+ public UDF getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnUdf2Masked.Builder setValue(UDF value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public UDF getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmBsnUdf2Masked.Builder setMask(UDF mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<UDF> getMatchField() {
+ return MatchField.BSN_UDF2;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<UDF> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmBsnUdf2Masked build() {
+ UDF value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ UDF mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmBsnUdf2MaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmBsnUdf2Masked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private UDF value;
+ private boolean maskSet;
+ private UDF mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x31508L;
+ }
+
+ @Override
+ public UDF getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnUdf2Masked.Builder setValue(UDF value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public UDF getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmBsnUdf2Masked.Builder setMask(UDF mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<UDF> getMatchField() {
+ return MatchField.BSN_UDF2;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<UDF> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmBsnUdf2Masked build() {
+ UDF value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ UDF mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmBsnUdf2MaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmBsnUdf2Masked> {
+ @Override
+ public OFOxmBsnUdf2Masked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x31508L
+ int typeLen = bb.readInt();
+ if(typeLen != 0x31508)
+ throw new OFParseError("Wrong typeLen: Expected=0x31508L(0x31508L), got="+typeLen);
+ UDF value = UDF.read4Bytes(bb);
+ UDF mask = UDF.read4Bytes(bb);
+
+ OFOxmBsnUdf2MaskedVer13 oxmBsnUdf2MaskedVer13 = new OFOxmBsnUdf2MaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmBsnUdf2MaskedVer13);
+ return oxmBsnUdf2MaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmBsnUdf2MaskedVer13Funnel FUNNEL = new OFOxmBsnUdf2MaskedVer13Funnel();
+ static class OFOxmBsnUdf2MaskedVer13Funnel implements Funnel<OFOxmBsnUdf2MaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmBsnUdf2MaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x31508L
+ sink.putInt(0x31508);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmBsnUdf2MaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmBsnUdf2MaskedVer13 message) {
+ // fixed value property typeLen = 0x31508L
+ bb.writeInt(0x31508);
+ message.value.write4Bytes(bb);
+ message.mask.write4Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmBsnUdf2MaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmBsnUdf2MaskedVer13 other = (OFOxmBsnUdf2MaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnUdf2Ver13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnUdf2Ver13.java
new file mode 100644
index 0000000..511ec40
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnUdf2Ver13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmBsnUdf2Ver13 implements OFOxmBsnUdf2 {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmBsnUdf2Ver13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static UDF DEFAULT_VALUE = UDF.ZERO;
+
+ // OF message fields
+ private final UDF value;
+//
+ // Immutable default instance
+ final static OFOxmBsnUdf2Ver13 DEFAULT = new OFOxmBsnUdf2Ver13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmBsnUdf2Ver13(UDF value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x31404L;
+ }
+
+ @Override
+ public UDF getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<UDF> getMatchField() {
+ return MatchField.BSN_UDF2;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<UDF> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public UDF getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmBsnUdf2.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmBsnUdf2.Builder {
+ final OFOxmBsnUdf2Ver13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private UDF value;
+
+ BuilderWithParent(OFOxmBsnUdf2Ver13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x31404L;
+ }
+
+ @Override
+ public UDF getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnUdf2.Builder setValue(UDF value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<UDF> getMatchField() {
+ return MatchField.BSN_UDF2;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<UDF> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public UDF getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmBsnUdf2 build() {
+ UDF value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmBsnUdf2Ver13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmBsnUdf2.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private UDF value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x31404L;
+ }
+
+ @Override
+ public UDF getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnUdf2.Builder setValue(UDF value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<UDF> getMatchField() {
+ return MatchField.BSN_UDF2;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<UDF> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public UDF getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmBsnUdf2 build() {
+ UDF value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmBsnUdf2Ver13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmBsnUdf2> {
+ @Override
+ public OFOxmBsnUdf2 readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x31404L
+ int typeLen = bb.readInt();
+ if(typeLen != 0x31404)
+ throw new OFParseError("Wrong typeLen: Expected=0x31404L(0x31404L), got="+typeLen);
+ UDF value = UDF.read4Bytes(bb);
+
+ OFOxmBsnUdf2Ver13 oxmBsnUdf2Ver13 = new OFOxmBsnUdf2Ver13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmBsnUdf2Ver13);
+ return oxmBsnUdf2Ver13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmBsnUdf2Ver13Funnel FUNNEL = new OFOxmBsnUdf2Ver13Funnel();
+ static class OFOxmBsnUdf2Ver13Funnel implements Funnel<OFOxmBsnUdf2Ver13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmBsnUdf2Ver13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x31404L
+ sink.putInt(0x31404);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmBsnUdf2Ver13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmBsnUdf2Ver13 message) {
+ // fixed value property typeLen = 0x31404L
+ bb.writeInt(0x31404);
+ message.value.write4Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmBsnUdf2Ver13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmBsnUdf2Ver13 other = (OFOxmBsnUdf2Ver13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnUdf3MaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnUdf3MaskedVer13.java
new file mode 100644
index 0000000..4b70152
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnUdf3MaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmBsnUdf3MaskedVer13 implements OFOxmBsnUdf3Masked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmBsnUdf3MaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 12;
+
+ private final static UDF DEFAULT_VALUE = UDF.ZERO;
+ private final static UDF DEFAULT_VALUE_MASK = UDF.ZERO;
+
+ // OF message fields
+ private final UDF value;
+ private final UDF mask;
+//
+ // Immutable default instance
+ final static OFOxmBsnUdf3MaskedVer13 DEFAULT = new OFOxmBsnUdf3MaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmBsnUdf3MaskedVer13(UDF value, UDF mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x31708L;
+ }
+
+ @Override
+ public UDF getValue() {
+ return value;
+ }
+
+ @Override
+ public UDF getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<UDF> getMatchField() {
+ return MatchField.BSN_UDF3;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<UDF> getCanonical() {
+ if (UDF.NO_MASK.equals(mask)) {
+ return new OFOxmBsnUdf3Ver13(value);
+ } else if(UDF.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmBsnUdf3Masked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmBsnUdf3Masked.Builder {
+ final OFOxmBsnUdf3MaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private UDF value;
+ private boolean maskSet;
+ private UDF mask;
+
+ BuilderWithParent(OFOxmBsnUdf3MaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x31708L;
+ }
+
+ @Override
+ public UDF getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnUdf3Masked.Builder setValue(UDF value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public UDF getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmBsnUdf3Masked.Builder setMask(UDF mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<UDF> getMatchField() {
+ return MatchField.BSN_UDF3;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<UDF> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmBsnUdf3Masked build() {
+ UDF value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ UDF mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmBsnUdf3MaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmBsnUdf3Masked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private UDF value;
+ private boolean maskSet;
+ private UDF mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x31708L;
+ }
+
+ @Override
+ public UDF getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnUdf3Masked.Builder setValue(UDF value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public UDF getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmBsnUdf3Masked.Builder setMask(UDF mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<UDF> getMatchField() {
+ return MatchField.BSN_UDF3;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<UDF> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmBsnUdf3Masked build() {
+ UDF value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ UDF mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmBsnUdf3MaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmBsnUdf3Masked> {
+ @Override
+ public OFOxmBsnUdf3Masked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x31708L
+ int typeLen = bb.readInt();
+ if(typeLen != 0x31708)
+ throw new OFParseError("Wrong typeLen: Expected=0x31708L(0x31708L), got="+typeLen);
+ UDF value = UDF.read4Bytes(bb);
+ UDF mask = UDF.read4Bytes(bb);
+
+ OFOxmBsnUdf3MaskedVer13 oxmBsnUdf3MaskedVer13 = new OFOxmBsnUdf3MaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmBsnUdf3MaskedVer13);
+ return oxmBsnUdf3MaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmBsnUdf3MaskedVer13Funnel FUNNEL = new OFOxmBsnUdf3MaskedVer13Funnel();
+ static class OFOxmBsnUdf3MaskedVer13Funnel implements Funnel<OFOxmBsnUdf3MaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmBsnUdf3MaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x31708L
+ sink.putInt(0x31708);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmBsnUdf3MaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmBsnUdf3MaskedVer13 message) {
+ // fixed value property typeLen = 0x31708L
+ bb.writeInt(0x31708);
+ message.value.write4Bytes(bb);
+ message.mask.write4Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmBsnUdf3MaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmBsnUdf3MaskedVer13 other = (OFOxmBsnUdf3MaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnUdf3Ver13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnUdf3Ver13.java
new file mode 100644
index 0000000..cec1db9
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnUdf3Ver13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmBsnUdf3Ver13 implements OFOxmBsnUdf3 {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmBsnUdf3Ver13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static UDF DEFAULT_VALUE = UDF.ZERO;
+
+ // OF message fields
+ private final UDF value;
+//
+ // Immutable default instance
+ final static OFOxmBsnUdf3Ver13 DEFAULT = new OFOxmBsnUdf3Ver13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmBsnUdf3Ver13(UDF value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x31604L;
+ }
+
+ @Override
+ public UDF getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<UDF> getMatchField() {
+ return MatchField.BSN_UDF3;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<UDF> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public UDF getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmBsnUdf3.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmBsnUdf3.Builder {
+ final OFOxmBsnUdf3Ver13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private UDF value;
+
+ BuilderWithParent(OFOxmBsnUdf3Ver13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x31604L;
+ }
+
+ @Override
+ public UDF getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnUdf3.Builder setValue(UDF value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<UDF> getMatchField() {
+ return MatchField.BSN_UDF3;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<UDF> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public UDF getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmBsnUdf3 build() {
+ UDF value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmBsnUdf3Ver13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmBsnUdf3.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private UDF value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x31604L;
+ }
+
+ @Override
+ public UDF getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnUdf3.Builder setValue(UDF value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<UDF> getMatchField() {
+ return MatchField.BSN_UDF3;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<UDF> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public UDF getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmBsnUdf3 build() {
+ UDF value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmBsnUdf3Ver13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmBsnUdf3> {
+ @Override
+ public OFOxmBsnUdf3 readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x31604L
+ int typeLen = bb.readInt();
+ if(typeLen != 0x31604)
+ throw new OFParseError("Wrong typeLen: Expected=0x31604L(0x31604L), got="+typeLen);
+ UDF value = UDF.read4Bytes(bb);
+
+ OFOxmBsnUdf3Ver13 oxmBsnUdf3Ver13 = new OFOxmBsnUdf3Ver13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmBsnUdf3Ver13);
+ return oxmBsnUdf3Ver13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmBsnUdf3Ver13Funnel FUNNEL = new OFOxmBsnUdf3Ver13Funnel();
+ static class OFOxmBsnUdf3Ver13Funnel implements Funnel<OFOxmBsnUdf3Ver13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmBsnUdf3Ver13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x31604L
+ sink.putInt(0x31604);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmBsnUdf3Ver13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmBsnUdf3Ver13 message) {
+ // fixed value property typeLen = 0x31604L
+ bb.writeInt(0x31604);
+ message.value.write4Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmBsnUdf3Ver13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmBsnUdf3Ver13 other = (OFOxmBsnUdf3Ver13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnUdf4MaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnUdf4MaskedVer13.java
new file mode 100644
index 0000000..f896cff
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnUdf4MaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmBsnUdf4MaskedVer13 implements OFOxmBsnUdf4Masked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmBsnUdf4MaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 12;
+
+ private final static UDF DEFAULT_VALUE = UDF.ZERO;
+ private final static UDF DEFAULT_VALUE_MASK = UDF.ZERO;
+
+ // OF message fields
+ private final UDF value;
+ private final UDF mask;
+//
+ // Immutable default instance
+ final static OFOxmBsnUdf4MaskedVer13 DEFAULT = new OFOxmBsnUdf4MaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmBsnUdf4MaskedVer13(UDF value, UDF mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x31908L;
+ }
+
+ @Override
+ public UDF getValue() {
+ return value;
+ }
+
+ @Override
+ public UDF getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<UDF> getMatchField() {
+ return MatchField.BSN_UDF4;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<UDF> getCanonical() {
+ if (UDF.NO_MASK.equals(mask)) {
+ return new OFOxmBsnUdf4Ver13(value);
+ } else if(UDF.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmBsnUdf4Masked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmBsnUdf4Masked.Builder {
+ final OFOxmBsnUdf4MaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private UDF value;
+ private boolean maskSet;
+ private UDF mask;
+
+ BuilderWithParent(OFOxmBsnUdf4MaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x31908L;
+ }
+
+ @Override
+ public UDF getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnUdf4Masked.Builder setValue(UDF value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public UDF getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmBsnUdf4Masked.Builder setMask(UDF mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<UDF> getMatchField() {
+ return MatchField.BSN_UDF4;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<UDF> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmBsnUdf4Masked build() {
+ UDF value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ UDF mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmBsnUdf4MaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmBsnUdf4Masked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private UDF value;
+ private boolean maskSet;
+ private UDF mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x31908L;
+ }
+
+ @Override
+ public UDF getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnUdf4Masked.Builder setValue(UDF value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public UDF getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmBsnUdf4Masked.Builder setMask(UDF mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<UDF> getMatchField() {
+ return MatchField.BSN_UDF4;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<UDF> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmBsnUdf4Masked build() {
+ UDF value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ UDF mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmBsnUdf4MaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmBsnUdf4Masked> {
+ @Override
+ public OFOxmBsnUdf4Masked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x31908L
+ int typeLen = bb.readInt();
+ if(typeLen != 0x31908)
+ throw new OFParseError("Wrong typeLen: Expected=0x31908L(0x31908L), got="+typeLen);
+ UDF value = UDF.read4Bytes(bb);
+ UDF mask = UDF.read4Bytes(bb);
+
+ OFOxmBsnUdf4MaskedVer13 oxmBsnUdf4MaskedVer13 = new OFOxmBsnUdf4MaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmBsnUdf4MaskedVer13);
+ return oxmBsnUdf4MaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmBsnUdf4MaskedVer13Funnel FUNNEL = new OFOxmBsnUdf4MaskedVer13Funnel();
+ static class OFOxmBsnUdf4MaskedVer13Funnel implements Funnel<OFOxmBsnUdf4MaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmBsnUdf4MaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x31908L
+ sink.putInt(0x31908);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmBsnUdf4MaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmBsnUdf4MaskedVer13 message) {
+ // fixed value property typeLen = 0x31908L
+ bb.writeInt(0x31908);
+ message.value.write4Bytes(bb);
+ message.mask.write4Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmBsnUdf4MaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmBsnUdf4MaskedVer13 other = (OFOxmBsnUdf4MaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnUdf4Ver13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnUdf4Ver13.java
new file mode 100644
index 0000000..ddd0e61
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnUdf4Ver13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmBsnUdf4Ver13 implements OFOxmBsnUdf4 {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmBsnUdf4Ver13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static UDF DEFAULT_VALUE = UDF.ZERO;
+
+ // OF message fields
+ private final UDF value;
+//
+ // Immutable default instance
+ final static OFOxmBsnUdf4Ver13 DEFAULT = new OFOxmBsnUdf4Ver13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmBsnUdf4Ver13(UDF value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x31804L;
+ }
+
+ @Override
+ public UDF getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<UDF> getMatchField() {
+ return MatchField.BSN_UDF4;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<UDF> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public UDF getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmBsnUdf4.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmBsnUdf4.Builder {
+ final OFOxmBsnUdf4Ver13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private UDF value;
+
+ BuilderWithParent(OFOxmBsnUdf4Ver13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x31804L;
+ }
+
+ @Override
+ public UDF getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnUdf4.Builder setValue(UDF value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<UDF> getMatchField() {
+ return MatchField.BSN_UDF4;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<UDF> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public UDF getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmBsnUdf4 build() {
+ UDF value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmBsnUdf4Ver13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmBsnUdf4.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private UDF value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x31804L;
+ }
+
+ @Override
+ public UDF getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnUdf4.Builder setValue(UDF value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<UDF> getMatchField() {
+ return MatchField.BSN_UDF4;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<UDF> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public UDF getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmBsnUdf4 build() {
+ UDF value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmBsnUdf4Ver13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmBsnUdf4> {
+ @Override
+ public OFOxmBsnUdf4 readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x31804L
+ int typeLen = bb.readInt();
+ if(typeLen != 0x31804)
+ throw new OFParseError("Wrong typeLen: Expected=0x31804L(0x31804L), got="+typeLen);
+ UDF value = UDF.read4Bytes(bb);
+
+ OFOxmBsnUdf4Ver13 oxmBsnUdf4Ver13 = new OFOxmBsnUdf4Ver13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmBsnUdf4Ver13);
+ return oxmBsnUdf4Ver13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmBsnUdf4Ver13Funnel FUNNEL = new OFOxmBsnUdf4Ver13Funnel();
+ static class OFOxmBsnUdf4Ver13Funnel implements Funnel<OFOxmBsnUdf4Ver13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmBsnUdf4Ver13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x31804L
+ sink.putInt(0x31804);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmBsnUdf4Ver13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmBsnUdf4Ver13 message) {
+ // fixed value property typeLen = 0x31804L
+ bb.writeInt(0x31804);
+ message.value.write4Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmBsnUdf4Ver13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmBsnUdf4Ver13 other = (OFOxmBsnUdf4Ver13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnUdf5MaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnUdf5MaskedVer13.java
new file mode 100644
index 0000000..16aeb31
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnUdf5MaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmBsnUdf5MaskedVer13 implements OFOxmBsnUdf5Masked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmBsnUdf5MaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 12;
+
+ private final static UDF DEFAULT_VALUE = UDF.ZERO;
+ private final static UDF DEFAULT_VALUE_MASK = UDF.ZERO;
+
+ // OF message fields
+ private final UDF value;
+ private final UDF mask;
+//
+ // Immutable default instance
+ final static OFOxmBsnUdf5MaskedVer13 DEFAULT = new OFOxmBsnUdf5MaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmBsnUdf5MaskedVer13(UDF value, UDF mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x31b08L;
+ }
+
+ @Override
+ public UDF getValue() {
+ return value;
+ }
+
+ @Override
+ public UDF getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<UDF> getMatchField() {
+ return MatchField.BSN_UDF5;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<UDF> getCanonical() {
+ if (UDF.NO_MASK.equals(mask)) {
+ return new OFOxmBsnUdf5Ver13(value);
+ } else if(UDF.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmBsnUdf5Masked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmBsnUdf5Masked.Builder {
+ final OFOxmBsnUdf5MaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private UDF value;
+ private boolean maskSet;
+ private UDF mask;
+
+ BuilderWithParent(OFOxmBsnUdf5MaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x31b08L;
+ }
+
+ @Override
+ public UDF getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnUdf5Masked.Builder setValue(UDF value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public UDF getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmBsnUdf5Masked.Builder setMask(UDF mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<UDF> getMatchField() {
+ return MatchField.BSN_UDF5;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<UDF> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmBsnUdf5Masked build() {
+ UDF value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ UDF mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmBsnUdf5MaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmBsnUdf5Masked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private UDF value;
+ private boolean maskSet;
+ private UDF mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x31b08L;
+ }
+
+ @Override
+ public UDF getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnUdf5Masked.Builder setValue(UDF value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public UDF getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmBsnUdf5Masked.Builder setMask(UDF mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<UDF> getMatchField() {
+ return MatchField.BSN_UDF5;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<UDF> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmBsnUdf5Masked build() {
+ UDF value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ UDF mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmBsnUdf5MaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmBsnUdf5Masked> {
+ @Override
+ public OFOxmBsnUdf5Masked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x31b08L
+ int typeLen = bb.readInt();
+ if(typeLen != 0x31b08)
+ throw new OFParseError("Wrong typeLen: Expected=0x31b08L(0x31b08L), got="+typeLen);
+ UDF value = UDF.read4Bytes(bb);
+ UDF mask = UDF.read4Bytes(bb);
+
+ OFOxmBsnUdf5MaskedVer13 oxmBsnUdf5MaskedVer13 = new OFOxmBsnUdf5MaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmBsnUdf5MaskedVer13);
+ return oxmBsnUdf5MaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmBsnUdf5MaskedVer13Funnel FUNNEL = new OFOxmBsnUdf5MaskedVer13Funnel();
+ static class OFOxmBsnUdf5MaskedVer13Funnel implements Funnel<OFOxmBsnUdf5MaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmBsnUdf5MaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x31b08L
+ sink.putInt(0x31b08);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmBsnUdf5MaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmBsnUdf5MaskedVer13 message) {
+ // fixed value property typeLen = 0x31b08L
+ bb.writeInt(0x31b08);
+ message.value.write4Bytes(bb);
+ message.mask.write4Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmBsnUdf5MaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmBsnUdf5MaskedVer13 other = (OFOxmBsnUdf5MaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnUdf5Ver13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnUdf5Ver13.java
new file mode 100644
index 0000000..a3e9fdf
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnUdf5Ver13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmBsnUdf5Ver13 implements OFOxmBsnUdf5 {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmBsnUdf5Ver13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static UDF DEFAULT_VALUE = UDF.ZERO;
+
+ // OF message fields
+ private final UDF value;
+//
+ // Immutable default instance
+ final static OFOxmBsnUdf5Ver13 DEFAULT = new OFOxmBsnUdf5Ver13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmBsnUdf5Ver13(UDF value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x31a04L;
+ }
+
+ @Override
+ public UDF getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<UDF> getMatchField() {
+ return MatchField.BSN_UDF5;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<UDF> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public UDF getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmBsnUdf5.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmBsnUdf5.Builder {
+ final OFOxmBsnUdf5Ver13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private UDF value;
+
+ BuilderWithParent(OFOxmBsnUdf5Ver13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x31a04L;
+ }
+
+ @Override
+ public UDF getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnUdf5.Builder setValue(UDF value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<UDF> getMatchField() {
+ return MatchField.BSN_UDF5;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<UDF> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public UDF getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmBsnUdf5 build() {
+ UDF value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmBsnUdf5Ver13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmBsnUdf5.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private UDF value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x31a04L;
+ }
+
+ @Override
+ public UDF getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnUdf5.Builder setValue(UDF value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<UDF> getMatchField() {
+ return MatchField.BSN_UDF5;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<UDF> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public UDF getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmBsnUdf5 build() {
+ UDF value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmBsnUdf5Ver13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmBsnUdf5> {
+ @Override
+ public OFOxmBsnUdf5 readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x31a04L
+ int typeLen = bb.readInt();
+ if(typeLen != 0x31a04)
+ throw new OFParseError("Wrong typeLen: Expected=0x31a04L(0x31a04L), got="+typeLen);
+ UDF value = UDF.read4Bytes(bb);
+
+ OFOxmBsnUdf5Ver13 oxmBsnUdf5Ver13 = new OFOxmBsnUdf5Ver13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmBsnUdf5Ver13);
+ return oxmBsnUdf5Ver13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmBsnUdf5Ver13Funnel FUNNEL = new OFOxmBsnUdf5Ver13Funnel();
+ static class OFOxmBsnUdf5Ver13Funnel implements Funnel<OFOxmBsnUdf5Ver13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmBsnUdf5Ver13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x31a04L
+ sink.putInt(0x31a04);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmBsnUdf5Ver13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmBsnUdf5Ver13 message) {
+ // fixed value property typeLen = 0x31a04L
+ bb.writeInt(0x31a04);
+ message.value.write4Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmBsnUdf5Ver13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmBsnUdf5Ver13 other = (OFOxmBsnUdf5Ver13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnUdf6MaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnUdf6MaskedVer13.java
new file mode 100644
index 0000000..7813970
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnUdf6MaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmBsnUdf6MaskedVer13 implements OFOxmBsnUdf6Masked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmBsnUdf6MaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 12;
+
+ private final static UDF DEFAULT_VALUE = UDF.ZERO;
+ private final static UDF DEFAULT_VALUE_MASK = UDF.ZERO;
+
+ // OF message fields
+ private final UDF value;
+ private final UDF mask;
+//
+ // Immutable default instance
+ final static OFOxmBsnUdf6MaskedVer13 DEFAULT = new OFOxmBsnUdf6MaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmBsnUdf6MaskedVer13(UDF value, UDF mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x31d08L;
+ }
+
+ @Override
+ public UDF getValue() {
+ return value;
+ }
+
+ @Override
+ public UDF getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<UDF> getMatchField() {
+ return MatchField.BSN_UDF6;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<UDF> getCanonical() {
+ if (UDF.NO_MASK.equals(mask)) {
+ return new OFOxmBsnUdf6Ver13(value);
+ } else if(UDF.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmBsnUdf6Masked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmBsnUdf6Masked.Builder {
+ final OFOxmBsnUdf6MaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private UDF value;
+ private boolean maskSet;
+ private UDF mask;
+
+ BuilderWithParent(OFOxmBsnUdf6MaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x31d08L;
+ }
+
+ @Override
+ public UDF getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnUdf6Masked.Builder setValue(UDF value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public UDF getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmBsnUdf6Masked.Builder setMask(UDF mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<UDF> getMatchField() {
+ return MatchField.BSN_UDF6;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<UDF> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmBsnUdf6Masked build() {
+ UDF value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ UDF mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmBsnUdf6MaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmBsnUdf6Masked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private UDF value;
+ private boolean maskSet;
+ private UDF mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x31d08L;
+ }
+
+ @Override
+ public UDF getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnUdf6Masked.Builder setValue(UDF value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public UDF getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmBsnUdf6Masked.Builder setMask(UDF mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<UDF> getMatchField() {
+ return MatchField.BSN_UDF6;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<UDF> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmBsnUdf6Masked build() {
+ UDF value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ UDF mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmBsnUdf6MaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmBsnUdf6Masked> {
+ @Override
+ public OFOxmBsnUdf6Masked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x31d08L
+ int typeLen = bb.readInt();
+ if(typeLen != 0x31d08)
+ throw new OFParseError("Wrong typeLen: Expected=0x31d08L(0x31d08L), got="+typeLen);
+ UDF value = UDF.read4Bytes(bb);
+ UDF mask = UDF.read4Bytes(bb);
+
+ OFOxmBsnUdf6MaskedVer13 oxmBsnUdf6MaskedVer13 = new OFOxmBsnUdf6MaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmBsnUdf6MaskedVer13);
+ return oxmBsnUdf6MaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmBsnUdf6MaskedVer13Funnel FUNNEL = new OFOxmBsnUdf6MaskedVer13Funnel();
+ static class OFOxmBsnUdf6MaskedVer13Funnel implements Funnel<OFOxmBsnUdf6MaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmBsnUdf6MaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x31d08L
+ sink.putInt(0x31d08);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmBsnUdf6MaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmBsnUdf6MaskedVer13 message) {
+ // fixed value property typeLen = 0x31d08L
+ bb.writeInt(0x31d08);
+ message.value.write4Bytes(bb);
+ message.mask.write4Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmBsnUdf6MaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmBsnUdf6MaskedVer13 other = (OFOxmBsnUdf6MaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnUdf6Ver13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnUdf6Ver13.java
new file mode 100644
index 0000000..e9b2fa4
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnUdf6Ver13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmBsnUdf6Ver13 implements OFOxmBsnUdf6 {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmBsnUdf6Ver13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static UDF DEFAULT_VALUE = UDF.ZERO;
+
+ // OF message fields
+ private final UDF value;
+//
+ // Immutable default instance
+ final static OFOxmBsnUdf6Ver13 DEFAULT = new OFOxmBsnUdf6Ver13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmBsnUdf6Ver13(UDF value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x31c04L;
+ }
+
+ @Override
+ public UDF getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<UDF> getMatchField() {
+ return MatchField.BSN_UDF6;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<UDF> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public UDF getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmBsnUdf6.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmBsnUdf6.Builder {
+ final OFOxmBsnUdf6Ver13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private UDF value;
+
+ BuilderWithParent(OFOxmBsnUdf6Ver13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x31c04L;
+ }
+
+ @Override
+ public UDF getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnUdf6.Builder setValue(UDF value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<UDF> getMatchField() {
+ return MatchField.BSN_UDF6;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<UDF> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public UDF getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmBsnUdf6 build() {
+ UDF value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmBsnUdf6Ver13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmBsnUdf6.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private UDF value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x31c04L;
+ }
+
+ @Override
+ public UDF getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnUdf6.Builder setValue(UDF value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<UDF> getMatchField() {
+ return MatchField.BSN_UDF6;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<UDF> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public UDF getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmBsnUdf6 build() {
+ UDF value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmBsnUdf6Ver13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmBsnUdf6> {
+ @Override
+ public OFOxmBsnUdf6 readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x31c04L
+ int typeLen = bb.readInt();
+ if(typeLen != 0x31c04)
+ throw new OFParseError("Wrong typeLen: Expected=0x31c04L(0x31c04L), got="+typeLen);
+ UDF value = UDF.read4Bytes(bb);
+
+ OFOxmBsnUdf6Ver13 oxmBsnUdf6Ver13 = new OFOxmBsnUdf6Ver13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmBsnUdf6Ver13);
+ return oxmBsnUdf6Ver13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmBsnUdf6Ver13Funnel FUNNEL = new OFOxmBsnUdf6Ver13Funnel();
+ static class OFOxmBsnUdf6Ver13Funnel implements Funnel<OFOxmBsnUdf6Ver13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmBsnUdf6Ver13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x31c04L
+ sink.putInt(0x31c04);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmBsnUdf6Ver13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmBsnUdf6Ver13 message) {
+ // fixed value property typeLen = 0x31c04L
+ bb.writeInt(0x31c04);
+ message.value.write4Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmBsnUdf6Ver13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmBsnUdf6Ver13 other = (OFOxmBsnUdf6Ver13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnUdf7MaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnUdf7MaskedVer13.java
new file mode 100644
index 0000000..b4249ce
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnUdf7MaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmBsnUdf7MaskedVer13 implements OFOxmBsnUdf7Masked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmBsnUdf7MaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 12;
+
+ private final static UDF DEFAULT_VALUE = UDF.ZERO;
+ private final static UDF DEFAULT_VALUE_MASK = UDF.ZERO;
+
+ // OF message fields
+ private final UDF value;
+ private final UDF mask;
+//
+ // Immutable default instance
+ final static OFOxmBsnUdf7MaskedVer13 DEFAULT = new OFOxmBsnUdf7MaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmBsnUdf7MaskedVer13(UDF value, UDF mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x31f08L;
+ }
+
+ @Override
+ public UDF getValue() {
+ return value;
+ }
+
+ @Override
+ public UDF getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<UDF> getMatchField() {
+ return MatchField.BSN_UDF7;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<UDF> getCanonical() {
+ if (UDF.NO_MASK.equals(mask)) {
+ return new OFOxmBsnUdf7Ver13(value);
+ } else if(UDF.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmBsnUdf7Masked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmBsnUdf7Masked.Builder {
+ final OFOxmBsnUdf7MaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private UDF value;
+ private boolean maskSet;
+ private UDF mask;
+
+ BuilderWithParent(OFOxmBsnUdf7MaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x31f08L;
+ }
+
+ @Override
+ public UDF getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnUdf7Masked.Builder setValue(UDF value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public UDF getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmBsnUdf7Masked.Builder setMask(UDF mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<UDF> getMatchField() {
+ return MatchField.BSN_UDF7;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<UDF> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmBsnUdf7Masked build() {
+ UDF value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ UDF mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmBsnUdf7MaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmBsnUdf7Masked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private UDF value;
+ private boolean maskSet;
+ private UDF mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x31f08L;
+ }
+
+ @Override
+ public UDF getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnUdf7Masked.Builder setValue(UDF value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public UDF getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmBsnUdf7Masked.Builder setMask(UDF mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<UDF> getMatchField() {
+ return MatchField.BSN_UDF7;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<UDF> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmBsnUdf7Masked build() {
+ UDF value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ UDF mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmBsnUdf7MaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmBsnUdf7Masked> {
+ @Override
+ public OFOxmBsnUdf7Masked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x31f08L
+ int typeLen = bb.readInt();
+ if(typeLen != 0x31f08)
+ throw new OFParseError("Wrong typeLen: Expected=0x31f08L(0x31f08L), got="+typeLen);
+ UDF value = UDF.read4Bytes(bb);
+ UDF mask = UDF.read4Bytes(bb);
+
+ OFOxmBsnUdf7MaskedVer13 oxmBsnUdf7MaskedVer13 = new OFOxmBsnUdf7MaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmBsnUdf7MaskedVer13);
+ return oxmBsnUdf7MaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmBsnUdf7MaskedVer13Funnel FUNNEL = new OFOxmBsnUdf7MaskedVer13Funnel();
+ static class OFOxmBsnUdf7MaskedVer13Funnel implements Funnel<OFOxmBsnUdf7MaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmBsnUdf7MaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x31f08L
+ sink.putInt(0x31f08);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmBsnUdf7MaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmBsnUdf7MaskedVer13 message) {
+ // fixed value property typeLen = 0x31f08L
+ bb.writeInt(0x31f08);
+ message.value.write4Bytes(bb);
+ message.mask.write4Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmBsnUdf7MaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmBsnUdf7MaskedVer13 other = (OFOxmBsnUdf7MaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnUdf7Ver13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnUdf7Ver13.java
new file mode 100644
index 0000000..5ec36b0
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnUdf7Ver13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmBsnUdf7Ver13 implements OFOxmBsnUdf7 {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmBsnUdf7Ver13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static UDF DEFAULT_VALUE = UDF.ZERO;
+
+ // OF message fields
+ private final UDF value;
+//
+ // Immutable default instance
+ final static OFOxmBsnUdf7Ver13 DEFAULT = new OFOxmBsnUdf7Ver13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmBsnUdf7Ver13(UDF value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x31e04L;
+ }
+
+ @Override
+ public UDF getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<UDF> getMatchField() {
+ return MatchField.BSN_UDF7;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<UDF> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public UDF getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmBsnUdf7.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmBsnUdf7.Builder {
+ final OFOxmBsnUdf7Ver13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private UDF value;
+
+ BuilderWithParent(OFOxmBsnUdf7Ver13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x31e04L;
+ }
+
+ @Override
+ public UDF getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnUdf7.Builder setValue(UDF value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<UDF> getMatchField() {
+ return MatchField.BSN_UDF7;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<UDF> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public UDF getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmBsnUdf7 build() {
+ UDF value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmBsnUdf7Ver13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmBsnUdf7.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private UDF value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x31e04L;
+ }
+
+ @Override
+ public UDF getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnUdf7.Builder setValue(UDF value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<UDF> getMatchField() {
+ return MatchField.BSN_UDF7;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<UDF> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public UDF getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmBsnUdf7 build() {
+ UDF value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmBsnUdf7Ver13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmBsnUdf7> {
+ @Override
+ public OFOxmBsnUdf7 readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x31e04L
+ int typeLen = bb.readInt();
+ if(typeLen != 0x31e04)
+ throw new OFParseError("Wrong typeLen: Expected=0x31e04L(0x31e04L), got="+typeLen);
+ UDF value = UDF.read4Bytes(bb);
+
+ OFOxmBsnUdf7Ver13 oxmBsnUdf7Ver13 = new OFOxmBsnUdf7Ver13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmBsnUdf7Ver13);
+ return oxmBsnUdf7Ver13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmBsnUdf7Ver13Funnel FUNNEL = new OFOxmBsnUdf7Ver13Funnel();
+ static class OFOxmBsnUdf7Ver13Funnel implements Funnel<OFOxmBsnUdf7Ver13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmBsnUdf7Ver13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x31e04L
+ sink.putInt(0x31e04);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmBsnUdf7Ver13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmBsnUdf7Ver13 message) {
+ // fixed value property typeLen = 0x31e04L
+ bb.writeInt(0x31e04);
+ message.value.write4Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmBsnUdf7Ver13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmBsnUdf7Ver13 other = (OFOxmBsnUdf7Ver13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnVlanXlatePortGroupIdMaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnVlanXlatePortGroupIdMaskedVer13.java
new file mode 100644
index 0000000..d302d1f
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnVlanXlatePortGroupIdMaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmBsnVlanXlatePortGroupIdMaskedVer13 implements OFOxmBsnVlanXlatePortGroupIdMasked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmBsnVlanXlatePortGroupIdMaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 12;
+
+ private final static ClassId DEFAULT_VALUE = ClassId.NONE;
+ private final static ClassId DEFAULT_VALUE_MASK = ClassId.NONE;
+
+ // OF message fields
+ private final ClassId value;
+ private final ClassId mask;
+//
+ // Immutable default instance
+ final static OFOxmBsnVlanXlatePortGroupIdMaskedVer13 DEFAULT = new OFOxmBsnVlanXlatePortGroupIdMaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmBsnVlanXlatePortGroupIdMaskedVer13(ClassId value, ClassId mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x32308L;
+ }
+
+ @Override
+ public ClassId getValue() {
+ return value;
+ }
+
+ @Override
+ public ClassId getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<ClassId> getMatchField() {
+ return MatchField.BSN_VLAN_XLATE_PORT_GROUP_ID;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<ClassId> getCanonical() {
+ if (ClassId.NO_MASK.equals(mask)) {
+ return new OFOxmBsnVlanXlatePortGroupIdVer13(value);
+ } else if(ClassId.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmBsnVlanXlatePortGroupIdMasked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmBsnVlanXlatePortGroupIdMasked.Builder {
+ final OFOxmBsnVlanXlatePortGroupIdMaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private ClassId value;
+ private boolean maskSet;
+ private ClassId mask;
+
+ BuilderWithParent(OFOxmBsnVlanXlatePortGroupIdMaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x32308L;
+ }
+
+ @Override
+ public ClassId getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnVlanXlatePortGroupIdMasked.Builder setValue(ClassId value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public ClassId getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmBsnVlanXlatePortGroupIdMasked.Builder setMask(ClassId mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<ClassId> getMatchField() {
+ return MatchField.BSN_VLAN_XLATE_PORT_GROUP_ID;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<ClassId> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmBsnVlanXlatePortGroupIdMasked build() {
+ ClassId value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ ClassId mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmBsnVlanXlatePortGroupIdMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmBsnVlanXlatePortGroupIdMasked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private ClassId value;
+ private boolean maskSet;
+ private ClassId mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x32308L;
+ }
+
+ @Override
+ public ClassId getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnVlanXlatePortGroupIdMasked.Builder setValue(ClassId value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public ClassId getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmBsnVlanXlatePortGroupIdMasked.Builder setMask(ClassId mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<ClassId> getMatchField() {
+ return MatchField.BSN_VLAN_XLATE_PORT_GROUP_ID;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<ClassId> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmBsnVlanXlatePortGroupIdMasked build() {
+ ClassId value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ ClassId mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmBsnVlanXlatePortGroupIdMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmBsnVlanXlatePortGroupIdMasked> {
+ @Override
+ public OFOxmBsnVlanXlatePortGroupIdMasked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x32308L
+ int typeLen = bb.readInt();
+ if(typeLen != 0x32308)
+ throw new OFParseError("Wrong typeLen: Expected=0x32308L(0x32308L), got="+typeLen);
+ ClassId value = ClassId.read4Bytes(bb);
+ ClassId mask = ClassId.read4Bytes(bb);
+
+ OFOxmBsnVlanXlatePortGroupIdMaskedVer13 oxmBsnVlanXlatePortGroupIdMaskedVer13 = new OFOxmBsnVlanXlatePortGroupIdMaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmBsnVlanXlatePortGroupIdMaskedVer13);
+ return oxmBsnVlanXlatePortGroupIdMaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmBsnVlanXlatePortGroupIdMaskedVer13Funnel FUNNEL = new OFOxmBsnVlanXlatePortGroupIdMaskedVer13Funnel();
+ static class OFOxmBsnVlanXlatePortGroupIdMaskedVer13Funnel implements Funnel<OFOxmBsnVlanXlatePortGroupIdMaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmBsnVlanXlatePortGroupIdMaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x32308L
+ sink.putInt(0x32308);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmBsnVlanXlatePortGroupIdMaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmBsnVlanXlatePortGroupIdMaskedVer13 message) {
+ // fixed value property typeLen = 0x32308L
+ bb.writeInt(0x32308);
+ message.value.write4Bytes(bb);
+ message.mask.write4Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmBsnVlanXlatePortGroupIdMaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmBsnVlanXlatePortGroupIdMaskedVer13 other = (OFOxmBsnVlanXlatePortGroupIdMaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnVlanXlatePortGroupIdVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnVlanXlatePortGroupIdVer13.java
new file mode 100644
index 0000000..b1ff79a
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnVlanXlatePortGroupIdVer13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmBsnVlanXlatePortGroupIdVer13 implements OFOxmBsnVlanXlatePortGroupId {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmBsnVlanXlatePortGroupIdVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static ClassId DEFAULT_VALUE = ClassId.NONE;
+
+ // OF message fields
+ private final ClassId value;
+//
+ // Immutable default instance
+ final static OFOxmBsnVlanXlatePortGroupIdVer13 DEFAULT = new OFOxmBsnVlanXlatePortGroupIdVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmBsnVlanXlatePortGroupIdVer13(ClassId value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x32204L;
+ }
+
+ @Override
+ public ClassId getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<ClassId> getMatchField() {
+ return MatchField.BSN_VLAN_XLATE_PORT_GROUP_ID;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<ClassId> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public ClassId getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmBsnVlanXlatePortGroupId.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmBsnVlanXlatePortGroupId.Builder {
+ final OFOxmBsnVlanXlatePortGroupIdVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private ClassId value;
+
+ BuilderWithParent(OFOxmBsnVlanXlatePortGroupIdVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x32204L;
+ }
+
+ @Override
+ public ClassId getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnVlanXlatePortGroupId.Builder setValue(ClassId value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<ClassId> getMatchField() {
+ return MatchField.BSN_VLAN_XLATE_PORT_GROUP_ID;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<ClassId> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public ClassId getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmBsnVlanXlatePortGroupId build() {
+ ClassId value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmBsnVlanXlatePortGroupIdVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmBsnVlanXlatePortGroupId.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private ClassId value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x32204L;
+ }
+
+ @Override
+ public ClassId getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnVlanXlatePortGroupId.Builder setValue(ClassId value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<ClassId> getMatchField() {
+ return MatchField.BSN_VLAN_XLATE_PORT_GROUP_ID;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<ClassId> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public ClassId getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmBsnVlanXlatePortGroupId build() {
+ ClassId value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmBsnVlanXlatePortGroupIdVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmBsnVlanXlatePortGroupId> {
+ @Override
+ public OFOxmBsnVlanXlatePortGroupId readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x32204L
+ int typeLen = bb.readInt();
+ if(typeLen != 0x32204)
+ throw new OFParseError("Wrong typeLen: Expected=0x32204L(0x32204L), got="+typeLen);
+ ClassId value = ClassId.read4Bytes(bb);
+
+ OFOxmBsnVlanXlatePortGroupIdVer13 oxmBsnVlanXlatePortGroupIdVer13 = new OFOxmBsnVlanXlatePortGroupIdVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmBsnVlanXlatePortGroupIdVer13);
+ return oxmBsnVlanXlatePortGroupIdVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmBsnVlanXlatePortGroupIdVer13Funnel FUNNEL = new OFOxmBsnVlanXlatePortGroupIdVer13Funnel();
+ static class OFOxmBsnVlanXlatePortGroupIdVer13Funnel implements Funnel<OFOxmBsnVlanXlatePortGroupIdVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmBsnVlanXlatePortGroupIdVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x32204L
+ sink.putInt(0x32204);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmBsnVlanXlatePortGroupIdVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmBsnVlanXlatePortGroupIdVer13 message) {
+ // fixed value property typeLen = 0x32204L
+ bb.writeInt(0x32204);
+ message.value.write4Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmBsnVlanXlatePortGroupIdVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmBsnVlanXlatePortGroupIdVer13 other = (OFOxmBsnVlanXlatePortGroupIdVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnVrfMaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnVrfMaskedVer13.java
new file mode 100644
index 0000000..8f1f2cb
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnVrfMaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmBsnVrfMaskedVer13 implements OFOxmBsnVrfMasked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmBsnVrfMaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 12;
+
+ private final static VRF DEFAULT_VALUE = VRF.ZERO;
+ private final static VRF DEFAULT_VALUE_MASK = VRF.ZERO;
+
+ // OF message fields
+ private final VRF value;
+ private final VRF mask;
+//
+ // Immutable default instance
+ final static OFOxmBsnVrfMaskedVer13 DEFAULT = new OFOxmBsnVrfMaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmBsnVrfMaskedVer13(VRF value, VRF mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x30508L;
+ }
+
+ @Override
+ public VRF getValue() {
+ return value;
+ }
+
+ @Override
+ public VRF getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<VRF> getMatchField() {
+ return MatchField.BSN_VRF;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<VRF> getCanonical() {
+ if (VRF.NO_MASK.equals(mask)) {
+ return new OFOxmBsnVrfVer13(value);
+ } else if(VRF.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmBsnVrfMasked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmBsnVrfMasked.Builder {
+ final OFOxmBsnVrfMaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private VRF value;
+ private boolean maskSet;
+ private VRF mask;
+
+ BuilderWithParent(OFOxmBsnVrfMaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x30508L;
+ }
+
+ @Override
+ public VRF getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnVrfMasked.Builder setValue(VRF value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public VRF getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmBsnVrfMasked.Builder setMask(VRF mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<VRF> getMatchField() {
+ return MatchField.BSN_VRF;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<VRF> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmBsnVrfMasked build() {
+ VRF value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ VRF mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmBsnVrfMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmBsnVrfMasked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private VRF value;
+ private boolean maskSet;
+ private VRF mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x30508L;
+ }
+
+ @Override
+ public VRF getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnVrfMasked.Builder setValue(VRF value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public VRF getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmBsnVrfMasked.Builder setMask(VRF mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<VRF> getMatchField() {
+ return MatchField.BSN_VRF;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<VRF> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmBsnVrfMasked build() {
+ VRF value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ VRF mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmBsnVrfMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmBsnVrfMasked> {
+ @Override
+ public OFOxmBsnVrfMasked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x30508L
+ int typeLen = bb.readInt();
+ if(typeLen != 0x30508)
+ throw new OFParseError("Wrong typeLen: Expected=0x30508L(0x30508L), got="+typeLen);
+ VRF value = VRF.read4Bytes(bb);
+ VRF mask = VRF.read4Bytes(bb);
+
+ OFOxmBsnVrfMaskedVer13 oxmBsnVrfMaskedVer13 = new OFOxmBsnVrfMaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmBsnVrfMaskedVer13);
+ return oxmBsnVrfMaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmBsnVrfMaskedVer13Funnel FUNNEL = new OFOxmBsnVrfMaskedVer13Funnel();
+ static class OFOxmBsnVrfMaskedVer13Funnel implements Funnel<OFOxmBsnVrfMaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmBsnVrfMaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x30508L
+ sink.putInt(0x30508);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmBsnVrfMaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmBsnVrfMaskedVer13 message) {
+ // fixed value property typeLen = 0x30508L
+ bb.writeInt(0x30508);
+ message.value.write4Bytes(bb);
+ message.mask.write4Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmBsnVrfMaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmBsnVrfMaskedVer13 other = (OFOxmBsnVrfMaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnVrfVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnVrfVer13.java
new file mode 100644
index 0000000..64b6ccb
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnVrfVer13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmBsnVrfVer13 implements OFOxmBsnVrf {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmBsnVrfVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static VRF DEFAULT_VALUE = VRF.ZERO;
+
+ // OF message fields
+ private final VRF value;
+//
+ // Immutable default instance
+ final static OFOxmBsnVrfVer13 DEFAULT = new OFOxmBsnVrfVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmBsnVrfVer13(VRF value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x30404L;
+ }
+
+ @Override
+ public VRF getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<VRF> getMatchField() {
+ return MatchField.BSN_VRF;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<VRF> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public VRF getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmBsnVrf.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmBsnVrf.Builder {
+ final OFOxmBsnVrfVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private VRF value;
+
+ BuilderWithParent(OFOxmBsnVrfVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x30404L;
+ }
+
+ @Override
+ public VRF getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnVrf.Builder setValue(VRF value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<VRF> getMatchField() {
+ return MatchField.BSN_VRF;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<VRF> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public VRF getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmBsnVrf build() {
+ VRF value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmBsnVrfVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmBsnVrf.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private VRF value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x30404L;
+ }
+
+ @Override
+ public VRF getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmBsnVrf.Builder setValue(VRF value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<VRF> getMatchField() {
+ return MatchField.BSN_VRF;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<VRF> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public VRF getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmBsnVrf build() {
+ VRF value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmBsnVrfVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmBsnVrf> {
+ @Override
+ public OFOxmBsnVrf readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x30404L
+ int typeLen = bb.readInt();
+ if(typeLen != 0x30404)
+ throw new OFParseError("Wrong typeLen: Expected=0x30404L(0x30404L), got="+typeLen);
+ VRF value = VRF.read4Bytes(bb);
+
+ OFOxmBsnVrfVer13 oxmBsnVrfVer13 = new OFOxmBsnVrfVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmBsnVrfVer13);
+ return oxmBsnVrfVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmBsnVrfVer13Funnel FUNNEL = new OFOxmBsnVrfVer13Funnel();
+ static class OFOxmBsnVrfVer13Funnel implements Funnel<OFOxmBsnVrfVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmBsnVrfVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x30404L
+ sink.putInt(0x30404);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmBsnVrfVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmBsnVrfVer13 message) {
+ // fixed value property typeLen = 0x30404L
+ bb.writeInt(0x30404);
+ message.value.write4Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmBsnVrfVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmBsnVrfVer13 other = (OFOxmBsnVrfVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmClassSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmClassSerializerVer13.java
new file mode 100644
index 0000000..2b33431
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmClassSerializerVer13.java
@@ -0,0 +1,84 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFOxmClass;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+
+public class OFOxmClassSerializerVer13 {
+
+ public final static short NXM_0_VAL = (short) 0x0;
+ public final static short NXM_1_VAL = (short) 0x1;
+ public final static short OPENFLOW_BASIC_VAL = (short) 0x8000;
+ public final static short EXPERIMENTER_VAL = (short) 0xffff;
+
+ public static OFOxmClass readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readShort());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, OFOxmClass e) {
+ bb.writeShort(toWireValue(e));
+ }
+
+ public static void putTo(OFOxmClass e, PrimitiveSink sink) {
+ sink.putShort(toWireValue(e));
+ }
+
+ public static OFOxmClass ofWireValue(short val) {
+ switch(val) {
+ case NXM_0_VAL:
+ return OFOxmClass.NXM_0;
+ case NXM_1_VAL:
+ return OFOxmClass.NXM_1;
+ case OPENFLOW_BASIC_VAL:
+ return OFOxmClass.OPENFLOW_BASIC;
+ case EXPERIMENTER_VAL:
+ return OFOxmClass.EXPERIMENTER;
+ default:
+ throw new IllegalArgumentException("Illegal wire value for type OFOxmClass in version 1.3: " + val);
+ }
+ }
+
+
+ public static short toWireValue(OFOxmClass e) {
+ switch(e) {
+ case NXM_0:
+ return NXM_0_VAL;
+ case NXM_1:
+ return NXM_1_VAL;
+ case OPENFLOW_BASIC:
+ return OPENFLOW_BASIC_VAL;
+ case EXPERIMENTER:
+ return EXPERIMENTER_VAL;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFOxmClass in version 1.3: " + e);
+ }
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmEthDstMaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmEthDstMaskedVer13.java
new file mode 100644
index 0000000..b35ec20
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmEthDstMaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmEthDstMaskedVer13 implements OFOxmEthDstMasked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmEthDstMaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 16;
+
+ private final static MacAddress DEFAULT_VALUE = MacAddress.NONE;
+ private final static MacAddress DEFAULT_VALUE_MASK = MacAddress.NONE;
+
+ // OF message fields
+ private final MacAddress value;
+ private final MacAddress mask;
+//
+ // Immutable default instance
+ final static OFOxmEthDstMaskedVer13 DEFAULT = new OFOxmEthDstMaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmEthDstMaskedVer13(MacAddress value, MacAddress mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x8000070cL;
+ }
+
+ @Override
+ public MacAddress getValue() {
+ return value;
+ }
+
+ @Override
+ public MacAddress getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<MacAddress> getMatchField() {
+ return MatchField.ETH_DST;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<MacAddress> getCanonical() {
+ if (MacAddress.NO_MASK.equals(mask)) {
+ return new OFOxmEthDstVer13(value);
+ } else if(MacAddress.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmEthDstMasked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmEthDstMasked.Builder {
+ final OFOxmEthDstMaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private MacAddress value;
+ private boolean maskSet;
+ private MacAddress mask;
+
+ BuilderWithParent(OFOxmEthDstMaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x8000070cL;
+ }
+
+ @Override
+ public MacAddress getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmEthDstMasked.Builder setValue(MacAddress value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MacAddress getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmEthDstMasked.Builder setMask(MacAddress mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<MacAddress> getMatchField() {
+ return MatchField.ETH_DST;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<MacAddress> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmEthDstMasked build() {
+ MacAddress value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ MacAddress mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmEthDstMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmEthDstMasked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private MacAddress value;
+ private boolean maskSet;
+ private MacAddress mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x8000070cL;
+ }
+
+ @Override
+ public MacAddress getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmEthDstMasked.Builder setValue(MacAddress value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MacAddress getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmEthDstMasked.Builder setMask(MacAddress mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<MacAddress> getMatchField() {
+ return MatchField.ETH_DST;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<MacAddress> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmEthDstMasked build() {
+ MacAddress value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ MacAddress mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmEthDstMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmEthDstMasked> {
+ @Override
+ public OFOxmEthDstMasked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x8000070cL
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x8000070c)
+ throw new OFParseError("Wrong typeLen: Expected=0x8000070cL(0x8000070cL), got="+typeLen);
+ MacAddress value = MacAddress.read6Bytes(bb);
+ MacAddress mask = MacAddress.read6Bytes(bb);
+
+ OFOxmEthDstMaskedVer13 oxmEthDstMaskedVer13 = new OFOxmEthDstMaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmEthDstMaskedVer13);
+ return oxmEthDstMaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmEthDstMaskedVer13Funnel FUNNEL = new OFOxmEthDstMaskedVer13Funnel();
+ static class OFOxmEthDstMaskedVer13Funnel implements Funnel<OFOxmEthDstMaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmEthDstMaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x8000070cL
+ sink.putInt((int) 0x8000070c);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmEthDstMaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmEthDstMaskedVer13 message) {
+ // fixed value property typeLen = 0x8000070cL
+ bb.writeInt((int) 0x8000070c);
+ message.value.write6Bytes(bb);
+ message.mask.write6Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmEthDstMaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmEthDstMaskedVer13 other = (OFOxmEthDstMaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmEthDstVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmEthDstVer13.java
new file mode 100644
index 0000000..f5d4052
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmEthDstVer13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmEthDstVer13 implements OFOxmEthDst {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmEthDstVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 10;
+
+ private final static MacAddress DEFAULT_VALUE = MacAddress.NONE;
+
+ // OF message fields
+ private final MacAddress value;
+//
+ // Immutable default instance
+ final static OFOxmEthDstVer13 DEFAULT = new OFOxmEthDstVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmEthDstVer13(MacAddress value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80000606L;
+ }
+
+ @Override
+ public MacAddress getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<MacAddress> getMatchField() {
+ return MatchField.ETH_DST;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<MacAddress> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public MacAddress getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmEthDst.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmEthDst.Builder {
+ final OFOxmEthDstVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private MacAddress value;
+
+ BuilderWithParent(OFOxmEthDstVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80000606L;
+ }
+
+ @Override
+ public MacAddress getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmEthDst.Builder setValue(MacAddress value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<MacAddress> getMatchField() {
+ return MatchField.ETH_DST;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<MacAddress> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public MacAddress getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmEthDst build() {
+ MacAddress value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmEthDstVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmEthDst.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private MacAddress value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80000606L;
+ }
+
+ @Override
+ public MacAddress getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmEthDst.Builder setValue(MacAddress value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<MacAddress> getMatchField() {
+ return MatchField.ETH_DST;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<MacAddress> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public MacAddress getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmEthDst build() {
+ MacAddress value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmEthDstVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmEthDst> {
+ @Override
+ public OFOxmEthDst readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80000606L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80000606)
+ throw new OFParseError("Wrong typeLen: Expected=0x80000606L(0x80000606L), got="+typeLen);
+ MacAddress value = MacAddress.read6Bytes(bb);
+
+ OFOxmEthDstVer13 oxmEthDstVer13 = new OFOxmEthDstVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmEthDstVer13);
+ return oxmEthDstVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmEthDstVer13Funnel FUNNEL = new OFOxmEthDstVer13Funnel();
+ static class OFOxmEthDstVer13Funnel implements Funnel<OFOxmEthDstVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmEthDstVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80000606L
+ sink.putInt((int) 0x80000606);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmEthDstVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmEthDstVer13 message) {
+ // fixed value property typeLen = 0x80000606L
+ bb.writeInt((int) 0x80000606);
+ message.value.write6Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmEthDstVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmEthDstVer13 other = (OFOxmEthDstVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmEthSrcMaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmEthSrcMaskedVer13.java
new file mode 100644
index 0000000..9f1fcbf
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmEthSrcMaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmEthSrcMaskedVer13 implements OFOxmEthSrcMasked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmEthSrcMaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 16;
+
+ private final static MacAddress DEFAULT_VALUE = MacAddress.NONE;
+ private final static MacAddress DEFAULT_VALUE_MASK = MacAddress.NONE;
+
+ // OF message fields
+ private final MacAddress value;
+ private final MacAddress mask;
+//
+ // Immutable default instance
+ final static OFOxmEthSrcMaskedVer13 DEFAULT = new OFOxmEthSrcMaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmEthSrcMaskedVer13(MacAddress value, MacAddress mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x8000090cL;
+ }
+
+ @Override
+ public MacAddress getValue() {
+ return value;
+ }
+
+ @Override
+ public MacAddress getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<MacAddress> getMatchField() {
+ return MatchField.ETH_SRC;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<MacAddress> getCanonical() {
+ if (MacAddress.NO_MASK.equals(mask)) {
+ return new OFOxmEthSrcVer13(value);
+ } else if(MacAddress.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmEthSrcMasked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmEthSrcMasked.Builder {
+ final OFOxmEthSrcMaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private MacAddress value;
+ private boolean maskSet;
+ private MacAddress mask;
+
+ BuilderWithParent(OFOxmEthSrcMaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x8000090cL;
+ }
+
+ @Override
+ public MacAddress getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmEthSrcMasked.Builder setValue(MacAddress value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MacAddress getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmEthSrcMasked.Builder setMask(MacAddress mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<MacAddress> getMatchField() {
+ return MatchField.ETH_SRC;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<MacAddress> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmEthSrcMasked build() {
+ MacAddress value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ MacAddress mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmEthSrcMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmEthSrcMasked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private MacAddress value;
+ private boolean maskSet;
+ private MacAddress mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x8000090cL;
+ }
+
+ @Override
+ public MacAddress getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmEthSrcMasked.Builder setValue(MacAddress value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MacAddress getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmEthSrcMasked.Builder setMask(MacAddress mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<MacAddress> getMatchField() {
+ return MatchField.ETH_SRC;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<MacAddress> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmEthSrcMasked build() {
+ MacAddress value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ MacAddress mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmEthSrcMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmEthSrcMasked> {
+ @Override
+ public OFOxmEthSrcMasked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x8000090cL
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x8000090c)
+ throw new OFParseError("Wrong typeLen: Expected=0x8000090cL(0x8000090cL), got="+typeLen);
+ MacAddress value = MacAddress.read6Bytes(bb);
+ MacAddress mask = MacAddress.read6Bytes(bb);
+
+ OFOxmEthSrcMaskedVer13 oxmEthSrcMaskedVer13 = new OFOxmEthSrcMaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmEthSrcMaskedVer13);
+ return oxmEthSrcMaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmEthSrcMaskedVer13Funnel FUNNEL = new OFOxmEthSrcMaskedVer13Funnel();
+ static class OFOxmEthSrcMaskedVer13Funnel implements Funnel<OFOxmEthSrcMaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmEthSrcMaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x8000090cL
+ sink.putInt((int) 0x8000090c);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmEthSrcMaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmEthSrcMaskedVer13 message) {
+ // fixed value property typeLen = 0x8000090cL
+ bb.writeInt((int) 0x8000090c);
+ message.value.write6Bytes(bb);
+ message.mask.write6Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmEthSrcMaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmEthSrcMaskedVer13 other = (OFOxmEthSrcMaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmEthSrcVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmEthSrcVer13.java
new file mode 100644
index 0000000..ff92c59
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmEthSrcVer13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmEthSrcVer13 implements OFOxmEthSrc {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmEthSrcVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 10;
+
+ private final static MacAddress DEFAULT_VALUE = MacAddress.NONE;
+
+ // OF message fields
+ private final MacAddress value;
+//
+ // Immutable default instance
+ final static OFOxmEthSrcVer13 DEFAULT = new OFOxmEthSrcVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmEthSrcVer13(MacAddress value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80000806L;
+ }
+
+ @Override
+ public MacAddress getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<MacAddress> getMatchField() {
+ return MatchField.ETH_SRC;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<MacAddress> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public MacAddress getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmEthSrc.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmEthSrc.Builder {
+ final OFOxmEthSrcVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private MacAddress value;
+
+ BuilderWithParent(OFOxmEthSrcVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80000806L;
+ }
+
+ @Override
+ public MacAddress getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmEthSrc.Builder setValue(MacAddress value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<MacAddress> getMatchField() {
+ return MatchField.ETH_SRC;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<MacAddress> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public MacAddress getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmEthSrc build() {
+ MacAddress value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmEthSrcVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmEthSrc.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private MacAddress value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80000806L;
+ }
+
+ @Override
+ public MacAddress getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmEthSrc.Builder setValue(MacAddress value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<MacAddress> getMatchField() {
+ return MatchField.ETH_SRC;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<MacAddress> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public MacAddress getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmEthSrc build() {
+ MacAddress value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmEthSrcVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmEthSrc> {
+ @Override
+ public OFOxmEthSrc readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80000806L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80000806)
+ throw new OFParseError("Wrong typeLen: Expected=0x80000806L(0x80000806L), got="+typeLen);
+ MacAddress value = MacAddress.read6Bytes(bb);
+
+ OFOxmEthSrcVer13 oxmEthSrcVer13 = new OFOxmEthSrcVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmEthSrcVer13);
+ return oxmEthSrcVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmEthSrcVer13Funnel FUNNEL = new OFOxmEthSrcVer13Funnel();
+ static class OFOxmEthSrcVer13Funnel implements Funnel<OFOxmEthSrcVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmEthSrcVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80000806L
+ sink.putInt((int) 0x80000806);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmEthSrcVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmEthSrcVer13 message) {
+ // fixed value property typeLen = 0x80000806L
+ bb.writeInt((int) 0x80000806);
+ message.value.write6Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmEthSrcVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmEthSrcVer13 other = (OFOxmEthSrcVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmEthTypeMaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmEthTypeMaskedVer13.java
new file mode 100644
index 0000000..5d4bb6e
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmEthTypeMaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmEthTypeMaskedVer13 implements OFOxmEthTypeMasked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmEthTypeMaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static EthType DEFAULT_VALUE = EthType.NONE;
+ private final static EthType DEFAULT_VALUE_MASK = EthType.NONE;
+
+ // OF message fields
+ private final EthType value;
+ private final EthType mask;
+//
+ // Immutable default instance
+ final static OFOxmEthTypeMaskedVer13 DEFAULT = new OFOxmEthTypeMaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmEthTypeMaskedVer13(EthType value, EthType mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80000b04L;
+ }
+
+ @Override
+ public EthType getValue() {
+ return value;
+ }
+
+ @Override
+ public EthType getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<EthType> getMatchField() {
+ return MatchField.ETH_TYPE;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<EthType> getCanonical() {
+ if (EthType.NO_MASK.equals(mask)) {
+ return new OFOxmEthTypeVer13(value);
+ } else if(EthType.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmEthTypeMasked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmEthTypeMasked.Builder {
+ final OFOxmEthTypeMaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private EthType value;
+ private boolean maskSet;
+ private EthType mask;
+
+ BuilderWithParent(OFOxmEthTypeMaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80000b04L;
+ }
+
+ @Override
+ public EthType getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmEthTypeMasked.Builder setValue(EthType value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public EthType getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmEthTypeMasked.Builder setMask(EthType mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<EthType> getMatchField() {
+ return MatchField.ETH_TYPE;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<EthType> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmEthTypeMasked build() {
+ EthType value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ EthType mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmEthTypeMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmEthTypeMasked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private EthType value;
+ private boolean maskSet;
+ private EthType mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80000b04L;
+ }
+
+ @Override
+ public EthType getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmEthTypeMasked.Builder setValue(EthType value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public EthType getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmEthTypeMasked.Builder setMask(EthType mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<EthType> getMatchField() {
+ return MatchField.ETH_TYPE;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<EthType> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmEthTypeMasked build() {
+ EthType value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ EthType mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmEthTypeMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmEthTypeMasked> {
+ @Override
+ public OFOxmEthTypeMasked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80000b04L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80000b04)
+ throw new OFParseError("Wrong typeLen: Expected=0x80000b04L(0x80000b04L), got="+typeLen);
+ EthType value = EthType.read2Bytes(bb);
+ EthType mask = EthType.read2Bytes(bb);
+
+ OFOxmEthTypeMaskedVer13 oxmEthTypeMaskedVer13 = new OFOxmEthTypeMaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmEthTypeMaskedVer13);
+ return oxmEthTypeMaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmEthTypeMaskedVer13Funnel FUNNEL = new OFOxmEthTypeMaskedVer13Funnel();
+ static class OFOxmEthTypeMaskedVer13Funnel implements Funnel<OFOxmEthTypeMaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmEthTypeMaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80000b04L
+ sink.putInt((int) 0x80000b04);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmEthTypeMaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmEthTypeMaskedVer13 message) {
+ // fixed value property typeLen = 0x80000b04L
+ bb.writeInt((int) 0x80000b04);
+ message.value.write2Bytes(bb);
+ message.mask.write2Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmEthTypeMaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmEthTypeMaskedVer13 other = (OFOxmEthTypeMaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmEthTypeVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmEthTypeVer13.java
new file mode 100644
index 0000000..a328c5e
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmEthTypeVer13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmEthTypeVer13 implements OFOxmEthType {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmEthTypeVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 6;
+
+ private final static EthType DEFAULT_VALUE = EthType.NONE;
+
+ // OF message fields
+ private final EthType value;
+//
+ // Immutable default instance
+ final static OFOxmEthTypeVer13 DEFAULT = new OFOxmEthTypeVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmEthTypeVer13(EthType value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80000a02L;
+ }
+
+ @Override
+ public EthType getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<EthType> getMatchField() {
+ return MatchField.ETH_TYPE;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<EthType> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public EthType getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmEthType.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmEthType.Builder {
+ final OFOxmEthTypeVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private EthType value;
+
+ BuilderWithParent(OFOxmEthTypeVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80000a02L;
+ }
+
+ @Override
+ public EthType getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmEthType.Builder setValue(EthType value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<EthType> getMatchField() {
+ return MatchField.ETH_TYPE;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<EthType> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public EthType getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmEthType build() {
+ EthType value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmEthTypeVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmEthType.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private EthType value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80000a02L;
+ }
+
+ @Override
+ public EthType getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmEthType.Builder setValue(EthType value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<EthType> getMatchField() {
+ return MatchField.ETH_TYPE;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<EthType> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public EthType getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmEthType build() {
+ EthType value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmEthTypeVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmEthType> {
+ @Override
+ public OFOxmEthType readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80000a02L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80000a02)
+ throw new OFParseError("Wrong typeLen: Expected=0x80000a02L(0x80000a02L), got="+typeLen);
+ EthType value = EthType.read2Bytes(bb);
+
+ OFOxmEthTypeVer13 oxmEthTypeVer13 = new OFOxmEthTypeVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmEthTypeVer13);
+ return oxmEthTypeVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmEthTypeVer13Funnel FUNNEL = new OFOxmEthTypeVer13Funnel();
+ static class OFOxmEthTypeVer13Funnel implements Funnel<OFOxmEthTypeVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmEthTypeVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80000a02L
+ sink.putInt((int) 0x80000a02);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmEthTypeVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmEthTypeVer13 message) {
+ // fixed value property typeLen = 0x80000a02L
+ bb.writeInt((int) 0x80000a02);
+ message.value.write2Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmEthTypeVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmEthTypeVer13 other = (OFOxmEthTypeVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIcmpv4CodeMaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIcmpv4CodeMaskedVer13.java
new file mode 100644
index 0000000..a9d8ddd
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIcmpv4CodeMaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmIcmpv4CodeMaskedVer13 implements OFOxmIcmpv4CodeMasked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmIcmpv4CodeMaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 6;
+
+ private final static ICMPv4Code DEFAULT_VALUE = ICMPv4Code.NONE;
+ private final static ICMPv4Code DEFAULT_VALUE_MASK = ICMPv4Code.NONE;
+
+ // OF message fields
+ private final ICMPv4Code value;
+ private final ICMPv4Code mask;
+//
+ // Immutable default instance
+ final static OFOxmIcmpv4CodeMaskedVer13 DEFAULT = new OFOxmIcmpv4CodeMaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmIcmpv4CodeMaskedVer13(ICMPv4Code value, ICMPv4Code mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80002902L;
+ }
+
+ @Override
+ public ICMPv4Code getValue() {
+ return value;
+ }
+
+ @Override
+ public ICMPv4Code getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<ICMPv4Code> getMatchField() {
+ return MatchField.ICMPV4_CODE;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<ICMPv4Code> getCanonical() {
+ if (ICMPv4Code.NO_MASK.equals(mask)) {
+ return new OFOxmIcmpv4CodeVer13(value);
+ } else if(ICMPv4Code.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmIcmpv4CodeMasked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmIcmpv4CodeMasked.Builder {
+ final OFOxmIcmpv4CodeMaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private ICMPv4Code value;
+ private boolean maskSet;
+ private ICMPv4Code mask;
+
+ BuilderWithParent(OFOxmIcmpv4CodeMaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80002902L;
+ }
+
+ @Override
+ public ICMPv4Code getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIcmpv4CodeMasked.Builder setValue(ICMPv4Code value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public ICMPv4Code getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmIcmpv4CodeMasked.Builder setMask(ICMPv4Code mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<ICMPv4Code> getMatchField() {
+ return MatchField.ICMPV4_CODE;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<ICMPv4Code> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmIcmpv4CodeMasked build() {
+ ICMPv4Code value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ ICMPv4Code mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmIcmpv4CodeMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmIcmpv4CodeMasked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private ICMPv4Code value;
+ private boolean maskSet;
+ private ICMPv4Code mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80002902L;
+ }
+
+ @Override
+ public ICMPv4Code getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIcmpv4CodeMasked.Builder setValue(ICMPv4Code value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public ICMPv4Code getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmIcmpv4CodeMasked.Builder setMask(ICMPv4Code mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<ICMPv4Code> getMatchField() {
+ return MatchField.ICMPV4_CODE;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<ICMPv4Code> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmIcmpv4CodeMasked build() {
+ ICMPv4Code value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ ICMPv4Code mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmIcmpv4CodeMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmIcmpv4CodeMasked> {
+ @Override
+ public OFOxmIcmpv4CodeMasked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80002902L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80002902)
+ throw new OFParseError("Wrong typeLen: Expected=0x80002902L(0x80002902L), got="+typeLen);
+ ICMPv4Code value = ICMPv4Code.readByte(bb);
+ ICMPv4Code mask = ICMPv4Code.readByte(bb);
+
+ OFOxmIcmpv4CodeMaskedVer13 oxmIcmpv4CodeMaskedVer13 = new OFOxmIcmpv4CodeMaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmIcmpv4CodeMaskedVer13);
+ return oxmIcmpv4CodeMaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmIcmpv4CodeMaskedVer13Funnel FUNNEL = new OFOxmIcmpv4CodeMaskedVer13Funnel();
+ static class OFOxmIcmpv4CodeMaskedVer13Funnel implements Funnel<OFOxmIcmpv4CodeMaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmIcmpv4CodeMaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80002902L
+ sink.putInt((int) 0x80002902);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmIcmpv4CodeMaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmIcmpv4CodeMaskedVer13 message) {
+ // fixed value property typeLen = 0x80002902L
+ bb.writeInt((int) 0x80002902);
+ message.value.writeByte(bb);
+ message.mask.writeByte(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmIcmpv4CodeMaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmIcmpv4CodeMaskedVer13 other = (OFOxmIcmpv4CodeMaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIcmpv4CodeVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIcmpv4CodeVer13.java
new file mode 100644
index 0000000..62576b4
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIcmpv4CodeVer13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmIcmpv4CodeVer13 implements OFOxmIcmpv4Code {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmIcmpv4CodeVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 5;
+
+ private final static ICMPv4Code DEFAULT_VALUE = ICMPv4Code.NONE;
+
+ // OF message fields
+ private final ICMPv4Code value;
+//
+ // Immutable default instance
+ final static OFOxmIcmpv4CodeVer13 DEFAULT = new OFOxmIcmpv4CodeVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmIcmpv4CodeVer13(ICMPv4Code value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80002801L;
+ }
+
+ @Override
+ public ICMPv4Code getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<ICMPv4Code> getMatchField() {
+ return MatchField.ICMPV4_CODE;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<ICMPv4Code> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public ICMPv4Code getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmIcmpv4Code.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmIcmpv4Code.Builder {
+ final OFOxmIcmpv4CodeVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private ICMPv4Code value;
+
+ BuilderWithParent(OFOxmIcmpv4CodeVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80002801L;
+ }
+
+ @Override
+ public ICMPv4Code getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIcmpv4Code.Builder setValue(ICMPv4Code value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<ICMPv4Code> getMatchField() {
+ return MatchField.ICMPV4_CODE;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<ICMPv4Code> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public ICMPv4Code getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmIcmpv4Code build() {
+ ICMPv4Code value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmIcmpv4CodeVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmIcmpv4Code.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private ICMPv4Code value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80002801L;
+ }
+
+ @Override
+ public ICMPv4Code getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIcmpv4Code.Builder setValue(ICMPv4Code value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<ICMPv4Code> getMatchField() {
+ return MatchField.ICMPV4_CODE;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<ICMPv4Code> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public ICMPv4Code getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmIcmpv4Code build() {
+ ICMPv4Code value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmIcmpv4CodeVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmIcmpv4Code> {
+ @Override
+ public OFOxmIcmpv4Code readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80002801L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80002801)
+ throw new OFParseError("Wrong typeLen: Expected=0x80002801L(0x80002801L), got="+typeLen);
+ ICMPv4Code value = ICMPv4Code.readByte(bb);
+
+ OFOxmIcmpv4CodeVer13 oxmIcmpv4CodeVer13 = new OFOxmIcmpv4CodeVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmIcmpv4CodeVer13);
+ return oxmIcmpv4CodeVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmIcmpv4CodeVer13Funnel FUNNEL = new OFOxmIcmpv4CodeVer13Funnel();
+ static class OFOxmIcmpv4CodeVer13Funnel implements Funnel<OFOxmIcmpv4CodeVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmIcmpv4CodeVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80002801L
+ sink.putInt((int) 0x80002801);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmIcmpv4CodeVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmIcmpv4CodeVer13 message) {
+ // fixed value property typeLen = 0x80002801L
+ bb.writeInt((int) 0x80002801);
+ message.value.writeByte(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmIcmpv4CodeVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmIcmpv4CodeVer13 other = (OFOxmIcmpv4CodeVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIcmpv4TypeMaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIcmpv4TypeMaskedVer13.java
new file mode 100644
index 0000000..020004e
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIcmpv4TypeMaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmIcmpv4TypeMaskedVer13 implements OFOxmIcmpv4TypeMasked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmIcmpv4TypeMaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 6;
+
+ private final static ICMPv4Type DEFAULT_VALUE = ICMPv4Type.NONE;
+ private final static ICMPv4Type DEFAULT_VALUE_MASK = ICMPv4Type.NONE;
+
+ // OF message fields
+ private final ICMPv4Type value;
+ private final ICMPv4Type mask;
+//
+ // Immutable default instance
+ final static OFOxmIcmpv4TypeMaskedVer13 DEFAULT = new OFOxmIcmpv4TypeMaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmIcmpv4TypeMaskedVer13(ICMPv4Type value, ICMPv4Type mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80002702L;
+ }
+
+ @Override
+ public ICMPv4Type getValue() {
+ return value;
+ }
+
+ @Override
+ public ICMPv4Type getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<ICMPv4Type> getMatchField() {
+ return MatchField.ICMPV4_TYPE;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<ICMPv4Type> getCanonical() {
+ if (ICMPv4Type.NO_MASK.equals(mask)) {
+ return new OFOxmIcmpv4TypeVer13(value);
+ } else if(ICMPv4Type.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmIcmpv4TypeMasked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmIcmpv4TypeMasked.Builder {
+ final OFOxmIcmpv4TypeMaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private ICMPv4Type value;
+ private boolean maskSet;
+ private ICMPv4Type mask;
+
+ BuilderWithParent(OFOxmIcmpv4TypeMaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80002702L;
+ }
+
+ @Override
+ public ICMPv4Type getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIcmpv4TypeMasked.Builder setValue(ICMPv4Type value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public ICMPv4Type getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmIcmpv4TypeMasked.Builder setMask(ICMPv4Type mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<ICMPv4Type> getMatchField() {
+ return MatchField.ICMPV4_TYPE;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<ICMPv4Type> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmIcmpv4TypeMasked build() {
+ ICMPv4Type value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ ICMPv4Type mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmIcmpv4TypeMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmIcmpv4TypeMasked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private ICMPv4Type value;
+ private boolean maskSet;
+ private ICMPv4Type mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80002702L;
+ }
+
+ @Override
+ public ICMPv4Type getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIcmpv4TypeMasked.Builder setValue(ICMPv4Type value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public ICMPv4Type getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmIcmpv4TypeMasked.Builder setMask(ICMPv4Type mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<ICMPv4Type> getMatchField() {
+ return MatchField.ICMPV4_TYPE;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<ICMPv4Type> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmIcmpv4TypeMasked build() {
+ ICMPv4Type value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ ICMPv4Type mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmIcmpv4TypeMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmIcmpv4TypeMasked> {
+ @Override
+ public OFOxmIcmpv4TypeMasked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80002702L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80002702)
+ throw new OFParseError("Wrong typeLen: Expected=0x80002702L(0x80002702L), got="+typeLen);
+ ICMPv4Type value = ICMPv4Type.readByte(bb);
+ ICMPv4Type mask = ICMPv4Type.readByte(bb);
+
+ OFOxmIcmpv4TypeMaskedVer13 oxmIcmpv4TypeMaskedVer13 = new OFOxmIcmpv4TypeMaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmIcmpv4TypeMaskedVer13);
+ return oxmIcmpv4TypeMaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmIcmpv4TypeMaskedVer13Funnel FUNNEL = new OFOxmIcmpv4TypeMaskedVer13Funnel();
+ static class OFOxmIcmpv4TypeMaskedVer13Funnel implements Funnel<OFOxmIcmpv4TypeMaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmIcmpv4TypeMaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80002702L
+ sink.putInt((int) 0x80002702);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmIcmpv4TypeMaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmIcmpv4TypeMaskedVer13 message) {
+ // fixed value property typeLen = 0x80002702L
+ bb.writeInt((int) 0x80002702);
+ message.value.writeByte(bb);
+ message.mask.writeByte(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmIcmpv4TypeMaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmIcmpv4TypeMaskedVer13 other = (OFOxmIcmpv4TypeMaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIcmpv4TypeVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIcmpv4TypeVer13.java
new file mode 100644
index 0000000..b14a6bc
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIcmpv4TypeVer13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmIcmpv4TypeVer13 implements OFOxmIcmpv4Type {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmIcmpv4TypeVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 5;
+
+ private final static ICMPv4Type DEFAULT_VALUE = ICMPv4Type.NONE;
+
+ // OF message fields
+ private final ICMPv4Type value;
+//
+ // Immutable default instance
+ final static OFOxmIcmpv4TypeVer13 DEFAULT = new OFOxmIcmpv4TypeVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmIcmpv4TypeVer13(ICMPv4Type value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80002601L;
+ }
+
+ @Override
+ public ICMPv4Type getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<ICMPv4Type> getMatchField() {
+ return MatchField.ICMPV4_TYPE;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<ICMPv4Type> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public ICMPv4Type getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmIcmpv4Type.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmIcmpv4Type.Builder {
+ final OFOxmIcmpv4TypeVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private ICMPv4Type value;
+
+ BuilderWithParent(OFOxmIcmpv4TypeVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80002601L;
+ }
+
+ @Override
+ public ICMPv4Type getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIcmpv4Type.Builder setValue(ICMPv4Type value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<ICMPv4Type> getMatchField() {
+ return MatchField.ICMPV4_TYPE;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<ICMPv4Type> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public ICMPv4Type getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmIcmpv4Type build() {
+ ICMPv4Type value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmIcmpv4TypeVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmIcmpv4Type.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private ICMPv4Type value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80002601L;
+ }
+
+ @Override
+ public ICMPv4Type getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIcmpv4Type.Builder setValue(ICMPv4Type value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<ICMPv4Type> getMatchField() {
+ return MatchField.ICMPV4_TYPE;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<ICMPv4Type> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public ICMPv4Type getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmIcmpv4Type build() {
+ ICMPv4Type value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmIcmpv4TypeVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmIcmpv4Type> {
+ @Override
+ public OFOxmIcmpv4Type readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80002601L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80002601)
+ throw new OFParseError("Wrong typeLen: Expected=0x80002601L(0x80002601L), got="+typeLen);
+ ICMPv4Type value = ICMPv4Type.readByte(bb);
+
+ OFOxmIcmpv4TypeVer13 oxmIcmpv4TypeVer13 = new OFOxmIcmpv4TypeVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmIcmpv4TypeVer13);
+ return oxmIcmpv4TypeVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmIcmpv4TypeVer13Funnel FUNNEL = new OFOxmIcmpv4TypeVer13Funnel();
+ static class OFOxmIcmpv4TypeVer13Funnel implements Funnel<OFOxmIcmpv4TypeVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmIcmpv4TypeVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80002601L
+ sink.putInt((int) 0x80002601);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmIcmpv4TypeVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmIcmpv4TypeVer13 message) {
+ // fixed value property typeLen = 0x80002601L
+ bb.writeInt((int) 0x80002601);
+ message.value.writeByte(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmIcmpv4TypeVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmIcmpv4TypeVer13 other = (OFOxmIcmpv4TypeVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIcmpv6CodeMaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIcmpv6CodeMaskedVer13.java
new file mode 100644
index 0000000..3da5885
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIcmpv6CodeMaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmIcmpv6CodeMaskedVer13 implements OFOxmIcmpv6CodeMasked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmIcmpv6CodeMaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 6;
+
+ private final static U8 DEFAULT_VALUE = U8.ZERO;
+ private final static U8 DEFAULT_VALUE_MASK = U8.ZERO;
+
+ // OF message fields
+ private final U8 value;
+ private final U8 mask;
+//
+ // Immutable default instance
+ final static OFOxmIcmpv6CodeMaskedVer13 DEFAULT = new OFOxmIcmpv6CodeMaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmIcmpv6CodeMaskedVer13(U8 value, U8 mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80003d02L;
+ }
+
+ @Override
+ public U8 getValue() {
+ return value;
+ }
+
+ @Override
+ public U8 getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<U8> getMatchField() {
+ return MatchField.ICMPV6_CODE;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<U8> getCanonical() {
+ if (U8.NO_MASK.equals(mask)) {
+ return new OFOxmIcmpv6CodeVer13(value);
+ } else if(U8.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmIcmpv6CodeMasked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmIcmpv6CodeMasked.Builder {
+ final OFOxmIcmpv6CodeMaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private U8 value;
+ private boolean maskSet;
+ private U8 mask;
+
+ BuilderWithParent(OFOxmIcmpv6CodeMaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80003d02L;
+ }
+
+ @Override
+ public U8 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIcmpv6CodeMasked.Builder setValue(U8 value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public U8 getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmIcmpv6CodeMasked.Builder setMask(U8 mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<U8> getMatchField() {
+ return MatchField.ICMPV6_CODE;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<U8> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmIcmpv6CodeMasked build() {
+ U8 value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ U8 mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmIcmpv6CodeMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmIcmpv6CodeMasked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private U8 value;
+ private boolean maskSet;
+ private U8 mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80003d02L;
+ }
+
+ @Override
+ public U8 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIcmpv6CodeMasked.Builder setValue(U8 value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public U8 getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmIcmpv6CodeMasked.Builder setMask(U8 mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<U8> getMatchField() {
+ return MatchField.ICMPV6_CODE;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<U8> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmIcmpv6CodeMasked build() {
+ U8 value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ U8 mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmIcmpv6CodeMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmIcmpv6CodeMasked> {
+ @Override
+ public OFOxmIcmpv6CodeMasked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80003d02L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80003d02)
+ throw new OFParseError("Wrong typeLen: Expected=0x80003d02L(0x80003d02L), got="+typeLen);
+ U8 value = U8.of(bb.readByte());
+ U8 mask = U8.of(bb.readByte());
+
+ OFOxmIcmpv6CodeMaskedVer13 oxmIcmpv6CodeMaskedVer13 = new OFOxmIcmpv6CodeMaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmIcmpv6CodeMaskedVer13);
+ return oxmIcmpv6CodeMaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmIcmpv6CodeMaskedVer13Funnel FUNNEL = new OFOxmIcmpv6CodeMaskedVer13Funnel();
+ static class OFOxmIcmpv6CodeMaskedVer13Funnel implements Funnel<OFOxmIcmpv6CodeMaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmIcmpv6CodeMaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80003d02L
+ sink.putInt((int) 0x80003d02);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmIcmpv6CodeMaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmIcmpv6CodeMaskedVer13 message) {
+ // fixed value property typeLen = 0x80003d02L
+ bb.writeInt((int) 0x80003d02);
+ bb.writeByte(message.value.getRaw());
+ bb.writeByte(message.mask.getRaw());
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmIcmpv6CodeMaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmIcmpv6CodeMaskedVer13 other = (OFOxmIcmpv6CodeMaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIcmpv6CodeVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIcmpv6CodeVer13.java
new file mode 100644
index 0000000..3e52c19
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIcmpv6CodeVer13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmIcmpv6CodeVer13 implements OFOxmIcmpv6Code {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmIcmpv6CodeVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 5;
+
+ private final static U8 DEFAULT_VALUE = U8.ZERO;
+
+ // OF message fields
+ private final U8 value;
+//
+ // Immutable default instance
+ final static OFOxmIcmpv6CodeVer13 DEFAULT = new OFOxmIcmpv6CodeVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmIcmpv6CodeVer13(U8 value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80003c01L;
+ }
+
+ @Override
+ public U8 getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<U8> getMatchField() {
+ return MatchField.ICMPV6_CODE;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<U8> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public U8 getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmIcmpv6Code.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmIcmpv6Code.Builder {
+ final OFOxmIcmpv6CodeVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private U8 value;
+
+ BuilderWithParent(OFOxmIcmpv6CodeVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80003c01L;
+ }
+
+ @Override
+ public U8 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIcmpv6Code.Builder setValue(U8 value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<U8> getMatchField() {
+ return MatchField.ICMPV6_CODE;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<U8> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public U8 getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmIcmpv6Code build() {
+ U8 value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmIcmpv6CodeVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmIcmpv6Code.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private U8 value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80003c01L;
+ }
+
+ @Override
+ public U8 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIcmpv6Code.Builder setValue(U8 value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<U8> getMatchField() {
+ return MatchField.ICMPV6_CODE;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<U8> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public U8 getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmIcmpv6Code build() {
+ U8 value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmIcmpv6CodeVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmIcmpv6Code> {
+ @Override
+ public OFOxmIcmpv6Code readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80003c01L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80003c01)
+ throw new OFParseError("Wrong typeLen: Expected=0x80003c01L(0x80003c01L), got="+typeLen);
+ U8 value = U8.of(bb.readByte());
+
+ OFOxmIcmpv6CodeVer13 oxmIcmpv6CodeVer13 = new OFOxmIcmpv6CodeVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmIcmpv6CodeVer13);
+ return oxmIcmpv6CodeVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmIcmpv6CodeVer13Funnel FUNNEL = new OFOxmIcmpv6CodeVer13Funnel();
+ static class OFOxmIcmpv6CodeVer13Funnel implements Funnel<OFOxmIcmpv6CodeVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmIcmpv6CodeVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80003c01L
+ sink.putInt((int) 0x80003c01);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmIcmpv6CodeVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmIcmpv6CodeVer13 message) {
+ // fixed value property typeLen = 0x80003c01L
+ bb.writeInt((int) 0x80003c01);
+ bb.writeByte(message.value.getRaw());
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmIcmpv6CodeVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmIcmpv6CodeVer13 other = (OFOxmIcmpv6CodeVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIcmpv6TypeMaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIcmpv6TypeMaskedVer13.java
new file mode 100644
index 0000000..cfd4494
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIcmpv6TypeMaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmIcmpv6TypeMaskedVer13 implements OFOxmIcmpv6TypeMasked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmIcmpv6TypeMaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 6;
+
+ private final static U8 DEFAULT_VALUE = U8.ZERO;
+ private final static U8 DEFAULT_VALUE_MASK = U8.ZERO;
+
+ // OF message fields
+ private final U8 value;
+ private final U8 mask;
+//
+ // Immutable default instance
+ final static OFOxmIcmpv6TypeMaskedVer13 DEFAULT = new OFOxmIcmpv6TypeMaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmIcmpv6TypeMaskedVer13(U8 value, U8 mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80003b02L;
+ }
+
+ @Override
+ public U8 getValue() {
+ return value;
+ }
+
+ @Override
+ public U8 getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<U8> getMatchField() {
+ return MatchField.ICMPV6_TYPE;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<U8> getCanonical() {
+ if (U8.NO_MASK.equals(mask)) {
+ return new OFOxmIcmpv6TypeVer13(value);
+ } else if(U8.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmIcmpv6TypeMasked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmIcmpv6TypeMasked.Builder {
+ final OFOxmIcmpv6TypeMaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private U8 value;
+ private boolean maskSet;
+ private U8 mask;
+
+ BuilderWithParent(OFOxmIcmpv6TypeMaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80003b02L;
+ }
+
+ @Override
+ public U8 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIcmpv6TypeMasked.Builder setValue(U8 value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public U8 getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmIcmpv6TypeMasked.Builder setMask(U8 mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<U8> getMatchField() {
+ return MatchField.ICMPV6_TYPE;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<U8> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmIcmpv6TypeMasked build() {
+ U8 value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ U8 mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmIcmpv6TypeMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmIcmpv6TypeMasked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private U8 value;
+ private boolean maskSet;
+ private U8 mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80003b02L;
+ }
+
+ @Override
+ public U8 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIcmpv6TypeMasked.Builder setValue(U8 value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public U8 getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmIcmpv6TypeMasked.Builder setMask(U8 mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<U8> getMatchField() {
+ return MatchField.ICMPV6_TYPE;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<U8> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmIcmpv6TypeMasked build() {
+ U8 value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ U8 mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmIcmpv6TypeMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmIcmpv6TypeMasked> {
+ @Override
+ public OFOxmIcmpv6TypeMasked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80003b02L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80003b02)
+ throw new OFParseError("Wrong typeLen: Expected=0x80003b02L(0x80003b02L), got="+typeLen);
+ U8 value = U8.of(bb.readByte());
+ U8 mask = U8.of(bb.readByte());
+
+ OFOxmIcmpv6TypeMaskedVer13 oxmIcmpv6TypeMaskedVer13 = new OFOxmIcmpv6TypeMaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmIcmpv6TypeMaskedVer13);
+ return oxmIcmpv6TypeMaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmIcmpv6TypeMaskedVer13Funnel FUNNEL = new OFOxmIcmpv6TypeMaskedVer13Funnel();
+ static class OFOxmIcmpv6TypeMaskedVer13Funnel implements Funnel<OFOxmIcmpv6TypeMaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmIcmpv6TypeMaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80003b02L
+ sink.putInt((int) 0x80003b02);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmIcmpv6TypeMaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmIcmpv6TypeMaskedVer13 message) {
+ // fixed value property typeLen = 0x80003b02L
+ bb.writeInt((int) 0x80003b02);
+ bb.writeByte(message.value.getRaw());
+ bb.writeByte(message.mask.getRaw());
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmIcmpv6TypeMaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmIcmpv6TypeMaskedVer13 other = (OFOxmIcmpv6TypeMaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIcmpv6TypeVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIcmpv6TypeVer13.java
new file mode 100644
index 0000000..aab7955
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIcmpv6TypeVer13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmIcmpv6TypeVer13 implements OFOxmIcmpv6Type {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmIcmpv6TypeVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 5;
+
+ private final static U8 DEFAULT_VALUE = U8.ZERO;
+
+ // OF message fields
+ private final U8 value;
+//
+ // Immutable default instance
+ final static OFOxmIcmpv6TypeVer13 DEFAULT = new OFOxmIcmpv6TypeVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmIcmpv6TypeVer13(U8 value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80003a01L;
+ }
+
+ @Override
+ public U8 getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<U8> getMatchField() {
+ return MatchField.ICMPV6_TYPE;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<U8> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public U8 getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmIcmpv6Type.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmIcmpv6Type.Builder {
+ final OFOxmIcmpv6TypeVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private U8 value;
+
+ BuilderWithParent(OFOxmIcmpv6TypeVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80003a01L;
+ }
+
+ @Override
+ public U8 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIcmpv6Type.Builder setValue(U8 value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<U8> getMatchField() {
+ return MatchField.ICMPV6_TYPE;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<U8> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public U8 getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmIcmpv6Type build() {
+ U8 value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmIcmpv6TypeVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmIcmpv6Type.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private U8 value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80003a01L;
+ }
+
+ @Override
+ public U8 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIcmpv6Type.Builder setValue(U8 value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<U8> getMatchField() {
+ return MatchField.ICMPV6_TYPE;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<U8> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public U8 getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmIcmpv6Type build() {
+ U8 value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmIcmpv6TypeVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmIcmpv6Type> {
+ @Override
+ public OFOxmIcmpv6Type readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80003a01L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80003a01)
+ throw new OFParseError("Wrong typeLen: Expected=0x80003a01L(0x80003a01L), got="+typeLen);
+ U8 value = U8.of(bb.readByte());
+
+ OFOxmIcmpv6TypeVer13 oxmIcmpv6TypeVer13 = new OFOxmIcmpv6TypeVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmIcmpv6TypeVer13);
+ return oxmIcmpv6TypeVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmIcmpv6TypeVer13Funnel FUNNEL = new OFOxmIcmpv6TypeVer13Funnel();
+ static class OFOxmIcmpv6TypeVer13Funnel implements Funnel<OFOxmIcmpv6TypeVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmIcmpv6TypeVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80003a01L
+ sink.putInt((int) 0x80003a01);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmIcmpv6TypeVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmIcmpv6TypeVer13 message) {
+ // fixed value property typeLen = 0x80003a01L
+ bb.writeInt((int) 0x80003a01);
+ bb.writeByte(message.value.getRaw());
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmIcmpv6TypeVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmIcmpv6TypeVer13 other = (OFOxmIcmpv6TypeVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmInPhyPortMaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmInPhyPortMaskedVer13.java
new file mode 100644
index 0000000..c1ddbe7
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmInPhyPortMaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmInPhyPortMaskedVer13 implements OFOxmInPhyPortMasked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmInPhyPortMaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 12;
+
+ private final static OFPort DEFAULT_VALUE = OFPort.ANY;
+ private final static OFPort DEFAULT_VALUE_MASK = OFPort.ANY;
+
+ // OF message fields
+ private final OFPort value;
+ private final OFPort mask;
+//
+ // Immutable default instance
+ final static OFOxmInPhyPortMaskedVer13 DEFAULT = new OFOxmInPhyPortMaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmInPhyPortMaskedVer13(OFPort value, OFPort mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80000308L;
+ }
+
+ @Override
+ public OFPort getValue() {
+ return value;
+ }
+
+ @Override
+ public OFPort getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<OFPort> getMatchField() {
+ return MatchField.IN_PHY_PORT;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<OFPort> getCanonical() {
+ if (OFPort.NO_MASK.equals(mask)) {
+ return new OFOxmInPhyPortVer13(value);
+ } else if(OFPort.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmInPhyPortMasked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmInPhyPortMasked.Builder {
+ final OFOxmInPhyPortMaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private OFPort value;
+ private boolean maskSet;
+ private OFPort mask;
+
+ BuilderWithParent(OFOxmInPhyPortMaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80000308L;
+ }
+
+ @Override
+ public OFPort getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmInPhyPortMasked.Builder setValue(OFPort value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmInPhyPortMasked.Builder setMask(OFPort mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<OFPort> getMatchField() {
+ return MatchField.IN_PHY_PORT;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<OFPort> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmInPhyPortMasked build() {
+ OFPort value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ OFPort mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmInPhyPortMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmInPhyPortMasked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private OFPort value;
+ private boolean maskSet;
+ private OFPort mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80000308L;
+ }
+
+ @Override
+ public OFPort getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmInPhyPortMasked.Builder setValue(OFPort value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmInPhyPortMasked.Builder setMask(OFPort mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<OFPort> getMatchField() {
+ return MatchField.IN_PHY_PORT;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<OFPort> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmInPhyPortMasked build() {
+ OFPort value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ OFPort mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmInPhyPortMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmInPhyPortMasked> {
+ @Override
+ public OFOxmInPhyPortMasked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80000308L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80000308)
+ throw new OFParseError("Wrong typeLen: Expected=0x80000308L(0x80000308L), got="+typeLen);
+ OFPort value = OFPort.read4Bytes(bb);
+ OFPort mask = OFPort.read4Bytes(bb);
+
+ OFOxmInPhyPortMaskedVer13 oxmInPhyPortMaskedVer13 = new OFOxmInPhyPortMaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmInPhyPortMaskedVer13);
+ return oxmInPhyPortMaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmInPhyPortMaskedVer13Funnel FUNNEL = new OFOxmInPhyPortMaskedVer13Funnel();
+ static class OFOxmInPhyPortMaskedVer13Funnel implements Funnel<OFOxmInPhyPortMaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmInPhyPortMaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80000308L
+ sink.putInt((int) 0x80000308);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmInPhyPortMaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmInPhyPortMaskedVer13 message) {
+ // fixed value property typeLen = 0x80000308L
+ bb.writeInt((int) 0x80000308);
+ message.value.write4Bytes(bb);
+ message.mask.write4Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmInPhyPortMaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmInPhyPortMaskedVer13 other = (OFOxmInPhyPortMaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmInPhyPortVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmInPhyPortVer13.java
new file mode 100644
index 0000000..36c82d7
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmInPhyPortVer13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmInPhyPortVer13 implements OFOxmInPhyPort {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmInPhyPortVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static OFPort DEFAULT_VALUE = OFPort.ANY;
+
+ // OF message fields
+ private final OFPort value;
+//
+ // Immutable default instance
+ final static OFOxmInPhyPortVer13 DEFAULT = new OFOxmInPhyPortVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmInPhyPortVer13(OFPort value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80000204L;
+ }
+
+ @Override
+ public OFPort getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<OFPort> getMatchField() {
+ return MatchField.IN_PHY_PORT;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<OFPort> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public OFPort getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmInPhyPort.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmInPhyPort.Builder {
+ final OFOxmInPhyPortVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private OFPort value;
+
+ BuilderWithParent(OFOxmInPhyPortVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80000204L;
+ }
+
+ @Override
+ public OFPort getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmInPhyPort.Builder setValue(OFPort value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<OFPort> getMatchField() {
+ return MatchField.IN_PHY_PORT;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<OFPort> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFPort getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmInPhyPort build() {
+ OFPort value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmInPhyPortVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmInPhyPort.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private OFPort value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80000204L;
+ }
+
+ @Override
+ public OFPort getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmInPhyPort.Builder setValue(OFPort value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<OFPort> getMatchField() {
+ return MatchField.IN_PHY_PORT;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<OFPort> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFPort getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmInPhyPort build() {
+ OFPort value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmInPhyPortVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmInPhyPort> {
+ @Override
+ public OFOxmInPhyPort readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80000204L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80000204)
+ throw new OFParseError("Wrong typeLen: Expected=0x80000204L(0x80000204L), got="+typeLen);
+ OFPort value = OFPort.read4Bytes(bb);
+
+ OFOxmInPhyPortVer13 oxmInPhyPortVer13 = new OFOxmInPhyPortVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmInPhyPortVer13);
+ return oxmInPhyPortVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmInPhyPortVer13Funnel FUNNEL = new OFOxmInPhyPortVer13Funnel();
+ static class OFOxmInPhyPortVer13Funnel implements Funnel<OFOxmInPhyPortVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmInPhyPortVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80000204L
+ sink.putInt((int) 0x80000204);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmInPhyPortVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmInPhyPortVer13 message) {
+ // fixed value property typeLen = 0x80000204L
+ bb.writeInt((int) 0x80000204);
+ message.value.write4Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmInPhyPortVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmInPhyPortVer13 other = (OFOxmInPhyPortVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmInPortMaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmInPortMaskedVer13.java
new file mode 100644
index 0000000..cdef18a
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmInPortMaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmInPortMaskedVer13 implements OFOxmInPortMasked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmInPortMaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 12;
+
+ private final static OFPort DEFAULT_VALUE = OFPort.ANY;
+ private final static OFPort DEFAULT_VALUE_MASK = OFPort.ANY;
+
+ // OF message fields
+ private final OFPort value;
+ private final OFPort mask;
+//
+ // Immutable default instance
+ final static OFOxmInPortMaskedVer13 DEFAULT = new OFOxmInPortMaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmInPortMaskedVer13(OFPort value, OFPort mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80000108L;
+ }
+
+ @Override
+ public OFPort getValue() {
+ return value;
+ }
+
+ @Override
+ public OFPort getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<OFPort> getMatchField() {
+ return MatchField.IN_PORT;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<OFPort> getCanonical() {
+ if (OFPort.NO_MASK.equals(mask)) {
+ return new OFOxmInPortVer13(value);
+ } else if(OFPort.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmInPortMasked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmInPortMasked.Builder {
+ final OFOxmInPortMaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private OFPort value;
+ private boolean maskSet;
+ private OFPort mask;
+
+ BuilderWithParent(OFOxmInPortMaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80000108L;
+ }
+
+ @Override
+ public OFPort getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmInPortMasked.Builder setValue(OFPort value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmInPortMasked.Builder setMask(OFPort mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<OFPort> getMatchField() {
+ return MatchField.IN_PORT;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<OFPort> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmInPortMasked build() {
+ OFPort value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ OFPort mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmInPortMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmInPortMasked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private OFPort value;
+ private boolean maskSet;
+ private OFPort mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80000108L;
+ }
+
+ @Override
+ public OFPort getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmInPortMasked.Builder setValue(OFPort value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmInPortMasked.Builder setMask(OFPort mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<OFPort> getMatchField() {
+ return MatchField.IN_PORT;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<OFPort> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmInPortMasked build() {
+ OFPort value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ OFPort mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmInPortMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmInPortMasked> {
+ @Override
+ public OFOxmInPortMasked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80000108L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80000108)
+ throw new OFParseError("Wrong typeLen: Expected=0x80000108L(0x80000108L), got="+typeLen);
+ OFPort value = OFPort.read4Bytes(bb);
+ OFPort mask = OFPort.read4Bytes(bb);
+
+ OFOxmInPortMaskedVer13 oxmInPortMaskedVer13 = new OFOxmInPortMaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmInPortMaskedVer13);
+ return oxmInPortMaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmInPortMaskedVer13Funnel FUNNEL = new OFOxmInPortMaskedVer13Funnel();
+ static class OFOxmInPortMaskedVer13Funnel implements Funnel<OFOxmInPortMaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmInPortMaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80000108L
+ sink.putInt((int) 0x80000108);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmInPortMaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmInPortMaskedVer13 message) {
+ // fixed value property typeLen = 0x80000108L
+ bb.writeInt((int) 0x80000108);
+ message.value.write4Bytes(bb);
+ message.mask.write4Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmInPortMaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmInPortMaskedVer13 other = (OFOxmInPortMaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmInPortVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmInPortVer13.java
new file mode 100644
index 0000000..046bdf2
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmInPortVer13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmInPortVer13 implements OFOxmInPort {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmInPortVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static OFPort DEFAULT_VALUE = OFPort.ANY;
+
+ // OF message fields
+ private final OFPort value;
+//
+ // Immutable default instance
+ final static OFOxmInPortVer13 DEFAULT = new OFOxmInPortVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmInPortVer13(OFPort value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80000004L;
+ }
+
+ @Override
+ public OFPort getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<OFPort> getMatchField() {
+ return MatchField.IN_PORT;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<OFPort> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public OFPort getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmInPort.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmInPort.Builder {
+ final OFOxmInPortVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private OFPort value;
+
+ BuilderWithParent(OFOxmInPortVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80000004L;
+ }
+
+ @Override
+ public OFPort getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmInPort.Builder setValue(OFPort value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<OFPort> getMatchField() {
+ return MatchField.IN_PORT;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<OFPort> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFPort getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmInPort build() {
+ OFPort value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmInPortVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmInPort.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private OFPort value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80000004L;
+ }
+
+ @Override
+ public OFPort getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmInPort.Builder setValue(OFPort value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<OFPort> getMatchField() {
+ return MatchField.IN_PORT;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<OFPort> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFPort getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmInPort build() {
+ OFPort value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmInPortVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmInPort> {
+ @Override
+ public OFOxmInPort readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80000004L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80000004)
+ throw new OFParseError("Wrong typeLen: Expected=0x80000004L(0x80000004L), got="+typeLen);
+ OFPort value = OFPort.read4Bytes(bb);
+
+ OFOxmInPortVer13 oxmInPortVer13 = new OFOxmInPortVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmInPortVer13);
+ return oxmInPortVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmInPortVer13Funnel FUNNEL = new OFOxmInPortVer13Funnel();
+ static class OFOxmInPortVer13Funnel implements Funnel<OFOxmInPortVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmInPortVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80000004L
+ sink.putInt((int) 0x80000004);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmInPortVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmInPortVer13 message) {
+ // fixed value property typeLen = 0x80000004L
+ bb.writeInt((int) 0x80000004);
+ message.value.write4Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmInPortVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmInPortVer13 other = (OFOxmInPortVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpDscpMaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpDscpMaskedVer13.java
new file mode 100644
index 0000000..f5bffde
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpDscpMaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmIpDscpMaskedVer13 implements OFOxmIpDscpMasked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmIpDscpMaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 6;
+
+ private final static IpDscp DEFAULT_VALUE = IpDscp.NONE;
+ private final static IpDscp DEFAULT_VALUE_MASK = IpDscp.NONE;
+
+ // OF message fields
+ private final IpDscp value;
+ private final IpDscp mask;
+//
+ // Immutable default instance
+ final static OFOxmIpDscpMaskedVer13 DEFAULT = new OFOxmIpDscpMaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmIpDscpMaskedVer13(IpDscp value, IpDscp mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80001102L;
+ }
+
+ @Override
+ public IpDscp getValue() {
+ return value;
+ }
+
+ @Override
+ public IpDscp getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<IpDscp> getMatchField() {
+ return MatchField.IP_DSCP;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<IpDscp> getCanonical() {
+ if (IpDscp.NO_MASK.equals(mask)) {
+ return new OFOxmIpDscpVer13(value);
+ } else if(IpDscp.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmIpDscpMasked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmIpDscpMasked.Builder {
+ final OFOxmIpDscpMaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private IpDscp value;
+ private boolean maskSet;
+ private IpDscp mask;
+
+ BuilderWithParent(OFOxmIpDscpMaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80001102L;
+ }
+
+ @Override
+ public IpDscp getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIpDscpMasked.Builder setValue(IpDscp value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public IpDscp getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmIpDscpMasked.Builder setMask(IpDscp mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<IpDscp> getMatchField() {
+ return MatchField.IP_DSCP;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<IpDscp> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmIpDscpMasked build() {
+ IpDscp value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ IpDscp mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmIpDscpMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmIpDscpMasked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private IpDscp value;
+ private boolean maskSet;
+ private IpDscp mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80001102L;
+ }
+
+ @Override
+ public IpDscp getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIpDscpMasked.Builder setValue(IpDscp value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public IpDscp getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmIpDscpMasked.Builder setMask(IpDscp mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<IpDscp> getMatchField() {
+ return MatchField.IP_DSCP;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<IpDscp> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmIpDscpMasked build() {
+ IpDscp value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ IpDscp mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmIpDscpMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmIpDscpMasked> {
+ @Override
+ public OFOxmIpDscpMasked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80001102L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80001102)
+ throw new OFParseError("Wrong typeLen: Expected=0x80001102L(0x80001102L), got="+typeLen);
+ IpDscp value = IpDscp.readByte(bb);
+ IpDscp mask = IpDscp.readByte(bb);
+
+ OFOxmIpDscpMaskedVer13 oxmIpDscpMaskedVer13 = new OFOxmIpDscpMaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmIpDscpMaskedVer13);
+ return oxmIpDscpMaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmIpDscpMaskedVer13Funnel FUNNEL = new OFOxmIpDscpMaskedVer13Funnel();
+ static class OFOxmIpDscpMaskedVer13Funnel implements Funnel<OFOxmIpDscpMaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmIpDscpMaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80001102L
+ sink.putInt((int) 0x80001102);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmIpDscpMaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmIpDscpMaskedVer13 message) {
+ // fixed value property typeLen = 0x80001102L
+ bb.writeInt((int) 0x80001102);
+ message.value.writeByte(bb);
+ message.mask.writeByte(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmIpDscpMaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmIpDscpMaskedVer13 other = (OFOxmIpDscpMaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpDscpVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpDscpVer13.java
new file mode 100644
index 0000000..a0b6786
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpDscpVer13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmIpDscpVer13 implements OFOxmIpDscp {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmIpDscpVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 5;
+
+ private final static IpDscp DEFAULT_VALUE = IpDscp.NONE;
+
+ // OF message fields
+ private final IpDscp value;
+//
+ // Immutable default instance
+ final static OFOxmIpDscpVer13 DEFAULT = new OFOxmIpDscpVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmIpDscpVer13(IpDscp value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80001001L;
+ }
+
+ @Override
+ public IpDscp getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<IpDscp> getMatchField() {
+ return MatchField.IP_DSCP;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<IpDscp> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public IpDscp getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmIpDscp.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmIpDscp.Builder {
+ final OFOxmIpDscpVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private IpDscp value;
+
+ BuilderWithParent(OFOxmIpDscpVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80001001L;
+ }
+
+ @Override
+ public IpDscp getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIpDscp.Builder setValue(IpDscp value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<IpDscp> getMatchField() {
+ return MatchField.IP_DSCP;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<IpDscp> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public IpDscp getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmIpDscp build() {
+ IpDscp value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmIpDscpVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmIpDscp.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private IpDscp value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80001001L;
+ }
+
+ @Override
+ public IpDscp getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIpDscp.Builder setValue(IpDscp value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<IpDscp> getMatchField() {
+ return MatchField.IP_DSCP;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<IpDscp> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public IpDscp getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmIpDscp build() {
+ IpDscp value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmIpDscpVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmIpDscp> {
+ @Override
+ public OFOxmIpDscp readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80001001L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80001001)
+ throw new OFParseError("Wrong typeLen: Expected=0x80001001L(0x80001001L), got="+typeLen);
+ IpDscp value = IpDscp.readByte(bb);
+
+ OFOxmIpDscpVer13 oxmIpDscpVer13 = new OFOxmIpDscpVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmIpDscpVer13);
+ return oxmIpDscpVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmIpDscpVer13Funnel FUNNEL = new OFOxmIpDscpVer13Funnel();
+ static class OFOxmIpDscpVer13Funnel implements Funnel<OFOxmIpDscpVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmIpDscpVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80001001L
+ sink.putInt((int) 0x80001001);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmIpDscpVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmIpDscpVer13 message) {
+ // fixed value property typeLen = 0x80001001L
+ bb.writeInt((int) 0x80001001);
+ message.value.writeByte(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmIpDscpVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmIpDscpVer13 other = (OFOxmIpDscpVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpEcnMaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpEcnMaskedVer13.java
new file mode 100644
index 0000000..0906f6c
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpEcnMaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmIpEcnMaskedVer13 implements OFOxmIpEcnMasked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmIpEcnMaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 6;
+
+ private final static IpEcn DEFAULT_VALUE = IpEcn.NONE;
+ private final static IpEcn DEFAULT_VALUE_MASK = IpEcn.NONE;
+
+ // OF message fields
+ private final IpEcn value;
+ private final IpEcn mask;
+//
+ // Immutable default instance
+ final static OFOxmIpEcnMaskedVer13 DEFAULT = new OFOxmIpEcnMaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmIpEcnMaskedVer13(IpEcn value, IpEcn mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80001302L;
+ }
+
+ @Override
+ public IpEcn getValue() {
+ return value;
+ }
+
+ @Override
+ public IpEcn getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<IpEcn> getMatchField() {
+ return MatchField.IP_ECN;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<IpEcn> getCanonical() {
+ if (IpEcn.NO_MASK.equals(mask)) {
+ return new OFOxmIpEcnVer13(value);
+ } else if(IpEcn.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmIpEcnMasked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmIpEcnMasked.Builder {
+ final OFOxmIpEcnMaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private IpEcn value;
+ private boolean maskSet;
+ private IpEcn mask;
+
+ BuilderWithParent(OFOxmIpEcnMaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80001302L;
+ }
+
+ @Override
+ public IpEcn getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIpEcnMasked.Builder setValue(IpEcn value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public IpEcn getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmIpEcnMasked.Builder setMask(IpEcn mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<IpEcn> getMatchField() {
+ return MatchField.IP_ECN;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<IpEcn> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmIpEcnMasked build() {
+ IpEcn value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ IpEcn mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmIpEcnMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmIpEcnMasked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private IpEcn value;
+ private boolean maskSet;
+ private IpEcn mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80001302L;
+ }
+
+ @Override
+ public IpEcn getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIpEcnMasked.Builder setValue(IpEcn value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public IpEcn getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmIpEcnMasked.Builder setMask(IpEcn mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<IpEcn> getMatchField() {
+ return MatchField.IP_ECN;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<IpEcn> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmIpEcnMasked build() {
+ IpEcn value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ IpEcn mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmIpEcnMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmIpEcnMasked> {
+ @Override
+ public OFOxmIpEcnMasked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80001302L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80001302)
+ throw new OFParseError("Wrong typeLen: Expected=0x80001302L(0x80001302L), got="+typeLen);
+ IpEcn value = IpEcn.readByte(bb);
+ IpEcn mask = IpEcn.readByte(bb);
+
+ OFOxmIpEcnMaskedVer13 oxmIpEcnMaskedVer13 = new OFOxmIpEcnMaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmIpEcnMaskedVer13);
+ return oxmIpEcnMaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmIpEcnMaskedVer13Funnel FUNNEL = new OFOxmIpEcnMaskedVer13Funnel();
+ static class OFOxmIpEcnMaskedVer13Funnel implements Funnel<OFOxmIpEcnMaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmIpEcnMaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80001302L
+ sink.putInt((int) 0x80001302);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmIpEcnMaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmIpEcnMaskedVer13 message) {
+ // fixed value property typeLen = 0x80001302L
+ bb.writeInt((int) 0x80001302);
+ message.value.writeByte(bb);
+ message.mask.writeByte(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmIpEcnMaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmIpEcnMaskedVer13 other = (OFOxmIpEcnMaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpEcnVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpEcnVer13.java
new file mode 100644
index 0000000..1389bee
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpEcnVer13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmIpEcnVer13 implements OFOxmIpEcn {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmIpEcnVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 5;
+
+ private final static IpEcn DEFAULT_VALUE = IpEcn.NONE;
+
+ // OF message fields
+ private final IpEcn value;
+//
+ // Immutable default instance
+ final static OFOxmIpEcnVer13 DEFAULT = new OFOxmIpEcnVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmIpEcnVer13(IpEcn value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80001201L;
+ }
+
+ @Override
+ public IpEcn getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<IpEcn> getMatchField() {
+ return MatchField.IP_ECN;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<IpEcn> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public IpEcn getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmIpEcn.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmIpEcn.Builder {
+ final OFOxmIpEcnVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private IpEcn value;
+
+ BuilderWithParent(OFOxmIpEcnVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80001201L;
+ }
+
+ @Override
+ public IpEcn getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIpEcn.Builder setValue(IpEcn value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<IpEcn> getMatchField() {
+ return MatchField.IP_ECN;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<IpEcn> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public IpEcn getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmIpEcn build() {
+ IpEcn value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmIpEcnVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmIpEcn.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private IpEcn value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80001201L;
+ }
+
+ @Override
+ public IpEcn getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIpEcn.Builder setValue(IpEcn value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<IpEcn> getMatchField() {
+ return MatchField.IP_ECN;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<IpEcn> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public IpEcn getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmIpEcn build() {
+ IpEcn value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmIpEcnVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmIpEcn> {
+ @Override
+ public OFOxmIpEcn readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80001201L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80001201)
+ throw new OFParseError("Wrong typeLen: Expected=0x80001201L(0x80001201L), got="+typeLen);
+ IpEcn value = IpEcn.readByte(bb);
+
+ OFOxmIpEcnVer13 oxmIpEcnVer13 = new OFOxmIpEcnVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmIpEcnVer13);
+ return oxmIpEcnVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmIpEcnVer13Funnel FUNNEL = new OFOxmIpEcnVer13Funnel();
+ static class OFOxmIpEcnVer13Funnel implements Funnel<OFOxmIpEcnVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmIpEcnVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80001201L
+ sink.putInt((int) 0x80001201);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmIpEcnVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmIpEcnVer13 message) {
+ // fixed value property typeLen = 0x80001201L
+ bb.writeInt((int) 0x80001201);
+ message.value.writeByte(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmIpEcnVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmIpEcnVer13 other = (OFOxmIpEcnVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpProtoMaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpProtoMaskedVer13.java
new file mode 100644
index 0000000..a7a3c74
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpProtoMaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmIpProtoMaskedVer13 implements OFOxmIpProtoMasked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmIpProtoMaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 6;
+
+ private final static IpProtocol DEFAULT_VALUE = IpProtocol.NONE;
+ private final static IpProtocol DEFAULT_VALUE_MASK = IpProtocol.NONE;
+
+ // OF message fields
+ private final IpProtocol value;
+ private final IpProtocol mask;
+//
+ // Immutable default instance
+ final static OFOxmIpProtoMaskedVer13 DEFAULT = new OFOxmIpProtoMaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmIpProtoMaskedVer13(IpProtocol value, IpProtocol mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80001502L;
+ }
+
+ @Override
+ public IpProtocol getValue() {
+ return value;
+ }
+
+ @Override
+ public IpProtocol getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<IpProtocol> getMatchField() {
+ return MatchField.IP_PROTO;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<IpProtocol> getCanonical() {
+ if (IpProtocol.NO_MASK.equals(mask)) {
+ return new OFOxmIpProtoVer13(value);
+ } else if(IpProtocol.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmIpProtoMasked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmIpProtoMasked.Builder {
+ final OFOxmIpProtoMaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private IpProtocol value;
+ private boolean maskSet;
+ private IpProtocol mask;
+
+ BuilderWithParent(OFOxmIpProtoMaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80001502L;
+ }
+
+ @Override
+ public IpProtocol getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIpProtoMasked.Builder setValue(IpProtocol value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public IpProtocol getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmIpProtoMasked.Builder setMask(IpProtocol mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<IpProtocol> getMatchField() {
+ return MatchField.IP_PROTO;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<IpProtocol> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmIpProtoMasked build() {
+ IpProtocol value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ IpProtocol mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmIpProtoMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmIpProtoMasked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private IpProtocol value;
+ private boolean maskSet;
+ private IpProtocol mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80001502L;
+ }
+
+ @Override
+ public IpProtocol getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIpProtoMasked.Builder setValue(IpProtocol value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public IpProtocol getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmIpProtoMasked.Builder setMask(IpProtocol mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<IpProtocol> getMatchField() {
+ return MatchField.IP_PROTO;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<IpProtocol> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmIpProtoMasked build() {
+ IpProtocol value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ IpProtocol mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmIpProtoMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmIpProtoMasked> {
+ @Override
+ public OFOxmIpProtoMasked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80001502L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80001502)
+ throw new OFParseError("Wrong typeLen: Expected=0x80001502L(0x80001502L), got="+typeLen);
+ IpProtocol value = IpProtocol.readByte(bb);
+ IpProtocol mask = IpProtocol.readByte(bb);
+
+ OFOxmIpProtoMaskedVer13 oxmIpProtoMaskedVer13 = new OFOxmIpProtoMaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmIpProtoMaskedVer13);
+ return oxmIpProtoMaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmIpProtoMaskedVer13Funnel FUNNEL = new OFOxmIpProtoMaskedVer13Funnel();
+ static class OFOxmIpProtoMaskedVer13Funnel implements Funnel<OFOxmIpProtoMaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmIpProtoMaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80001502L
+ sink.putInt((int) 0x80001502);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmIpProtoMaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmIpProtoMaskedVer13 message) {
+ // fixed value property typeLen = 0x80001502L
+ bb.writeInt((int) 0x80001502);
+ message.value.writeByte(bb);
+ message.mask.writeByte(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmIpProtoMaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmIpProtoMaskedVer13 other = (OFOxmIpProtoMaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpProtoVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpProtoVer13.java
new file mode 100644
index 0000000..d0354fb
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpProtoVer13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmIpProtoVer13 implements OFOxmIpProto {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmIpProtoVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 5;
+
+ private final static IpProtocol DEFAULT_VALUE = IpProtocol.NONE;
+
+ // OF message fields
+ private final IpProtocol value;
+//
+ // Immutable default instance
+ final static OFOxmIpProtoVer13 DEFAULT = new OFOxmIpProtoVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmIpProtoVer13(IpProtocol value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80001401L;
+ }
+
+ @Override
+ public IpProtocol getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<IpProtocol> getMatchField() {
+ return MatchField.IP_PROTO;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<IpProtocol> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public IpProtocol getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmIpProto.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmIpProto.Builder {
+ final OFOxmIpProtoVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private IpProtocol value;
+
+ BuilderWithParent(OFOxmIpProtoVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80001401L;
+ }
+
+ @Override
+ public IpProtocol getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIpProto.Builder setValue(IpProtocol value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<IpProtocol> getMatchField() {
+ return MatchField.IP_PROTO;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<IpProtocol> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public IpProtocol getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmIpProto build() {
+ IpProtocol value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmIpProtoVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmIpProto.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private IpProtocol value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80001401L;
+ }
+
+ @Override
+ public IpProtocol getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIpProto.Builder setValue(IpProtocol value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<IpProtocol> getMatchField() {
+ return MatchField.IP_PROTO;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<IpProtocol> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public IpProtocol getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmIpProto build() {
+ IpProtocol value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmIpProtoVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmIpProto> {
+ @Override
+ public OFOxmIpProto readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80001401L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80001401)
+ throw new OFParseError("Wrong typeLen: Expected=0x80001401L(0x80001401L), got="+typeLen);
+ IpProtocol value = IpProtocol.readByte(bb);
+
+ OFOxmIpProtoVer13 oxmIpProtoVer13 = new OFOxmIpProtoVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmIpProtoVer13);
+ return oxmIpProtoVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmIpProtoVer13Funnel FUNNEL = new OFOxmIpProtoVer13Funnel();
+ static class OFOxmIpProtoVer13Funnel implements Funnel<OFOxmIpProtoVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmIpProtoVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80001401L
+ sink.putInt((int) 0x80001401);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmIpProtoVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmIpProtoVer13 message) {
+ // fixed value property typeLen = 0x80001401L
+ bb.writeInt((int) 0x80001401);
+ message.value.writeByte(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmIpProtoVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmIpProtoVer13 other = (OFOxmIpProtoVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpv4DstMaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpv4DstMaskedVer13.java
new file mode 100644
index 0000000..e791166
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpv4DstMaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmIpv4DstMaskedVer13 implements OFOxmIpv4DstMasked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmIpv4DstMaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 12;
+
+ private final static IPv4Address DEFAULT_VALUE = IPv4Address.NONE;
+ private final static IPv4Address DEFAULT_VALUE_MASK = IPv4Address.NONE;
+
+ // OF message fields
+ private final IPv4Address value;
+ private final IPv4Address mask;
+//
+ // Immutable default instance
+ final static OFOxmIpv4DstMaskedVer13 DEFAULT = new OFOxmIpv4DstMaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmIpv4DstMaskedVer13(IPv4Address value, IPv4Address mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80001908L;
+ }
+
+ @Override
+ public IPv4Address getValue() {
+ return value;
+ }
+
+ @Override
+ public IPv4Address getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<IPv4Address> getMatchField() {
+ return MatchField.IPV4_DST;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<IPv4Address> getCanonical() {
+ if (IPv4Address.NO_MASK.equals(mask)) {
+ return new OFOxmIpv4DstVer13(value);
+ } else if(IPv4Address.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmIpv4DstMasked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmIpv4DstMasked.Builder {
+ final OFOxmIpv4DstMaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private IPv4Address value;
+ private boolean maskSet;
+ private IPv4Address mask;
+
+ BuilderWithParent(OFOxmIpv4DstMaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80001908L;
+ }
+
+ @Override
+ public IPv4Address getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIpv4DstMasked.Builder setValue(IPv4Address value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public IPv4Address getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmIpv4DstMasked.Builder setMask(IPv4Address mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<IPv4Address> getMatchField() {
+ return MatchField.IPV4_DST;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<IPv4Address> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmIpv4DstMasked build() {
+ IPv4Address value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ IPv4Address mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmIpv4DstMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmIpv4DstMasked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private IPv4Address value;
+ private boolean maskSet;
+ private IPv4Address mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80001908L;
+ }
+
+ @Override
+ public IPv4Address getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIpv4DstMasked.Builder setValue(IPv4Address value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public IPv4Address getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmIpv4DstMasked.Builder setMask(IPv4Address mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<IPv4Address> getMatchField() {
+ return MatchField.IPV4_DST;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<IPv4Address> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmIpv4DstMasked build() {
+ IPv4Address value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ IPv4Address mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmIpv4DstMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmIpv4DstMasked> {
+ @Override
+ public OFOxmIpv4DstMasked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80001908L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80001908)
+ throw new OFParseError("Wrong typeLen: Expected=0x80001908L(0x80001908L), got="+typeLen);
+ IPv4Address value = IPv4Address.read4Bytes(bb);
+ IPv4Address mask = IPv4Address.read4Bytes(bb);
+
+ OFOxmIpv4DstMaskedVer13 oxmIpv4DstMaskedVer13 = new OFOxmIpv4DstMaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmIpv4DstMaskedVer13);
+ return oxmIpv4DstMaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmIpv4DstMaskedVer13Funnel FUNNEL = new OFOxmIpv4DstMaskedVer13Funnel();
+ static class OFOxmIpv4DstMaskedVer13Funnel implements Funnel<OFOxmIpv4DstMaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmIpv4DstMaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80001908L
+ sink.putInt((int) 0x80001908);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmIpv4DstMaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmIpv4DstMaskedVer13 message) {
+ // fixed value property typeLen = 0x80001908L
+ bb.writeInt((int) 0x80001908);
+ message.value.write4Bytes(bb);
+ message.mask.write4Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmIpv4DstMaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmIpv4DstMaskedVer13 other = (OFOxmIpv4DstMaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpv4DstVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpv4DstVer13.java
new file mode 100644
index 0000000..d66f14d
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpv4DstVer13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmIpv4DstVer13 implements OFOxmIpv4Dst {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmIpv4DstVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static IPv4Address DEFAULT_VALUE = IPv4Address.NONE;
+
+ // OF message fields
+ private final IPv4Address value;
+//
+ // Immutable default instance
+ final static OFOxmIpv4DstVer13 DEFAULT = new OFOxmIpv4DstVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmIpv4DstVer13(IPv4Address value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80001804L;
+ }
+
+ @Override
+ public IPv4Address getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<IPv4Address> getMatchField() {
+ return MatchField.IPV4_DST;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<IPv4Address> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public IPv4Address getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmIpv4Dst.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmIpv4Dst.Builder {
+ final OFOxmIpv4DstVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private IPv4Address value;
+
+ BuilderWithParent(OFOxmIpv4DstVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80001804L;
+ }
+
+ @Override
+ public IPv4Address getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIpv4Dst.Builder setValue(IPv4Address value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<IPv4Address> getMatchField() {
+ return MatchField.IPV4_DST;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<IPv4Address> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public IPv4Address getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmIpv4Dst build() {
+ IPv4Address value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmIpv4DstVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmIpv4Dst.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private IPv4Address value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80001804L;
+ }
+
+ @Override
+ public IPv4Address getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIpv4Dst.Builder setValue(IPv4Address value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<IPv4Address> getMatchField() {
+ return MatchField.IPV4_DST;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<IPv4Address> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public IPv4Address getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmIpv4Dst build() {
+ IPv4Address value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmIpv4DstVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmIpv4Dst> {
+ @Override
+ public OFOxmIpv4Dst readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80001804L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80001804)
+ throw new OFParseError("Wrong typeLen: Expected=0x80001804L(0x80001804L), got="+typeLen);
+ IPv4Address value = IPv4Address.read4Bytes(bb);
+
+ OFOxmIpv4DstVer13 oxmIpv4DstVer13 = new OFOxmIpv4DstVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmIpv4DstVer13);
+ return oxmIpv4DstVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmIpv4DstVer13Funnel FUNNEL = new OFOxmIpv4DstVer13Funnel();
+ static class OFOxmIpv4DstVer13Funnel implements Funnel<OFOxmIpv4DstVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmIpv4DstVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80001804L
+ sink.putInt((int) 0x80001804);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmIpv4DstVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmIpv4DstVer13 message) {
+ // fixed value property typeLen = 0x80001804L
+ bb.writeInt((int) 0x80001804);
+ message.value.write4Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmIpv4DstVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmIpv4DstVer13 other = (OFOxmIpv4DstVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpv4SrcMaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpv4SrcMaskedVer13.java
new file mode 100644
index 0000000..5de3147
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpv4SrcMaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmIpv4SrcMaskedVer13 implements OFOxmIpv4SrcMasked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmIpv4SrcMaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 12;
+
+ private final static IPv4Address DEFAULT_VALUE = IPv4Address.NONE;
+ private final static IPv4Address DEFAULT_VALUE_MASK = IPv4Address.NONE;
+
+ // OF message fields
+ private final IPv4Address value;
+ private final IPv4Address mask;
+//
+ // Immutable default instance
+ final static OFOxmIpv4SrcMaskedVer13 DEFAULT = new OFOxmIpv4SrcMaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmIpv4SrcMaskedVer13(IPv4Address value, IPv4Address mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80001708L;
+ }
+
+ @Override
+ public IPv4Address getValue() {
+ return value;
+ }
+
+ @Override
+ public IPv4Address getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<IPv4Address> getMatchField() {
+ return MatchField.IPV4_SRC;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<IPv4Address> getCanonical() {
+ if (IPv4Address.NO_MASK.equals(mask)) {
+ return new OFOxmIpv4SrcVer13(value);
+ } else if(IPv4Address.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmIpv4SrcMasked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmIpv4SrcMasked.Builder {
+ final OFOxmIpv4SrcMaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private IPv4Address value;
+ private boolean maskSet;
+ private IPv4Address mask;
+
+ BuilderWithParent(OFOxmIpv4SrcMaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80001708L;
+ }
+
+ @Override
+ public IPv4Address getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIpv4SrcMasked.Builder setValue(IPv4Address value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public IPv4Address getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmIpv4SrcMasked.Builder setMask(IPv4Address mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<IPv4Address> getMatchField() {
+ return MatchField.IPV4_SRC;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<IPv4Address> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmIpv4SrcMasked build() {
+ IPv4Address value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ IPv4Address mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmIpv4SrcMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmIpv4SrcMasked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private IPv4Address value;
+ private boolean maskSet;
+ private IPv4Address mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80001708L;
+ }
+
+ @Override
+ public IPv4Address getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIpv4SrcMasked.Builder setValue(IPv4Address value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public IPv4Address getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmIpv4SrcMasked.Builder setMask(IPv4Address mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<IPv4Address> getMatchField() {
+ return MatchField.IPV4_SRC;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<IPv4Address> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmIpv4SrcMasked build() {
+ IPv4Address value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ IPv4Address mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmIpv4SrcMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmIpv4SrcMasked> {
+ @Override
+ public OFOxmIpv4SrcMasked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80001708L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80001708)
+ throw new OFParseError("Wrong typeLen: Expected=0x80001708L(0x80001708L), got="+typeLen);
+ IPv4Address value = IPv4Address.read4Bytes(bb);
+ IPv4Address mask = IPv4Address.read4Bytes(bb);
+
+ OFOxmIpv4SrcMaskedVer13 oxmIpv4SrcMaskedVer13 = new OFOxmIpv4SrcMaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmIpv4SrcMaskedVer13);
+ return oxmIpv4SrcMaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmIpv4SrcMaskedVer13Funnel FUNNEL = new OFOxmIpv4SrcMaskedVer13Funnel();
+ static class OFOxmIpv4SrcMaskedVer13Funnel implements Funnel<OFOxmIpv4SrcMaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmIpv4SrcMaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80001708L
+ sink.putInt((int) 0x80001708);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmIpv4SrcMaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmIpv4SrcMaskedVer13 message) {
+ // fixed value property typeLen = 0x80001708L
+ bb.writeInt((int) 0x80001708);
+ message.value.write4Bytes(bb);
+ message.mask.write4Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmIpv4SrcMaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmIpv4SrcMaskedVer13 other = (OFOxmIpv4SrcMaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpv4SrcVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpv4SrcVer13.java
new file mode 100644
index 0000000..aae1239
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpv4SrcVer13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmIpv4SrcVer13 implements OFOxmIpv4Src {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmIpv4SrcVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static IPv4Address DEFAULT_VALUE = IPv4Address.NONE;
+
+ // OF message fields
+ private final IPv4Address value;
+//
+ // Immutable default instance
+ final static OFOxmIpv4SrcVer13 DEFAULT = new OFOxmIpv4SrcVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmIpv4SrcVer13(IPv4Address value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80001604L;
+ }
+
+ @Override
+ public IPv4Address getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<IPv4Address> getMatchField() {
+ return MatchField.IPV4_SRC;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<IPv4Address> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public IPv4Address getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmIpv4Src.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmIpv4Src.Builder {
+ final OFOxmIpv4SrcVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private IPv4Address value;
+
+ BuilderWithParent(OFOxmIpv4SrcVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80001604L;
+ }
+
+ @Override
+ public IPv4Address getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIpv4Src.Builder setValue(IPv4Address value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<IPv4Address> getMatchField() {
+ return MatchField.IPV4_SRC;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<IPv4Address> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public IPv4Address getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmIpv4Src build() {
+ IPv4Address value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmIpv4SrcVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmIpv4Src.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private IPv4Address value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80001604L;
+ }
+
+ @Override
+ public IPv4Address getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIpv4Src.Builder setValue(IPv4Address value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<IPv4Address> getMatchField() {
+ return MatchField.IPV4_SRC;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<IPv4Address> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public IPv4Address getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmIpv4Src build() {
+ IPv4Address value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmIpv4SrcVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmIpv4Src> {
+ @Override
+ public OFOxmIpv4Src readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80001604L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80001604)
+ throw new OFParseError("Wrong typeLen: Expected=0x80001604L(0x80001604L), got="+typeLen);
+ IPv4Address value = IPv4Address.read4Bytes(bb);
+
+ OFOxmIpv4SrcVer13 oxmIpv4SrcVer13 = new OFOxmIpv4SrcVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmIpv4SrcVer13);
+ return oxmIpv4SrcVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmIpv4SrcVer13Funnel FUNNEL = new OFOxmIpv4SrcVer13Funnel();
+ static class OFOxmIpv4SrcVer13Funnel implements Funnel<OFOxmIpv4SrcVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmIpv4SrcVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80001604L
+ sink.putInt((int) 0x80001604);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmIpv4SrcVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmIpv4SrcVer13 message) {
+ // fixed value property typeLen = 0x80001604L
+ bb.writeInt((int) 0x80001604);
+ message.value.write4Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmIpv4SrcVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmIpv4SrcVer13 other = (OFOxmIpv4SrcVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpv6DstMaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpv6DstMaskedVer13.java
new file mode 100644
index 0000000..7aaf6a7
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpv6DstMaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmIpv6DstMaskedVer13 implements OFOxmIpv6DstMasked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmIpv6DstMaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 36;
+
+ private final static IPv6Address DEFAULT_VALUE = IPv6Address.NONE;
+ private final static IPv6Address DEFAULT_VALUE_MASK = IPv6Address.NONE;
+
+ // OF message fields
+ private final IPv6Address value;
+ private final IPv6Address mask;
+//
+ // Immutable default instance
+ final static OFOxmIpv6DstMaskedVer13 DEFAULT = new OFOxmIpv6DstMaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmIpv6DstMaskedVer13(IPv6Address value, IPv6Address mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80003720L;
+ }
+
+ @Override
+ public IPv6Address getValue() {
+ return value;
+ }
+
+ @Override
+ public IPv6Address getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<IPv6Address> getMatchField() {
+ return MatchField.IPV6_DST;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<IPv6Address> getCanonical() {
+ if (IPv6Address.NO_MASK.equals(mask)) {
+ return new OFOxmIpv6DstVer13(value);
+ } else if(IPv6Address.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmIpv6DstMasked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmIpv6DstMasked.Builder {
+ final OFOxmIpv6DstMaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private IPv6Address value;
+ private boolean maskSet;
+ private IPv6Address mask;
+
+ BuilderWithParent(OFOxmIpv6DstMaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80003720L;
+ }
+
+ @Override
+ public IPv6Address getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIpv6DstMasked.Builder setValue(IPv6Address value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public IPv6Address getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmIpv6DstMasked.Builder setMask(IPv6Address mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<IPv6Address> getMatchField() {
+ return MatchField.IPV6_DST;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<IPv6Address> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmIpv6DstMasked build() {
+ IPv6Address value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ IPv6Address mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmIpv6DstMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmIpv6DstMasked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private IPv6Address value;
+ private boolean maskSet;
+ private IPv6Address mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80003720L;
+ }
+
+ @Override
+ public IPv6Address getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIpv6DstMasked.Builder setValue(IPv6Address value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public IPv6Address getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmIpv6DstMasked.Builder setMask(IPv6Address mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<IPv6Address> getMatchField() {
+ return MatchField.IPV6_DST;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<IPv6Address> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmIpv6DstMasked build() {
+ IPv6Address value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ IPv6Address mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmIpv6DstMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmIpv6DstMasked> {
+ @Override
+ public OFOxmIpv6DstMasked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80003720L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80003720)
+ throw new OFParseError("Wrong typeLen: Expected=0x80003720L(0x80003720L), got="+typeLen);
+ IPv6Address value = IPv6Address.read16Bytes(bb);
+ IPv6Address mask = IPv6Address.read16Bytes(bb);
+
+ OFOxmIpv6DstMaskedVer13 oxmIpv6DstMaskedVer13 = new OFOxmIpv6DstMaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmIpv6DstMaskedVer13);
+ return oxmIpv6DstMaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmIpv6DstMaskedVer13Funnel FUNNEL = new OFOxmIpv6DstMaskedVer13Funnel();
+ static class OFOxmIpv6DstMaskedVer13Funnel implements Funnel<OFOxmIpv6DstMaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmIpv6DstMaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80003720L
+ sink.putInt((int) 0x80003720);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmIpv6DstMaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmIpv6DstMaskedVer13 message) {
+ // fixed value property typeLen = 0x80003720L
+ bb.writeInt((int) 0x80003720);
+ message.value.write16Bytes(bb);
+ message.mask.write16Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmIpv6DstMaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmIpv6DstMaskedVer13 other = (OFOxmIpv6DstMaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpv6DstVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpv6DstVer13.java
new file mode 100644
index 0000000..148fbd5
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpv6DstVer13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmIpv6DstVer13 implements OFOxmIpv6Dst {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmIpv6DstVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 20;
+
+ private final static IPv6Address DEFAULT_VALUE = IPv6Address.NONE;
+
+ // OF message fields
+ private final IPv6Address value;
+//
+ // Immutable default instance
+ final static OFOxmIpv6DstVer13 DEFAULT = new OFOxmIpv6DstVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmIpv6DstVer13(IPv6Address value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80003610L;
+ }
+
+ @Override
+ public IPv6Address getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<IPv6Address> getMatchField() {
+ return MatchField.IPV6_DST;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<IPv6Address> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public IPv6Address getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmIpv6Dst.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmIpv6Dst.Builder {
+ final OFOxmIpv6DstVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private IPv6Address value;
+
+ BuilderWithParent(OFOxmIpv6DstVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80003610L;
+ }
+
+ @Override
+ public IPv6Address getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIpv6Dst.Builder setValue(IPv6Address value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<IPv6Address> getMatchField() {
+ return MatchField.IPV6_DST;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<IPv6Address> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public IPv6Address getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmIpv6Dst build() {
+ IPv6Address value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmIpv6DstVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmIpv6Dst.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private IPv6Address value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80003610L;
+ }
+
+ @Override
+ public IPv6Address getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIpv6Dst.Builder setValue(IPv6Address value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<IPv6Address> getMatchField() {
+ return MatchField.IPV6_DST;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<IPv6Address> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public IPv6Address getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmIpv6Dst build() {
+ IPv6Address value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmIpv6DstVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmIpv6Dst> {
+ @Override
+ public OFOxmIpv6Dst readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80003610L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80003610)
+ throw new OFParseError("Wrong typeLen: Expected=0x80003610L(0x80003610L), got="+typeLen);
+ IPv6Address value = IPv6Address.read16Bytes(bb);
+
+ OFOxmIpv6DstVer13 oxmIpv6DstVer13 = new OFOxmIpv6DstVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmIpv6DstVer13);
+ return oxmIpv6DstVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmIpv6DstVer13Funnel FUNNEL = new OFOxmIpv6DstVer13Funnel();
+ static class OFOxmIpv6DstVer13Funnel implements Funnel<OFOxmIpv6DstVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmIpv6DstVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80003610L
+ sink.putInt((int) 0x80003610);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmIpv6DstVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmIpv6DstVer13 message) {
+ // fixed value property typeLen = 0x80003610L
+ bb.writeInt((int) 0x80003610);
+ message.value.write16Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmIpv6DstVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmIpv6DstVer13 other = (OFOxmIpv6DstVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpv6FlabelMaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpv6FlabelMaskedVer13.java
new file mode 100644
index 0000000..2da8bf6
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpv6FlabelMaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmIpv6FlabelMaskedVer13 implements OFOxmIpv6FlabelMasked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmIpv6FlabelMaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 12;
+
+ private final static IPv6FlowLabel DEFAULT_VALUE = IPv6FlowLabel.NONE;
+ private final static IPv6FlowLabel DEFAULT_VALUE_MASK = IPv6FlowLabel.NONE;
+
+ // OF message fields
+ private final IPv6FlowLabel value;
+ private final IPv6FlowLabel mask;
+//
+ // Immutable default instance
+ final static OFOxmIpv6FlabelMaskedVer13 DEFAULT = new OFOxmIpv6FlabelMaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmIpv6FlabelMaskedVer13(IPv6FlowLabel value, IPv6FlowLabel mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80003908L;
+ }
+
+ @Override
+ public IPv6FlowLabel getValue() {
+ return value;
+ }
+
+ @Override
+ public IPv6FlowLabel getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<IPv6FlowLabel> getMatchField() {
+ return MatchField.IPV6_FLABEL;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<IPv6FlowLabel> getCanonical() {
+ if (IPv6FlowLabel.NO_MASK.equals(mask)) {
+ return new OFOxmIpv6FlabelVer13(value);
+ } else if(IPv6FlowLabel.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmIpv6FlabelMasked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmIpv6FlabelMasked.Builder {
+ final OFOxmIpv6FlabelMaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private IPv6FlowLabel value;
+ private boolean maskSet;
+ private IPv6FlowLabel mask;
+
+ BuilderWithParent(OFOxmIpv6FlabelMaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80003908L;
+ }
+
+ @Override
+ public IPv6FlowLabel getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIpv6FlabelMasked.Builder setValue(IPv6FlowLabel value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public IPv6FlowLabel getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmIpv6FlabelMasked.Builder setMask(IPv6FlowLabel mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<IPv6FlowLabel> getMatchField() {
+ return MatchField.IPV6_FLABEL;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<IPv6FlowLabel> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmIpv6FlabelMasked build() {
+ IPv6FlowLabel value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ IPv6FlowLabel mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmIpv6FlabelMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmIpv6FlabelMasked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private IPv6FlowLabel value;
+ private boolean maskSet;
+ private IPv6FlowLabel mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80003908L;
+ }
+
+ @Override
+ public IPv6FlowLabel getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIpv6FlabelMasked.Builder setValue(IPv6FlowLabel value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public IPv6FlowLabel getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmIpv6FlabelMasked.Builder setMask(IPv6FlowLabel mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<IPv6FlowLabel> getMatchField() {
+ return MatchField.IPV6_FLABEL;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<IPv6FlowLabel> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmIpv6FlabelMasked build() {
+ IPv6FlowLabel value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ IPv6FlowLabel mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmIpv6FlabelMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmIpv6FlabelMasked> {
+ @Override
+ public OFOxmIpv6FlabelMasked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80003908L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80003908)
+ throw new OFParseError("Wrong typeLen: Expected=0x80003908L(0x80003908L), got="+typeLen);
+ IPv6FlowLabel value = IPv6FlowLabel.read4Bytes(bb);
+ IPv6FlowLabel mask = IPv6FlowLabel.read4Bytes(bb);
+
+ OFOxmIpv6FlabelMaskedVer13 oxmIpv6FlabelMaskedVer13 = new OFOxmIpv6FlabelMaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmIpv6FlabelMaskedVer13);
+ return oxmIpv6FlabelMaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmIpv6FlabelMaskedVer13Funnel FUNNEL = new OFOxmIpv6FlabelMaskedVer13Funnel();
+ static class OFOxmIpv6FlabelMaskedVer13Funnel implements Funnel<OFOxmIpv6FlabelMaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmIpv6FlabelMaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80003908L
+ sink.putInt((int) 0x80003908);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmIpv6FlabelMaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmIpv6FlabelMaskedVer13 message) {
+ // fixed value property typeLen = 0x80003908L
+ bb.writeInt((int) 0x80003908);
+ message.value.write4Bytes(bb);
+ message.mask.write4Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmIpv6FlabelMaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmIpv6FlabelMaskedVer13 other = (OFOxmIpv6FlabelMaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpv6FlabelVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpv6FlabelVer13.java
new file mode 100644
index 0000000..50dbba1
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpv6FlabelVer13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmIpv6FlabelVer13 implements OFOxmIpv6Flabel {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmIpv6FlabelVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static IPv6FlowLabel DEFAULT_VALUE = IPv6FlowLabel.NONE;
+
+ // OF message fields
+ private final IPv6FlowLabel value;
+//
+ // Immutable default instance
+ final static OFOxmIpv6FlabelVer13 DEFAULT = new OFOxmIpv6FlabelVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmIpv6FlabelVer13(IPv6FlowLabel value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80003804L;
+ }
+
+ @Override
+ public IPv6FlowLabel getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<IPv6FlowLabel> getMatchField() {
+ return MatchField.IPV6_FLABEL;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<IPv6FlowLabel> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public IPv6FlowLabel getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmIpv6Flabel.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmIpv6Flabel.Builder {
+ final OFOxmIpv6FlabelVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private IPv6FlowLabel value;
+
+ BuilderWithParent(OFOxmIpv6FlabelVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80003804L;
+ }
+
+ @Override
+ public IPv6FlowLabel getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIpv6Flabel.Builder setValue(IPv6FlowLabel value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<IPv6FlowLabel> getMatchField() {
+ return MatchField.IPV6_FLABEL;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<IPv6FlowLabel> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public IPv6FlowLabel getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmIpv6Flabel build() {
+ IPv6FlowLabel value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmIpv6FlabelVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmIpv6Flabel.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private IPv6FlowLabel value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80003804L;
+ }
+
+ @Override
+ public IPv6FlowLabel getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIpv6Flabel.Builder setValue(IPv6FlowLabel value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<IPv6FlowLabel> getMatchField() {
+ return MatchField.IPV6_FLABEL;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<IPv6FlowLabel> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public IPv6FlowLabel getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmIpv6Flabel build() {
+ IPv6FlowLabel value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmIpv6FlabelVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmIpv6Flabel> {
+ @Override
+ public OFOxmIpv6Flabel readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80003804L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80003804)
+ throw new OFParseError("Wrong typeLen: Expected=0x80003804L(0x80003804L), got="+typeLen);
+ IPv6FlowLabel value = IPv6FlowLabel.read4Bytes(bb);
+
+ OFOxmIpv6FlabelVer13 oxmIpv6FlabelVer13 = new OFOxmIpv6FlabelVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmIpv6FlabelVer13);
+ return oxmIpv6FlabelVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmIpv6FlabelVer13Funnel FUNNEL = new OFOxmIpv6FlabelVer13Funnel();
+ static class OFOxmIpv6FlabelVer13Funnel implements Funnel<OFOxmIpv6FlabelVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmIpv6FlabelVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80003804L
+ sink.putInt((int) 0x80003804);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmIpv6FlabelVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmIpv6FlabelVer13 message) {
+ // fixed value property typeLen = 0x80003804L
+ bb.writeInt((int) 0x80003804);
+ message.value.write4Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmIpv6FlabelVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmIpv6FlabelVer13 other = (OFOxmIpv6FlabelVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpv6NdSllMaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpv6NdSllMaskedVer13.java
new file mode 100644
index 0000000..93e8e69
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpv6NdSllMaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmIpv6NdSllMaskedVer13 implements OFOxmIpv6NdSllMasked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmIpv6NdSllMaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 16;
+
+ private final static MacAddress DEFAULT_VALUE = MacAddress.NONE;
+ private final static MacAddress DEFAULT_VALUE_MASK = MacAddress.NONE;
+
+ // OF message fields
+ private final MacAddress value;
+ private final MacAddress mask;
+//
+ // Immutable default instance
+ final static OFOxmIpv6NdSllMaskedVer13 DEFAULT = new OFOxmIpv6NdSllMaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmIpv6NdSllMaskedVer13(MacAddress value, MacAddress mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x8000410cL;
+ }
+
+ @Override
+ public MacAddress getValue() {
+ return value;
+ }
+
+ @Override
+ public MacAddress getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<MacAddress> getMatchField() {
+ return MatchField.IPV6_ND_SLL;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<MacAddress> getCanonical() {
+ if (MacAddress.NO_MASK.equals(mask)) {
+ return new OFOxmIpv6NdSllVer13(value);
+ } else if(MacAddress.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmIpv6NdSllMasked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmIpv6NdSllMasked.Builder {
+ final OFOxmIpv6NdSllMaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private MacAddress value;
+ private boolean maskSet;
+ private MacAddress mask;
+
+ BuilderWithParent(OFOxmIpv6NdSllMaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x8000410cL;
+ }
+
+ @Override
+ public MacAddress getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIpv6NdSllMasked.Builder setValue(MacAddress value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MacAddress getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmIpv6NdSllMasked.Builder setMask(MacAddress mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<MacAddress> getMatchField() {
+ return MatchField.IPV6_ND_SLL;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<MacAddress> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmIpv6NdSllMasked build() {
+ MacAddress value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ MacAddress mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmIpv6NdSllMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmIpv6NdSllMasked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private MacAddress value;
+ private boolean maskSet;
+ private MacAddress mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x8000410cL;
+ }
+
+ @Override
+ public MacAddress getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIpv6NdSllMasked.Builder setValue(MacAddress value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MacAddress getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmIpv6NdSllMasked.Builder setMask(MacAddress mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<MacAddress> getMatchField() {
+ return MatchField.IPV6_ND_SLL;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<MacAddress> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmIpv6NdSllMasked build() {
+ MacAddress value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ MacAddress mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmIpv6NdSllMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmIpv6NdSllMasked> {
+ @Override
+ public OFOxmIpv6NdSllMasked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x8000410cL
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x8000410c)
+ throw new OFParseError("Wrong typeLen: Expected=0x8000410cL(0x8000410cL), got="+typeLen);
+ MacAddress value = MacAddress.read6Bytes(bb);
+ MacAddress mask = MacAddress.read6Bytes(bb);
+
+ OFOxmIpv6NdSllMaskedVer13 oxmIpv6NdSllMaskedVer13 = new OFOxmIpv6NdSllMaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmIpv6NdSllMaskedVer13);
+ return oxmIpv6NdSllMaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmIpv6NdSllMaskedVer13Funnel FUNNEL = new OFOxmIpv6NdSllMaskedVer13Funnel();
+ static class OFOxmIpv6NdSllMaskedVer13Funnel implements Funnel<OFOxmIpv6NdSllMaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmIpv6NdSllMaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x8000410cL
+ sink.putInt((int) 0x8000410c);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmIpv6NdSllMaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmIpv6NdSllMaskedVer13 message) {
+ // fixed value property typeLen = 0x8000410cL
+ bb.writeInt((int) 0x8000410c);
+ message.value.write6Bytes(bb);
+ message.mask.write6Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmIpv6NdSllMaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmIpv6NdSllMaskedVer13 other = (OFOxmIpv6NdSllMaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpv6NdSllVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpv6NdSllVer13.java
new file mode 100644
index 0000000..53b2432
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpv6NdSllVer13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmIpv6NdSllVer13 implements OFOxmIpv6NdSll {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmIpv6NdSllVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 10;
+
+ private final static MacAddress DEFAULT_VALUE = MacAddress.NONE;
+
+ // OF message fields
+ private final MacAddress value;
+//
+ // Immutable default instance
+ final static OFOxmIpv6NdSllVer13 DEFAULT = new OFOxmIpv6NdSllVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmIpv6NdSllVer13(MacAddress value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80004006L;
+ }
+
+ @Override
+ public MacAddress getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<MacAddress> getMatchField() {
+ return MatchField.IPV6_ND_SLL;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<MacAddress> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public MacAddress getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmIpv6NdSll.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmIpv6NdSll.Builder {
+ final OFOxmIpv6NdSllVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private MacAddress value;
+
+ BuilderWithParent(OFOxmIpv6NdSllVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80004006L;
+ }
+
+ @Override
+ public MacAddress getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIpv6NdSll.Builder setValue(MacAddress value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<MacAddress> getMatchField() {
+ return MatchField.IPV6_ND_SLL;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<MacAddress> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public MacAddress getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmIpv6NdSll build() {
+ MacAddress value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmIpv6NdSllVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmIpv6NdSll.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private MacAddress value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80004006L;
+ }
+
+ @Override
+ public MacAddress getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIpv6NdSll.Builder setValue(MacAddress value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<MacAddress> getMatchField() {
+ return MatchField.IPV6_ND_SLL;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<MacAddress> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public MacAddress getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmIpv6NdSll build() {
+ MacAddress value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmIpv6NdSllVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmIpv6NdSll> {
+ @Override
+ public OFOxmIpv6NdSll readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80004006L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80004006)
+ throw new OFParseError("Wrong typeLen: Expected=0x80004006L(0x80004006L), got="+typeLen);
+ MacAddress value = MacAddress.read6Bytes(bb);
+
+ OFOxmIpv6NdSllVer13 oxmIpv6NdSllVer13 = new OFOxmIpv6NdSllVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmIpv6NdSllVer13);
+ return oxmIpv6NdSllVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmIpv6NdSllVer13Funnel FUNNEL = new OFOxmIpv6NdSllVer13Funnel();
+ static class OFOxmIpv6NdSllVer13Funnel implements Funnel<OFOxmIpv6NdSllVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmIpv6NdSllVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80004006L
+ sink.putInt((int) 0x80004006);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmIpv6NdSllVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmIpv6NdSllVer13 message) {
+ // fixed value property typeLen = 0x80004006L
+ bb.writeInt((int) 0x80004006);
+ message.value.write6Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmIpv6NdSllVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmIpv6NdSllVer13 other = (OFOxmIpv6NdSllVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpv6NdTargetMaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpv6NdTargetMaskedVer13.java
new file mode 100644
index 0000000..ee92c94
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpv6NdTargetMaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmIpv6NdTargetMaskedVer13 implements OFOxmIpv6NdTargetMasked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmIpv6NdTargetMaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 36;
+
+ private final static IPv6Address DEFAULT_VALUE = IPv6Address.NONE;
+ private final static IPv6Address DEFAULT_VALUE_MASK = IPv6Address.NONE;
+
+ // OF message fields
+ private final IPv6Address value;
+ private final IPv6Address mask;
+//
+ // Immutable default instance
+ final static OFOxmIpv6NdTargetMaskedVer13 DEFAULT = new OFOxmIpv6NdTargetMaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmIpv6NdTargetMaskedVer13(IPv6Address value, IPv6Address mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80003f20L;
+ }
+
+ @Override
+ public IPv6Address getValue() {
+ return value;
+ }
+
+ @Override
+ public IPv6Address getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<IPv6Address> getMatchField() {
+ return MatchField.IPV6_ND_TARGET;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<IPv6Address> getCanonical() {
+ if (IPv6Address.NO_MASK.equals(mask)) {
+ return new OFOxmIpv6NdTargetVer13(value);
+ } else if(IPv6Address.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmIpv6NdTargetMasked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmIpv6NdTargetMasked.Builder {
+ final OFOxmIpv6NdTargetMaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private IPv6Address value;
+ private boolean maskSet;
+ private IPv6Address mask;
+
+ BuilderWithParent(OFOxmIpv6NdTargetMaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80003f20L;
+ }
+
+ @Override
+ public IPv6Address getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIpv6NdTargetMasked.Builder setValue(IPv6Address value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public IPv6Address getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmIpv6NdTargetMasked.Builder setMask(IPv6Address mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<IPv6Address> getMatchField() {
+ return MatchField.IPV6_ND_TARGET;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<IPv6Address> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmIpv6NdTargetMasked build() {
+ IPv6Address value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ IPv6Address mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmIpv6NdTargetMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmIpv6NdTargetMasked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private IPv6Address value;
+ private boolean maskSet;
+ private IPv6Address mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80003f20L;
+ }
+
+ @Override
+ public IPv6Address getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIpv6NdTargetMasked.Builder setValue(IPv6Address value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public IPv6Address getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmIpv6NdTargetMasked.Builder setMask(IPv6Address mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<IPv6Address> getMatchField() {
+ return MatchField.IPV6_ND_TARGET;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<IPv6Address> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmIpv6NdTargetMasked build() {
+ IPv6Address value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ IPv6Address mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmIpv6NdTargetMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmIpv6NdTargetMasked> {
+ @Override
+ public OFOxmIpv6NdTargetMasked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80003f20L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80003f20)
+ throw new OFParseError("Wrong typeLen: Expected=0x80003f20L(0x80003f20L), got="+typeLen);
+ IPv6Address value = IPv6Address.read16Bytes(bb);
+ IPv6Address mask = IPv6Address.read16Bytes(bb);
+
+ OFOxmIpv6NdTargetMaskedVer13 oxmIpv6NdTargetMaskedVer13 = new OFOxmIpv6NdTargetMaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmIpv6NdTargetMaskedVer13);
+ return oxmIpv6NdTargetMaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmIpv6NdTargetMaskedVer13Funnel FUNNEL = new OFOxmIpv6NdTargetMaskedVer13Funnel();
+ static class OFOxmIpv6NdTargetMaskedVer13Funnel implements Funnel<OFOxmIpv6NdTargetMaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmIpv6NdTargetMaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80003f20L
+ sink.putInt((int) 0x80003f20);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmIpv6NdTargetMaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmIpv6NdTargetMaskedVer13 message) {
+ // fixed value property typeLen = 0x80003f20L
+ bb.writeInt((int) 0x80003f20);
+ message.value.write16Bytes(bb);
+ message.mask.write16Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmIpv6NdTargetMaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmIpv6NdTargetMaskedVer13 other = (OFOxmIpv6NdTargetMaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpv6NdTargetVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpv6NdTargetVer13.java
new file mode 100644
index 0000000..fd5f197
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpv6NdTargetVer13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmIpv6NdTargetVer13 implements OFOxmIpv6NdTarget {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmIpv6NdTargetVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 20;
+
+ private final static IPv6Address DEFAULT_VALUE = IPv6Address.NONE;
+
+ // OF message fields
+ private final IPv6Address value;
+//
+ // Immutable default instance
+ final static OFOxmIpv6NdTargetVer13 DEFAULT = new OFOxmIpv6NdTargetVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmIpv6NdTargetVer13(IPv6Address value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80003e10L;
+ }
+
+ @Override
+ public IPv6Address getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<IPv6Address> getMatchField() {
+ return MatchField.IPV6_ND_TARGET;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<IPv6Address> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public IPv6Address getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmIpv6NdTarget.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmIpv6NdTarget.Builder {
+ final OFOxmIpv6NdTargetVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private IPv6Address value;
+
+ BuilderWithParent(OFOxmIpv6NdTargetVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80003e10L;
+ }
+
+ @Override
+ public IPv6Address getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIpv6NdTarget.Builder setValue(IPv6Address value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<IPv6Address> getMatchField() {
+ return MatchField.IPV6_ND_TARGET;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<IPv6Address> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public IPv6Address getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmIpv6NdTarget build() {
+ IPv6Address value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmIpv6NdTargetVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmIpv6NdTarget.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private IPv6Address value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80003e10L;
+ }
+
+ @Override
+ public IPv6Address getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIpv6NdTarget.Builder setValue(IPv6Address value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<IPv6Address> getMatchField() {
+ return MatchField.IPV6_ND_TARGET;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<IPv6Address> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public IPv6Address getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmIpv6NdTarget build() {
+ IPv6Address value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmIpv6NdTargetVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmIpv6NdTarget> {
+ @Override
+ public OFOxmIpv6NdTarget readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80003e10L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80003e10)
+ throw new OFParseError("Wrong typeLen: Expected=0x80003e10L(0x80003e10L), got="+typeLen);
+ IPv6Address value = IPv6Address.read16Bytes(bb);
+
+ OFOxmIpv6NdTargetVer13 oxmIpv6NdTargetVer13 = new OFOxmIpv6NdTargetVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmIpv6NdTargetVer13);
+ return oxmIpv6NdTargetVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmIpv6NdTargetVer13Funnel FUNNEL = new OFOxmIpv6NdTargetVer13Funnel();
+ static class OFOxmIpv6NdTargetVer13Funnel implements Funnel<OFOxmIpv6NdTargetVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmIpv6NdTargetVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80003e10L
+ sink.putInt((int) 0x80003e10);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmIpv6NdTargetVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmIpv6NdTargetVer13 message) {
+ // fixed value property typeLen = 0x80003e10L
+ bb.writeInt((int) 0x80003e10);
+ message.value.write16Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmIpv6NdTargetVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmIpv6NdTargetVer13 other = (OFOxmIpv6NdTargetVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpv6NdTllMaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpv6NdTllMaskedVer13.java
new file mode 100644
index 0000000..0f4e9fb
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpv6NdTllMaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmIpv6NdTllMaskedVer13 implements OFOxmIpv6NdTllMasked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmIpv6NdTllMaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 16;
+
+ private final static MacAddress DEFAULT_VALUE = MacAddress.NONE;
+ private final static MacAddress DEFAULT_VALUE_MASK = MacAddress.NONE;
+
+ // OF message fields
+ private final MacAddress value;
+ private final MacAddress mask;
+//
+ // Immutable default instance
+ final static OFOxmIpv6NdTllMaskedVer13 DEFAULT = new OFOxmIpv6NdTllMaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmIpv6NdTllMaskedVer13(MacAddress value, MacAddress mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x8000430cL;
+ }
+
+ @Override
+ public MacAddress getValue() {
+ return value;
+ }
+
+ @Override
+ public MacAddress getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<MacAddress> getMatchField() {
+ return MatchField.IPV6_ND_TLL;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<MacAddress> getCanonical() {
+ if (MacAddress.NO_MASK.equals(mask)) {
+ return new OFOxmIpv6NdTllVer13(value);
+ } else if(MacAddress.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmIpv6NdTllMasked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmIpv6NdTllMasked.Builder {
+ final OFOxmIpv6NdTllMaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private MacAddress value;
+ private boolean maskSet;
+ private MacAddress mask;
+
+ BuilderWithParent(OFOxmIpv6NdTllMaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x8000430cL;
+ }
+
+ @Override
+ public MacAddress getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIpv6NdTllMasked.Builder setValue(MacAddress value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MacAddress getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmIpv6NdTllMasked.Builder setMask(MacAddress mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<MacAddress> getMatchField() {
+ return MatchField.IPV6_ND_TLL;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<MacAddress> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmIpv6NdTllMasked build() {
+ MacAddress value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ MacAddress mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmIpv6NdTllMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmIpv6NdTllMasked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private MacAddress value;
+ private boolean maskSet;
+ private MacAddress mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x8000430cL;
+ }
+
+ @Override
+ public MacAddress getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIpv6NdTllMasked.Builder setValue(MacAddress value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MacAddress getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmIpv6NdTllMasked.Builder setMask(MacAddress mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<MacAddress> getMatchField() {
+ return MatchField.IPV6_ND_TLL;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<MacAddress> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmIpv6NdTllMasked build() {
+ MacAddress value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ MacAddress mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmIpv6NdTllMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmIpv6NdTllMasked> {
+ @Override
+ public OFOxmIpv6NdTllMasked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x8000430cL
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x8000430c)
+ throw new OFParseError("Wrong typeLen: Expected=0x8000430cL(0x8000430cL), got="+typeLen);
+ MacAddress value = MacAddress.read6Bytes(bb);
+ MacAddress mask = MacAddress.read6Bytes(bb);
+
+ OFOxmIpv6NdTllMaskedVer13 oxmIpv6NdTllMaskedVer13 = new OFOxmIpv6NdTllMaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmIpv6NdTllMaskedVer13);
+ return oxmIpv6NdTllMaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmIpv6NdTllMaskedVer13Funnel FUNNEL = new OFOxmIpv6NdTllMaskedVer13Funnel();
+ static class OFOxmIpv6NdTllMaskedVer13Funnel implements Funnel<OFOxmIpv6NdTllMaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmIpv6NdTllMaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x8000430cL
+ sink.putInt((int) 0x8000430c);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmIpv6NdTllMaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmIpv6NdTllMaskedVer13 message) {
+ // fixed value property typeLen = 0x8000430cL
+ bb.writeInt((int) 0x8000430c);
+ message.value.write6Bytes(bb);
+ message.mask.write6Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmIpv6NdTllMaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmIpv6NdTllMaskedVer13 other = (OFOxmIpv6NdTllMaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpv6NdTllVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpv6NdTllVer13.java
new file mode 100644
index 0000000..e42cff0
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpv6NdTllVer13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmIpv6NdTllVer13 implements OFOxmIpv6NdTll {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmIpv6NdTllVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 10;
+
+ private final static MacAddress DEFAULT_VALUE = MacAddress.NONE;
+
+ // OF message fields
+ private final MacAddress value;
+//
+ // Immutable default instance
+ final static OFOxmIpv6NdTllVer13 DEFAULT = new OFOxmIpv6NdTllVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmIpv6NdTllVer13(MacAddress value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80004206L;
+ }
+
+ @Override
+ public MacAddress getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<MacAddress> getMatchField() {
+ return MatchField.IPV6_ND_TLL;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<MacAddress> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public MacAddress getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmIpv6NdTll.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmIpv6NdTll.Builder {
+ final OFOxmIpv6NdTllVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private MacAddress value;
+
+ BuilderWithParent(OFOxmIpv6NdTllVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80004206L;
+ }
+
+ @Override
+ public MacAddress getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIpv6NdTll.Builder setValue(MacAddress value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<MacAddress> getMatchField() {
+ return MatchField.IPV6_ND_TLL;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<MacAddress> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public MacAddress getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmIpv6NdTll build() {
+ MacAddress value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmIpv6NdTllVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmIpv6NdTll.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private MacAddress value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80004206L;
+ }
+
+ @Override
+ public MacAddress getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIpv6NdTll.Builder setValue(MacAddress value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<MacAddress> getMatchField() {
+ return MatchField.IPV6_ND_TLL;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<MacAddress> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public MacAddress getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmIpv6NdTll build() {
+ MacAddress value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmIpv6NdTllVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmIpv6NdTll> {
+ @Override
+ public OFOxmIpv6NdTll readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80004206L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80004206)
+ throw new OFParseError("Wrong typeLen: Expected=0x80004206L(0x80004206L), got="+typeLen);
+ MacAddress value = MacAddress.read6Bytes(bb);
+
+ OFOxmIpv6NdTllVer13 oxmIpv6NdTllVer13 = new OFOxmIpv6NdTllVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmIpv6NdTllVer13);
+ return oxmIpv6NdTllVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmIpv6NdTllVer13Funnel FUNNEL = new OFOxmIpv6NdTllVer13Funnel();
+ static class OFOxmIpv6NdTllVer13Funnel implements Funnel<OFOxmIpv6NdTllVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmIpv6NdTllVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80004206L
+ sink.putInt((int) 0x80004206);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmIpv6NdTllVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmIpv6NdTllVer13 message) {
+ // fixed value property typeLen = 0x80004206L
+ bb.writeInt((int) 0x80004206);
+ message.value.write6Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmIpv6NdTllVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmIpv6NdTllVer13 other = (OFOxmIpv6NdTllVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpv6SrcMaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpv6SrcMaskedVer13.java
new file mode 100644
index 0000000..55c238f
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpv6SrcMaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmIpv6SrcMaskedVer13 implements OFOxmIpv6SrcMasked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmIpv6SrcMaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 36;
+
+ private final static IPv6Address DEFAULT_VALUE = IPv6Address.NONE;
+ private final static IPv6Address DEFAULT_VALUE_MASK = IPv6Address.NONE;
+
+ // OF message fields
+ private final IPv6Address value;
+ private final IPv6Address mask;
+//
+ // Immutable default instance
+ final static OFOxmIpv6SrcMaskedVer13 DEFAULT = new OFOxmIpv6SrcMaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmIpv6SrcMaskedVer13(IPv6Address value, IPv6Address mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80003520L;
+ }
+
+ @Override
+ public IPv6Address getValue() {
+ return value;
+ }
+
+ @Override
+ public IPv6Address getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<IPv6Address> getMatchField() {
+ return MatchField.IPV6_SRC;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<IPv6Address> getCanonical() {
+ if (IPv6Address.NO_MASK.equals(mask)) {
+ return new OFOxmIpv6SrcVer13(value);
+ } else if(IPv6Address.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmIpv6SrcMasked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmIpv6SrcMasked.Builder {
+ final OFOxmIpv6SrcMaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private IPv6Address value;
+ private boolean maskSet;
+ private IPv6Address mask;
+
+ BuilderWithParent(OFOxmIpv6SrcMaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80003520L;
+ }
+
+ @Override
+ public IPv6Address getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIpv6SrcMasked.Builder setValue(IPv6Address value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public IPv6Address getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmIpv6SrcMasked.Builder setMask(IPv6Address mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<IPv6Address> getMatchField() {
+ return MatchField.IPV6_SRC;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<IPv6Address> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmIpv6SrcMasked build() {
+ IPv6Address value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ IPv6Address mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmIpv6SrcMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmIpv6SrcMasked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private IPv6Address value;
+ private boolean maskSet;
+ private IPv6Address mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80003520L;
+ }
+
+ @Override
+ public IPv6Address getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIpv6SrcMasked.Builder setValue(IPv6Address value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public IPv6Address getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmIpv6SrcMasked.Builder setMask(IPv6Address mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<IPv6Address> getMatchField() {
+ return MatchField.IPV6_SRC;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<IPv6Address> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmIpv6SrcMasked build() {
+ IPv6Address value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ IPv6Address mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmIpv6SrcMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmIpv6SrcMasked> {
+ @Override
+ public OFOxmIpv6SrcMasked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80003520L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80003520)
+ throw new OFParseError("Wrong typeLen: Expected=0x80003520L(0x80003520L), got="+typeLen);
+ IPv6Address value = IPv6Address.read16Bytes(bb);
+ IPv6Address mask = IPv6Address.read16Bytes(bb);
+
+ OFOxmIpv6SrcMaskedVer13 oxmIpv6SrcMaskedVer13 = new OFOxmIpv6SrcMaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmIpv6SrcMaskedVer13);
+ return oxmIpv6SrcMaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmIpv6SrcMaskedVer13Funnel FUNNEL = new OFOxmIpv6SrcMaskedVer13Funnel();
+ static class OFOxmIpv6SrcMaskedVer13Funnel implements Funnel<OFOxmIpv6SrcMaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmIpv6SrcMaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80003520L
+ sink.putInt((int) 0x80003520);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmIpv6SrcMaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmIpv6SrcMaskedVer13 message) {
+ // fixed value property typeLen = 0x80003520L
+ bb.writeInt((int) 0x80003520);
+ message.value.write16Bytes(bb);
+ message.mask.write16Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmIpv6SrcMaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmIpv6SrcMaskedVer13 other = (OFOxmIpv6SrcMaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpv6SrcVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpv6SrcVer13.java
new file mode 100644
index 0000000..84a242a
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpv6SrcVer13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmIpv6SrcVer13 implements OFOxmIpv6Src {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmIpv6SrcVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 20;
+
+ private final static IPv6Address DEFAULT_VALUE = IPv6Address.NONE;
+
+ // OF message fields
+ private final IPv6Address value;
+//
+ // Immutable default instance
+ final static OFOxmIpv6SrcVer13 DEFAULT = new OFOxmIpv6SrcVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmIpv6SrcVer13(IPv6Address value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80003410L;
+ }
+
+ @Override
+ public IPv6Address getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<IPv6Address> getMatchField() {
+ return MatchField.IPV6_SRC;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<IPv6Address> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public IPv6Address getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmIpv6Src.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmIpv6Src.Builder {
+ final OFOxmIpv6SrcVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private IPv6Address value;
+
+ BuilderWithParent(OFOxmIpv6SrcVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80003410L;
+ }
+
+ @Override
+ public IPv6Address getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIpv6Src.Builder setValue(IPv6Address value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<IPv6Address> getMatchField() {
+ return MatchField.IPV6_SRC;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<IPv6Address> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public IPv6Address getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmIpv6Src build() {
+ IPv6Address value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmIpv6SrcVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmIpv6Src.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private IPv6Address value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80003410L;
+ }
+
+ @Override
+ public IPv6Address getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmIpv6Src.Builder setValue(IPv6Address value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<IPv6Address> getMatchField() {
+ return MatchField.IPV6_SRC;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<IPv6Address> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public IPv6Address getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmIpv6Src build() {
+ IPv6Address value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmIpv6SrcVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmIpv6Src> {
+ @Override
+ public OFOxmIpv6Src readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80003410L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80003410)
+ throw new OFParseError("Wrong typeLen: Expected=0x80003410L(0x80003410L), got="+typeLen);
+ IPv6Address value = IPv6Address.read16Bytes(bb);
+
+ OFOxmIpv6SrcVer13 oxmIpv6SrcVer13 = new OFOxmIpv6SrcVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmIpv6SrcVer13);
+ return oxmIpv6SrcVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmIpv6SrcVer13Funnel FUNNEL = new OFOxmIpv6SrcVer13Funnel();
+ static class OFOxmIpv6SrcVer13Funnel implements Funnel<OFOxmIpv6SrcVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmIpv6SrcVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80003410L
+ sink.putInt((int) 0x80003410);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmIpv6SrcVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmIpv6SrcVer13 message) {
+ // fixed value property typeLen = 0x80003410L
+ bb.writeInt((int) 0x80003410);
+ message.value.write16Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmIpv6SrcVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmIpv6SrcVer13 other = (OFOxmIpv6SrcVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmMetadataMaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmMetadataMaskedVer13.java
new file mode 100644
index 0000000..361b7e9
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmMetadataMaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmMetadataMaskedVer13 implements OFOxmMetadataMasked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmMetadataMaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 20;
+
+ private final static OFMetadata DEFAULT_VALUE = OFMetadata.NONE;
+ private final static OFMetadata DEFAULT_VALUE_MASK = OFMetadata.NONE;
+
+ // OF message fields
+ private final OFMetadata value;
+ private final OFMetadata mask;
+//
+ // Immutable default instance
+ final static OFOxmMetadataMaskedVer13 DEFAULT = new OFOxmMetadataMaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmMetadataMaskedVer13(OFMetadata value, OFMetadata mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80000510L;
+ }
+
+ @Override
+ public OFMetadata getValue() {
+ return value;
+ }
+
+ @Override
+ public OFMetadata getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<OFMetadata> getMatchField() {
+ return MatchField.METADATA;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<OFMetadata> getCanonical() {
+ if (OFMetadata.NO_MASK.equals(mask)) {
+ return new OFOxmMetadataVer13(value);
+ } else if(OFMetadata.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmMetadataMasked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmMetadataMasked.Builder {
+ final OFOxmMetadataMaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private OFMetadata value;
+ private boolean maskSet;
+ private OFMetadata mask;
+
+ BuilderWithParent(OFOxmMetadataMaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80000510L;
+ }
+
+ @Override
+ public OFMetadata getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmMetadataMasked.Builder setValue(OFMetadata value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFMetadata getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmMetadataMasked.Builder setMask(OFMetadata mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<OFMetadata> getMatchField() {
+ return MatchField.METADATA;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<OFMetadata> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmMetadataMasked build() {
+ OFMetadata value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ OFMetadata mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmMetadataMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmMetadataMasked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private OFMetadata value;
+ private boolean maskSet;
+ private OFMetadata mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80000510L;
+ }
+
+ @Override
+ public OFMetadata getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmMetadataMasked.Builder setValue(OFMetadata value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFMetadata getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmMetadataMasked.Builder setMask(OFMetadata mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<OFMetadata> getMatchField() {
+ return MatchField.METADATA;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<OFMetadata> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmMetadataMasked build() {
+ OFMetadata value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ OFMetadata mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmMetadataMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmMetadataMasked> {
+ @Override
+ public OFOxmMetadataMasked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80000510L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80000510)
+ throw new OFParseError("Wrong typeLen: Expected=0x80000510L(0x80000510L), got="+typeLen);
+ OFMetadata value = OFMetadata.read8Bytes(bb);
+ OFMetadata mask = OFMetadata.read8Bytes(bb);
+
+ OFOxmMetadataMaskedVer13 oxmMetadataMaskedVer13 = new OFOxmMetadataMaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmMetadataMaskedVer13);
+ return oxmMetadataMaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmMetadataMaskedVer13Funnel FUNNEL = new OFOxmMetadataMaskedVer13Funnel();
+ static class OFOxmMetadataMaskedVer13Funnel implements Funnel<OFOxmMetadataMaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmMetadataMaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80000510L
+ sink.putInt((int) 0x80000510);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmMetadataMaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmMetadataMaskedVer13 message) {
+ // fixed value property typeLen = 0x80000510L
+ bb.writeInt((int) 0x80000510);
+ message.value.write8Bytes(bb);
+ message.mask.write8Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmMetadataMaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmMetadataMaskedVer13 other = (OFOxmMetadataMaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmMetadataVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmMetadataVer13.java
new file mode 100644
index 0000000..664abb3
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmMetadataVer13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmMetadataVer13 implements OFOxmMetadata {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmMetadataVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 12;
+
+ private final static OFMetadata DEFAULT_VALUE = OFMetadata.NONE;
+
+ // OF message fields
+ private final OFMetadata value;
+//
+ // Immutable default instance
+ final static OFOxmMetadataVer13 DEFAULT = new OFOxmMetadataVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmMetadataVer13(OFMetadata value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80000408L;
+ }
+
+ @Override
+ public OFMetadata getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<OFMetadata> getMatchField() {
+ return MatchField.METADATA;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<OFMetadata> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public OFMetadata getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmMetadata.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmMetadata.Builder {
+ final OFOxmMetadataVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private OFMetadata value;
+
+ BuilderWithParent(OFOxmMetadataVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80000408L;
+ }
+
+ @Override
+ public OFMetadata getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmMetadata.Builder setValue(OFMetadata value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<OFMetadata> getMatchField() {
+ return MatchField.METADATA;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<OFMetadata> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFMetadata getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmMetadata build() {
+ OFMetadata value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmMetadataVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmMetadata.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private OFMetadata value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80000408L;
+ }
+
+ @Override
+ public OFMetadata getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmMetadata.Builder setValue(OFMetadata value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<OFMetadata> getMatchField() {
+ return MatchField.METADATA;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<OFMetadata> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFMetadata getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmMetadata build() {
+ OFMetadata value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmMetadataVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmMetadata> {
+ @Override
+ public OFOxmMetadata readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80000408L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80000408)
+ throw new OFParseError("Wrong typeLen: Expected=0x80000408L(0x80000408L), got="+typeLen);
+ OFMetadata value = OFMetadata.read8Bytes(bb);
+
+ OFOxmMetadataVer13 oxmMetadataVer13 = new OFOxmMetadataVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmMetadataVer13);
+ return oxmMetadataVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmMetadataVer13Funnel FUNNEL = new OFOxmMetadataVer13Funnel();
+ static class OFOxmMetadataVer13Funnel implements Funnel<OFOxmMetadataVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmMetadataVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80000408L
+ sink.putInt((int) 0x80000408);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmMetadataVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmMetadataVer13 message) {
+ // fixed value property typeLen = 0x80000408L
+ bb.writeInt((int) 0x80000408);
+ message.value.write8Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmMetadataVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmMetadataVer13 other = (OFOxmMetadataVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmMplsLabelMaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmMplsLabelMaskedVer13.java
new file mode 100644
index 0000000..497a841
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmMplsLabelMaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmMplsLabelMaskedVer13 implements OFOxmMplsLabelMasked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmMplsLabelMaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 12;
+
+ private final static U32 DEFAULT_VALUE = U32.ZERO;
+ private final static U32 DEFAULT_VALUE_MASK = U32.ZERO;
+
+ // OF message fields
+ private final U32 value;
+ private final U32 mask;
+//
+ // Immutable default instance
+ final static OFOxmMplsLabelMaskedVer13 DEFAULT = new OFOxmMplsLabelMaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmMplsLabelMaskedVer13(U32 value, U32 mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80004508L;
+ }
+
+ @Override
+ public U32 getValue() {
+ return value;
+ }
+
+ @Override
+ public U32 getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<U32> getMatchField() {
+ return MatchField.MPLS_LABEL;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<U32> getCanonical() {
+ if (U32.NO_MASK.equals(mask)) {
+ return new OFOxmMplsLabelVer13(value);
+ } else if(U32.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmMplsLabelMasked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmMplsLabelMasked.Builder {
+ final OFOxmMplsLabelMaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private U32 value;
+ private boolean maskSet;
+ private U32 mask;
+
+ BuilderWithParent(OFOxmMplsLabelMaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80004508L;
+ }
+
+ @Override
+ public U32 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmMplsLabelMasked.Builder setValue(U32 value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public U32 getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmMplsLabelMasked.Builder setMask(U32 mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<U32> getMatchField() {
+ return MatchField.MPLS_LABEL;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<U32> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmMplsLabelMasked build() {
+ U32 value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ U32 mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmMplsLabelMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmMplsLabelMasked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private U32 value;
+ private boolean maskSet;
+ private U32 mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80004508L;
+ }
+
+ @Override
+ public U32 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmMplsLabelMasked.Builder setValue(U32 value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public U32 getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmMplsLabelMasked.Builder setMask(U32 mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<U32> getMatchField() {
+ return MatchField.MPLS_LABEL;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<U32> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmMplsLabelMasked build() {
+ U32 value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ U32 mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmMplsLabelMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmMplsLabelMasked> {
+ @Override
+ public OFOxmMplsLabelMasked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80004508L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80004508)
+ throw new OFParseError("Wrong typeLen: Expected=0x80004508L(0x80004508L), got="+typeLen);
+ U32 value = U32.of(bb.readInt());
+ U32 mask = U32.of(bb.readInt());
+
+ OFOxmMplsLabelMaskedVer13 oxmMplsLabelMaskedVer13 = new OFOxmMplsLabelMaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmMplsLabelMaskedVer13);
+ return oxmMplsLabelMaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmMplsLabelMaskedVer13Funnel FUNNEL = new OFOxmMplsLabelMaskedVer13Funnel();
+ static class OFOxmMplsLabelMaskedVer13Funnel implements Funnel<OFOxmMplsLabelMaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmMplsLabelMaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80004508L
+ sink.putInt((int) 0x80004508);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmMplsLabelMaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmMplsLabelMaskedVer13 message) {
+ // fixed value property typeLen = 0x80004508L
+ bb.writeInt((int) 0x80004508);
+ bb.writeInt(message.value.getRaw());
+ bb.writeInt(message.mask.getRaw());
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmMplsLabelMaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmMplsLabelMaskedVer13 other = (OFOxmMplsLabelMaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmMplsLabelVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmMplsLabelVer13.java
new file mode 100644
index 0000000..23684b3
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmMplsLabelVer13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmMplsLabelVer13 implements OFOxmMplsLabel {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmMplsLabelVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static U32 DEFAULT_VALUE = U32.ZERO;
+
+ // OF message fields
+ private final U32 value;
+//
+ // Immutable default instance
+ final static OFOxmMplsLabelVer13 DEFAULT = new OFOxmMplsLabelVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmMplsLabelVer13(U32 value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80004404L;
+ }
+
+ @Override
+ public U32 getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<U32> getMatchField() {
+ return MatchField.MPLS_LABEL;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<U32> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public U32 getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmMplsLabel.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmMplsLabel.Builder {
+ final OFOxmMplsLabelVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private U32 value;
+
+ BuilderWithParent(OFOxmMplsLabelVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80004404L;
+ }
+
+ @Override
+ public U32 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmMplsLabel.Builder setValue(U32 value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<U32> getMatchField() {
+ return MatchField.MPLS_LABEL;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<U32> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public U32 getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmMplsLabel build() {
+ U32 value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmMplsLabelVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmMplsLabel.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private U32 value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80004404L;
+ }
+
+ @Override
+ public U32 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmMplsLabel.Builder setValue(U32 value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<U32> getMatchField() {
+ return MatchField.MPLS_LABEL;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<U32> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public U32 getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmMplsLabel build() {
+ U32 value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmMplsLabelVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmMplsLabel> {
+ @Override
+ public OFOxmMplsLabel readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80004404L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80004404)
+ throw new OFParseError("Wrong typeLen: Expected=0x80004404L(0x80004404L), got="+typeLen);
+ U32 value = U32.of(bb.readInt());
+
+ OFOxmMplsLabelVer13 oxmMplsLabelVer13 = new OFOxmMplsLabelVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmMplsLabelVer13);
+ return oxmMplsLabelVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmMplsLabelVer13Funnel FUNNEL = new OFOxmMplsLabelVer13Funnel();
+ static class OFOxmMplsLabelVer13Funnel implements Funnel<OFOxmMplsLabelVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmMplsLabelVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80004404L
+ sink.putInt((int) 0x80004404);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmMplsLabelVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmMplsLabelVer13 message) {
+ // fixed value property typeLen = 0x80004404L
+ bb.writeInt((int) 0x80004404);
+ bb.writeInt(message.value.getRaw());
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmMplsLabelVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmMplsLabelVer13 other = (OFOxmMplsLabelVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmMplsTcMaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmMplsTcMaskedVer13.java
new file mode 100644
index 0000000..e60efa5
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmMplsTcMaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmMplsTcMaskedVer13 implements OFOxmMplsTcMasked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmMplsTcMaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 6;
+
+ private final static U8 DEFAULT_VALUE = U8.ZERO;
+ private final static U8 DEFAULT_VALUE_MASK = U8.ZERO;
+
+ // OF message fields
+ private final U8 value;
+ private final U8 mask;
+//
+ // Immutable default instance
+ final static OFOxmMplsTcMaskedVer13 DEFAULT = new OFOxmMplsTcMaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmMplsTcMaskedVer13(U8 value, U8 mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80004702L;
+ }
+
+ @Override
+ public U8 getValue() {
+ return value;
+ }
+
+ @Override
+ public U8 getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<U8> getMatchField() {
+ return MatchField.MPLS_TC;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<U8> getCanonical() {
+ if (U8.NO_MASK.equals(mask)) {
+ return new OFOxmMplsTcVer13(value);
+ } else if(U8.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmMplsTcMasked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmMplsTcMasked.Builder {
+ final OFOxmMplsTcMaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private U8 value;
+ private boolean maskSet;
+ private U8 mask;
+
+ BuilderWithParent(OFOxmMplsTcMaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80004702L;
+ }
+
+ @Override
+ public U8 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmMplsTcMasked.Builder setValue(U8 value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public U8 getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmMplsTcMasked.Builder setMask(U8 mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<U8> getMatchField() {
+ return MatchField.MPLS_TC;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<U8> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmMplsTcMasked build() {
+ U8 value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ U8 mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmMplsTcMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmMplsTcMasked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private U8 value;
+ private boolean maskSet;
+ private U8 mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80004702L;
+ }
+
+ @Override
+ public U8 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmMplsTcMasked.Builder setValue(U8 value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public U8 getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmMplsTcMasked.Builder setMask(U8 mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<U8> getMatchField() {
+ return MatchField.MPLS_TC;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<U8> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmMplsTcMasked build() {
+ U8 value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ U8 mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmMplsTcMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmMplsTcMasked> {
+ @Override
+ public OFOxmMplsTcMasked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80004702L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80004702)
+ throw new OFParseError("Wrong typeLen: Expected=0x80004702L(0x80004702L), got="+typeLen);
+ U8 value = U8.of(bb.readByte());
+ U8 mask = U8.of(bb.readByte());
+
+ OFOxmMplsTcMaskedVer13 oxmMplsTcMaskedVer13 = new OFOxmMplsTcMaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmMplsTcMaskedVer13);
+ return oxmMplsTcMaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmMplsTcMaskedVer13Funnel FUNNEL = new OFOxmMplsTcMaskedVer13Funnel();
+ static class OFOxmMplsTcMaskedVer13Funnel implements Funnel<OFOxmMplsTcMaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmMplsTcMaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80004702L
+ sink.putInt((int) 0x80004702);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmMplsTcMaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmMplsTcMaskedVer13 message) {
+ // fixed value property typeLen = 0x80004702L
+ bb.writeInt((int) 0x80004702);
+ bb.writeByte(message.value.getRaw());
+ bb.writeByte(message.mask.getRaw());
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmMplsTcMaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmMplsTcMaskedVer13 other = (OFOxmMplsTcMaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmMplsTcVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmMplsTcVer13.java
new file mode 100644
index 0000000..15b685a
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmMplsTcVer13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmMplsTcVer13 implements OFOxmMplsTc {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmMplsTcVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 5;
+
+ private final static U8 DEFAULT_VALUE = U8.ZERO;
+
+ // OF message fields
+ private final U8 value;
+//
+ // Immutable default instance
+ final static OFOxmMplsTcVer13 DEFAULT = new OFOxmMplsTcVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmMplsTcVer13(U8 value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80004601L;
+ }
+
+ @Override
+ public U8 getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<U8> getMatchField() {
+ return MatchField.MPLS_TC;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<U8> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public U8 getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmMplsTc.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmMplsTc.Builder {
+ final OFOxmMplsTcVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private U8 value;
+
+ BuilderWithParent(OFOxmMplsTcVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80004601L;
+ }
+
+ @Override
+ public U8 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmMplsTc.Builder setValue(U8 value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<U8> getMatchField() {
+ return MatchField.MPLS_TC;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<U8> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public U8 getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmMplsTc build() {
+ U8 value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmMplsTcVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmMplsTc.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private U8 value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80004601L;
+ }
+
+ @Override
+ public U8 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmMplsTc.Builder setValue(U8 value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<U8> getMatchField() {
+ return MatchField.MPLS_TC;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<U8> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public U8 getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmMplsTc build() {
+ U8 value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmMplsTcVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmMplsTc> {
+ @Override
+ public OFOxmMplsTc readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80004601L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80004601)
+ throw new OFParseError("Wrong typeLen: Expected=0x80004601L(0x80004601L), got="+typeLen);
+ U8 value = U8.of(bb.readByte());
+
+ OFOxmMplsTcVer13 oxmMplsTcVer13 = new OFOxmMplsTcVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmMplsTcVer13);
+ return oxmMplsTcVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmMplsTcVer13Funnel FUNNEL = new OFOxmMplsTcVer13Funnel();
+ static class OFOxmMplsTcVer13Funnel implements Funnel<OFOxmMplsTcVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmMplsTcVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80004601L
+ sink.putInt((int) 0x80004601);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmMplsTcVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmMplsTcVer13 message) {
+ // fixed value property typeLen = 0x80004601L
+ bb.writeInt((int) 0x80004601);
+ bb.writeByte(message.value.getRaw());
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmMplsTcVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmMplsTcVer13 other = (OFOxmMplsTcVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmSctpDstMaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmSctpDstMaskedVer13.java
new file mode 100644
index 0000000..03901ed
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmSctpDstMaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmSctpDstMaskedVer13 implements OFOxmSctpDstMasked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmSctpDstMaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static TransportPort DEFAULT_VALUE = TransportPort.NONE;
+ private final static TransportPort DEFAULT_VALUE_MASK = TransportPort.NONE;
+
+ // OF message fields
+ private final TransportPort value;
+ private final TransportPort mask;
+//
+ // Immutable default instance
+ final static OFOxmSctpDstMaskedVer13 DEFAULT = new OFOxmSctpDstMaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmSctpDstMaskedVer13(TransportPort value, TransportPort mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80002504L;
+ }
+
+ @Override
+ public TransportPort getValue() {
+ return value;
+ }
+
+ @Override
+ public TransportPort getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<TransportPort> getMatchField() {
+ return MatchField.SCTP_DST;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<TransportPort> getCanonical() {
+ if (TransportPort.NO_MASK.equals(mask)) {
+ return new OFOxmSctpDstVer13(value);
+ } else if(TransportPort.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmSctpDstMasked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmSctpDstMasked.Builder {
+ final OFOxmSctpDstMaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private TransportPort value;
+ private boolean maskSet;
+ private TransportPort mask;
+
+ BuilderWithParent(OFOxmSctpDstMaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80002504L;
+ }
+
+ @Override
+ public TransportPort getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmSctpDstMasked.Builder setValue(TransportPort value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public TransportPort getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmSctpDstMasked.Builder setMask(TransportPort mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<TransportPort> getMatchField() {
+ return MatchField.SCTP_DST;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<TransportPort> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmSctpDstMasked build() {
+ TransportPort value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ TransportPort mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmSctpDstMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmSctpDstMasked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private TransportPort value;
+ private boolean maskSet;
+ private TransportPort mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80002504L;
+ }
+
+ @Override
+ public TransportPort getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmSctpDstMasked.Builder setValue(TransportPort value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public TransportPort getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmSctpDstMasked.Builder setMask(TransportPort mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<TransportPort> getMatchField() {
+ return MatchField.SCTP_DST;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<TransportPort> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmSctpDstMasked build() {
+ TransportPort value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ TransportPort mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmSctpDstMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmSctpDstMasked> {
+ @Override
+ public OFOxmSctpDstMasked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80002504L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80002504)
+ throw new OFParseError("Wrong typeLen: Expected=0x80002504L(0x80002504L), got="+typeLen);
+ TransportPort value = TransportPort.read2Bytes(bb);
+ TransportPort mask = TransportPort.read2Bytes(bb);
+
+ OFOxmSctpDstMaskedVer13 oxmSctpDstMaskedVer13 = new OFOxmSctpDstMaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmSctpDstMaskedVer13);
+ return oxmSctpDstMaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmSctpDstMaskedVer13Funnel FUNNEL = new OFOxmSctpDstMaskedVer13Funnel();
+ static class OFOxmSctpDstMaskedVer13Funnel implements Funnel<OFOxmSctpDstMaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmSctpDstMaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80002504L
+ sink.putInt((int) 0x80002504);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmSctpDstMaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmSctpDstMaskedVer13 message) {
+ // fixed value property typeLen = 0x80002504L
+ bb.writeInt((int) 0x80002504);
+ message.value.write2Bytes(bb);
+ message.mask.write2Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmSctpDstMaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmSctpDstMaskedVer13 other = (OFOxmSctpDstMaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmSctpDstVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmSctpDstVer13.java
new file mode 100644
index 0000000..955a99d
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmSctpDstVer13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmSctpDstVer13 implements OFOxmSctpDst {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmSctpDstVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 6;
+
+ private final static TransportPort DEFAULT_VALUE = TransportPort.NONE;
+
+ // OF message fields
+ private final TransportPort value;
+//
+ // Immutable default instance
+ final static OFOxmSctpDstVer13 DEFAULT = new OFOxmSctpDstVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmSctpDstVer13(TransportPort value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80002402L;
+ }
+
+ @Override
+ public TransportPort getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<TransportPort> getMatchField() {
+ return MatchField.SCTP_DST;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<TransportPort> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public TransportPort getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmSctpDst.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmSctpDst.Builder {
+ final OFOxmSctpDstVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private TransportPort value;
+
+ BuilderWithParent(OFOxmSctpDstVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80002402L;
+ }
+
+ @Override
+ public TransportPort getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmSctpDst.Builder setValue(TransportPort value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<TransportPort> getMatchField() {
+ return MatchField.SCTP_DST;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<TransportPort> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public TransportPort getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmSctpDst build() {
+ TransportPort value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmSctpDstVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmSctpDst.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private TransportPort value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80002402L;
+ }
+
+ @Override
+ public TransportPort getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmSctpDst.Builder setValue(TransportPort value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<TransportPort> getMatchField() {
+ return MatchField.SCTP_DST;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<TransportPort> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public TransportPort getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmSctpDst build() {
+ TransportPort value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmSctpDstVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmSctpDst> {
+ @Override
+ public OFOxmSctpDst readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80002402L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80002402)
+ throw new OFParseError("Wrong typeLen: Expected=0x80002402L(0x80002402L), got="+typeLen);
+ TransportPort value = TransportPort.read2Bytes(bb);
+
+ OFOxmSctpDstVer13 oxmSctpDstVer13 = new OFOxmSctpDstVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmSctpDstVer13);
+ return oxmSctpDstVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmSctpDstVer13Funnel FUNNEL = new OFOxmSctpDstVer13Funnel();
+ static class OFOxmSctpDstVer13Funnel implements Funnel<OFOxmSctpDstVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmSctpDstVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80002402L
+ sink.putInt((int) 0x80002402);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmSctpDstVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmSctpDstVer13 message) {
+ // fixed value property typeLen = 0x80002402L
+ bb.writeInt((int) 0x80002402);
+ message.value.write2Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmSctpDstVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmSctpDstVer13 other = (OFOxmSctpDstVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmSctpSrcMaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmSctpSrcMaskedVer13.java
new file mode 100644
index 0000000..a44a994
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmSctpSrcMaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmSctpSrcMaskedVer13 implements OFOxmSctpSrcMasked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmSctpSrcMaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static TransportPort DEFAULT_VALUE = TransportPort.NONE;
+ private final static TransportPort DEFAULT_VALUE_MASK = TransportPort.NONE;
+
+ // OF message fields
+ private final TransportPort value;
+ private final TransportPort mask;
+//
+ // Immutable default instance
+ final static OFOxmSctpSrcMaskedVer13 DEFAULT = new OFOxmSctpSrcMaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmSctpSrcMaskedVer13(TransportPort value, TransportPort mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80002304L;
+ }
+
+ @Override
+ public TransportPort getValue() {
+ return value;
+ }
+
+ @Override
+ public TransportPort getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<TransportPort> getMatchField() {
+ return MatchField.SCTP_SRC;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<TransportPort> getCanonical() {
+ if (TransportPort.NO_MASK.equals(mask)) {
+ return new OFOxmSctpSrcVer13(value);
+ } else if(TransportPort.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmSctpSrcMasked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmSctpSrcMasked.Builder {
+ final OFOxmSctpSrcMaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private TransportPort value;
+ private boolean maskSet;
+ private TransportPort mask;
+
+ BuilderWithParent(OFOxmSctpSrcMaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80002304L;
+ }
+
+ @Override
+ public TransportPort getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmSctpSrcMasked.Builder setValue(TransportPort value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public TransportPort getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmSctpSrcMasked.Builder setMask(TransportPort mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<TransportPort> getMatchField() {
+ return MatchField.SCTP_SRC;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<TransportPort> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmSctpSrcMasked build() {
+ TransportPort value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ TransportPort mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmSctpSrcMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmSctpSrcMasked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private TransportPort value;
+ private boolean maskSet;
+ private TransportPort mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80002304L;
+ }
+
+ @Override
+ public TransportPort getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmSctpSrcMasked.Builder setValue(TransportPort value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public TransportPort getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmSctpSrcMasked.Builder setMask(TransportPort mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<TransportPort> getMatchField() {
+ return MatchField.SCTP_SRC;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<TransportPort> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmSctpSrcMasked build() {
+ TransportPort value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ TransportPort mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmSctpSrcMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmSctpSrcMasked> {
+ @Override
+ public OFOxmSctpSrcMasked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80002304L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80002304)
+ throw new OFParseError("Wrong typeLen: Expected=0x80002304L(0x80002304L), got="+typeLen);
+ TransportPort value = TransportPort.read2Bytes(bb);
+ TransportPort mask = TransportPort.read2Bytes(bb);
+
+ OFOxmSctpSrcMaskedVer13 oxmSctpSrcMaskedVer13 = new OFOxmSctpSrcMaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmSctpSrcMaskedVer13);
+ return oxmSctpSrcMaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmSctpSrcMaskedVer13Funnel FUNNEL = new OFOxmSctpSrcMaskedVer13Funnel();
+ static class OFOxmSctpSrcMaskedVer13Funnel implements Funnel<OFOxmSctpSrcMaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmSctpSrcMaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80002304L
+ sink.putInt((int) 0x80002304);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmSctpSrcMaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmSctpSrcMaskedVer13 message) {
+ // fixed value property typeLen = 0x80002304L
+ bb.writeInt((int) 0x80002304);
+ message.value.write2Bytes(bb);
+ message.mask.write2Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmSctpSrcMaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmSctpSrcMaskedVer13 other = (OFOxmSctpSrcMaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmSctpSrcVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmSctpSrcVer13.java
new file mode 100644
index 0000000..631b9b1
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmSctpSrcVer13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmSctpSrcVer13 implements OFOxmSctpSrc {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmSctpSrcVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 6;
+
+ private final static TransportPort DEFAULT_VALUE = TransportPort.NONE;
+
+ // OF message fields
+ private final TransportPort value;
+//
+ // Immutable default instance
+ final static OFOxmSctpSrcVer13 DEFAULT = new OFOxmSctpSrcVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmSctpSrcVer13(TransportPort value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80002202L;
+ }
+
+ @Override
+ public TransportPort getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<TransportPort> getMatchField() {
+ return MatchField.SCTP_SRC;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<TransportPort> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public TransportPort getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmSctpSrc.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmSctpSrc.Builder {
+ final OFOxmSctpSrcVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private TransportPort value;
+
+ BuilderWithParent(OFOxmSctpSrcVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80002202L;
+ }
+
+ @Override
+ public TransportPort getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmSctpSrc.Builder setValue(TransportPort value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<TransportPort> getMatchField() {
+ return MatchField.SCTP_SRC;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<TransportPort> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public TransportPort getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmSctpSrc build() {
+ TransportPort value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmSctpSrcVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmSctpSrc.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private TransportPort value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80002202L;
+ }
+
+ @Override
+ public TransportPort getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmSctpSrc.Builder setValue(TransportPort value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<TransportPort> getMatchField() {
+ return MatchField.SCTP_SRC;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<TransportPort> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public TransportPort getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmSctpSrc build() {
+ TransportPort value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmSctpSrcVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmSctpSrc> {
+ @Override
+ public OFOxmSctpSrc readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80002202L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80002202)
+ throw new OFParseError("Wrong typeLen: Expected=0x80002202L(0x80002202L), got="+typeLen);
+ TransportPort value = TransportPort.read2Bytes(bb);
+
+ OFOxmSctpSrcVer13 oxmSctpSrcVer13 = new OFOxmSctpSrcVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmSctpSrcVer13);
+ return oxmSctpSrcVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmSctpSrcVer13Funnel FUNNEL = new OFOxmSctpSrcVer13Funnel();
+ static class OFOxmSctpSrcVer13Funnel implements Funnel<OFOxmSctpSrcVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmSctpSrcVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80002202L
+ sink.putInt((int) 0x80002202);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmSctpSrcVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmSctpSrcVer13 message) {
+ // fixed value property typeLen = 0x80002202L
+ bb.writeInt((int) 0x80002202);
+ message.value.write2Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmSctpSrcVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmSctpSrcVer13 other = (OFOxmSctpSrcVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmTcpDstMaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmTcpDstMaskedVer13.java
new file mode 100644
index 0000000..264b828
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmTcpDstMaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmTcpDstMaskedVer13 implements OFOxmTcpDstMasked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmTcpDstMaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static TransportPort DEFAULT_VALUE = TransportPort.NONE;
+ private final static TransportPort DEFAULT_VALUE_MASK = TransportPort.NONE;
+
+ // OF message fields
+ private final TransportPort value;
+ private final TransportPort mask;
+//
+ // Immutable default instance
+ final static OFOxmTcpDstMaskedVer13 DEFAULT = new OFOxmTcpDstMaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmTcpDstMaskedVer13(TransportPort value, TransportPort mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80001d04L;
+ }
+
+ @Override
+ public TransportPort getValue() {
+ return value;
+ }
+
+ @Override
+ public TransportPort getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<TransportPort> getMatchField() {
+ return MatchField.TCP_DST;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<TransportPort> getCanonical() {
+ if (TransportPort.NO_MASK.equals(mask)) {
+ return new OFOxmTcpDstVer13(value);
+ } else if(TransportPort.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmTcpDstMasked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmTcpDstMasked.Builder {
+ final OFOxmTcpDstMaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private TransportPort value;
+ private boolean maskSet;
+ private TransportPort mask;
+
+ BuilderWithParent(OFOxmTcpDstMaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80001d04L;
+ }
+
+ @Override
+ public TransportPort getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmTcpDstMasked.Builder setValue(TransportPort value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public TransportPort getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmTcpDstMasked.Builder setMask(TransportPort mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<TransportPort> getMatchField() {
+ return MatchField.TCP_DST;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<TransportPort> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmTcpDstMasked build() {
+ TransportPort value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ TransportPort mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmTcpDstMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmTcpDstMasked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private TransportPort value;
+ private boolean maskSet;
+ private TransportPort mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80001d04L;
+ }
+
+ @Override
+ public TransportPort getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmTcpDstMasked.Builder setValue(TransportPort value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public TransportPort getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmTcpDstMasked.Builder setMask(TransportPort mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<TransportPort> getMatchField() {
+ return MatchField.TCP_DST;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<TransportPort> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmTcpDstMasked build() {
+ TransportPort value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ TransportPort mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmTcpDstMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmTcpDstMasked> {
+ @Override
+ public OFOxmTcpDstMasked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80001d04L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80001d04)
+ throw new OFParseError("Wrong typeLen: Expected=0x80001d04L(0x80001d04L), got="+typeLen);
+ TransportPort value = TransportPort.read2Bytes(bb);
+ TransportPort mask = TransportPort.read2Bytes(bb);
+
+ OFOxmTcpDstMaskedVer13 oxmTcpDstMaskedVer13 = new OFOxmTcpDstMaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmTcpDstMaskedVer13);
+ return oxmTcpDstMaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmTcpDstMaskedVer13Funnel FUNNEL = new OFOxmTcpDstMaskedVer13Funnel();
+ static class OFOxmTcpDstMaskedVer13Funnel implements Funnel<OFOxmTcpDstMaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmTcpDstMaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80001d04L
+ sink.putInt((int) 0x80001d04);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmTcpDstMaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmTcpDstMaskedVer13 message) {
+ // fixed value property typeLen = 0x80001d04L
+ bb.writeInt((int) 0x80001d04);
+ message.value.write2Bytes(bb);
+ message.mask.write2Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmTcpDstMaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmTcpDstMaskedVer13 other = (OFOxmTcpDstMaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmTcpDstVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmTcpDstVer13.java
new file mode 100644
index 0000000..b828dd2
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmTcpDstVer13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmTcpDstVer13 implements OFOxmTcpDst {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmTcpDstVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 6;
+
+ private final static TransportPort DEFAULT_VALUE = TransportPort.NONE;
+
+ // OF message fields
+ private final TransportPort value;
+//
+ // Immutable default instance
+ final static OFOxmTcpDstVer13 DEFAULT = new OFOxmTcpDstVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmTcpDstVer13(TransportPort value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80001c02L;
+ }
+
+ @Override
+ public TransportPort getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<TransportPort> getMatchField() {
+ return MatchField.TCP_DST;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<TransportPort> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public TransportPort getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmTcpDst.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmTcpDst.Builder {
+ final OFOxmTcpDstVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private TransportPort value;
+
+ BuilderWithParent(OFOxmTcpDstVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80001c02L;
+ }
+
+ @Override
+ public TransportPort getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmTcpDst.Builder setValue(TransportPort value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<TransportPort> getMatchField() {
+ return MatchField.TCP_DST;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<TransportPort> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public TransportPort getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmTcpDst build() {
+ TransportPort value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmTcpDstVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmTcpDst.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private TransportPort value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80001c02L;
+ }
+
+ @Override
+ public TransportPort getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmTcpDst.Builder setValue(TransportPort value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<TransportPort> getMatchField() {
+ return MatchField.TCP_DST;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<TransportPort> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public TransportPort getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmTcpDst build() {
+ TransportPort value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmTcpDstVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmTcpDst> {
+ @Override
+ public OFOxmTcpDst readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80001c02L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80001c02)
+ throw new OFParseError("Wrong typeLen: Expected=0x80001c02L(0x80001c02L), got="+typeLen);
+ TransportPort value = TransportPort.read2Bytes(bb);
+
+ OFOxmTcpDstVer13 oxmTcpDstVer13 = new OFOxmTcpDstVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmTcpDstVer13);
+ return oxmTcpDstVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmTcpDstVer13Funnel FUNNEL = new OFOxmTcpDstVer13Funnel();
+ static class OFOxmTcpDstVer13Funnel implements Funnel<OFOxmTcpDstVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmTcpDstVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80001c02L
+ sink.putInt((int) 0x80001c02);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmTcpDstVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmTcpDstVer13 message) {
+ // fixed value property typeLen = 0x80001c02L
+ bb.writeInt((int) 0x80001c02);
+ message.value.write2Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmTcpDstVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmTcpDstVer13 other = (OFOxmTcpDstVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmTcpSrcMaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmTcpSrcMaskedVer13.java
new file mode 100644
index 0000000..8352fcb
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmTcpSrcMaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmTcpSrcMaskedVer13 implements OFOxmTcpSrcMasked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmTcpSrcMaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static TransportPort DEFAULT_VALUE = TransportPort.NONE;
+ private final static TransportPort DEFAULT_VALUE_MASK = TransportPort.NONE;
+
+ // OF message fields
+ private final TransportPort value;
+ private final TransportPort mask;
+//
+ // Immutable default instance
+ final static OFOxmTcpSrcMaskedVer13 DEFAULT = new OFOxmTcpSrcMaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmTcpSrcMaskedVer13(TransportPort value, TransportPort mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80001b04L;
+ }
+
+ @Override
+ public TransportPort getValue() {
+ return value;
+ }
+
+ @Override
+ public TransportPort getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<TransportPort> getMatchField() {
+ return MatchField.TCP_SRC;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<TransportPort> getCanonical() {
+ if (TransportPort.NO_MASK.equals(mask)) {
+ return new OFOxmTcpSrcVer13(value);
+ } else if(TransportPort.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmTcpSrcMasked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmTcpSrcMasked.Builder {
+ final OFOxmTcpSrcMaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private TransportPort value;
+ private boolean maskSet;
+ private TransportPort mask;
+
+ BuilderWithParent(OFOxmTcpSrcMaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80001b04L;
+ }
+
+ @Override
+ public TransportPort getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmTcpSrcMasked.Builder setValue(TransportPort value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public TransportPort getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmTcpSrcMasked.Builder setMask(TransportPort mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<TransportPort> getMatchField() {
+ return MatchField.TCP_SRC;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<TransportPort> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmTcpSrcMasked build() {
+ TransportPort value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ TransportPort mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmTcpSrcMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmTcpSrcMasked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private TransportPort value;
+ private boolean maskSet;
+ private TransportPort mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80001b04L;
+ }
+
+ @Override
+ public TransportPort getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmTcpSrcMasked.Builder setValue(TransportPort value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public TransportPort getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmTcpSrcMasked.Builder setMask(TransportPort mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<TransportPort> getMatchField() {
+ return MatchField.TCP_SRC;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<TransportPort> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmTcpSrcMasked build() {
+ TransportPort value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ TransportPort mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmTcpSrcMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmTcpSrcMasked> {
+ @Override
+ public OFOxmTcpSrcMasked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80001b04L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80001b04)
+ throw new OFParseError("Wrong typeLen: Expected=0x80001b04L(0x80001b04L), got="+typeLen);
+ TransportPort value = TransportPort.read2Bytes(bb);
+ TransportPort mask = TransportPort.read2Bytes(bb);
+
+ OFOxmTcpSrcMaskedVer13 oxmTcpSrcMaskedVer13 = new OFOxmTcpSrcMaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmTcpSrcMaskedVer13);
+ return oxmTcpSrcMaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmTcpSrcMaskedVer13Funnel FUNNEL = new OFOxmTcpSrcMaskedVer13Funnel();
+ static class OFOxmTcpSrcMaskedVer13Funnel implements Funnel<OFOxmTcpSrcMaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmTcpSrcMaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80001b04L
+ sink.putInt((int) 0x80001b04);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmTcpSrcMaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmTcpSrcMaskedVer13 message) {
+ // fixed value property typeLen = 0x80001b04L
+ bb.writeInt((int) 0x80001b04);
+ message.value.write2Bytes(bb);
+ message.mask.write2Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmTcpSrcMaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmTcpSrcMaskedVer13 other = (OFOxmTcpSrcMaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmTcpSrcVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmTcpSrcVer13.java
new file mode 100644
index 0000000..7ad66bf
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmTcpSrcVer13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmTcpSrcVer13 implements OFOxmTcpSrc {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmTcpSrcVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 6;
+
+ private final static TransportPort DEFAULT_VALUE = TransportPort.NONE;
+
+ // OF message fields
+ private final TransportPort value;
+//
+ // Immutable default instance
+ final static OFOxmTcpSrcVer13 DEFAULT = new OFOxmTcpSrcVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmTcpSrcVer13(TransportPort value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80001a02L;
+ }
+
+ @Override
+ public TransportPort getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<TransportPort> getMatchField() {
+ return MatchField.TCP_SRC;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<TransportPort> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public TransportPort getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmTcpSrc.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmTcpSrc.Builder {
+ final OFOxmTcpSrcVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private TransportPort value;
+
+ BuilderWithParent(OFOxmTcpSrcVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80001a02L;
+ }
+
+ @Override
+ public TransportPort getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmTcpSrc.Builder setValue(TransportPort value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<TransportPort> getMatchField() {
+ return MatchField.TCP_SRC;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<TransportPort> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public TransportPort getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmTcpSrc build() {
+ TransportPort value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmTcpSrcVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmTcpSrc.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private TransportPort value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80001a02L;
+ }
+
+ @Override
+ public TransportPort getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmTcpSrc.Builder setValue(TransportPort value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<TransportPort> getMatchField() {
+ return MatchField.TCP_SRC;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<TransportPort> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public TransportPort getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmTcpSrc build() {
+ TransportPort value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmTcpSrcVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmTcpSrc> {
+ @Override
+ public OFOxmTcpSrc readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80001a02L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80001a02)
+ throw new OFParseError("Wrong typeLen: Expected=0x80001a02L(0x80001a02L), got="+typeLen);
+ TransportPort value = TransportPort.read2Bytes(bb);
+
+ OFOxmTcpSrcVer13 oxmTcpSrcVer13 = new OFOxmTcpSrcVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmTcpSrcVer13);
+ return oxmTcpSrcVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmTcpSrcVer13Funnel FUNNEL = new OFOxmTcpSrcVer13Funnel();
+ static class OFOxmTcpSrcVer13Funnel implements Funnel<OFOxmTcpSrcVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmTcpSrcVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80001a02L
+ sink.putInt((int) 0x80001a02);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmTcpSrcVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmTcpSrcVer13 message) {
+ // fixed value property typeLen = 0x80001a02L
+ bb.writeInt((int) 0x80001a02);
+ message.value.write2Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmTcpSrcVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmTcpSrcVer13 other = (OFOxmTcpSrcVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmTunnelIdMaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmTunnelIdMaskedVer13.java
new file mode 100644
index 0000000..ba550db
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmTunnelIdMaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmTunnelIdMaskedVer13 implements OFOxmTunnelIdMasked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmTunnelIdMaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 20;
+
+ private final static U64 DEFAULT_VALUE = U64.ZERO;
+ private final static U64 DEFAULT_VALUE_MASK = U64.ZERO;
+
+ // OF message fields
+ private final U64 value;
+ private final U64 mask;
+//
+ // Immutable default instance
+ final static OFOxmTunnelIdMaskedVer13 DEFAULT = new OFOxmTunnelIdMaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmTunnelIdMaskedVer13(U64 value, U64 mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80004d10L;
+ }
+
+ @Override
+ public U64 getValue() {
+ return value;
+ }
+
+ @Override
+ public U64 getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<U64> getMatchField() {
+ return MatchField.TUNNEL_ID;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<U64> getCanonical() {
+ if (U64.NO_MASK.equals(mask)) {
+ return new OFOxmTunnelIdVer13(value);
+ } else if(U64.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmTunnelIdMasked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmTunnelIdMasked.Builder {
+ final OFOxmTunnelIdMaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private U64 value;
+ private boolean maskSet;
+ private U64 mask;
+
+ BuilderWithParent(OFOxmTunnelIdMaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80004d10L;
+ }
+
+ @Override
+ public U64 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmTunnelIdMasked.Builder setValue(U64 value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public U64 getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmTunnelIdMasked.Builder setMask(U64 mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<U64> getMatchField() {
+ return MatchField.TUNNEL_ID;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<U64> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmTunnelIdMasked build() {
+ U64 value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ U64 mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmTunnelIdMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmTunnelIdMasked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private U64 value;
+ private boolean maskSet;
+ private U64 mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80004d10L;
+ }
+
+ @Override
+ public U64 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmTunnelIdMasked.Builder setValue(U64 value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public U64 getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmTunnelIdMasked.Builder setMask(U64 mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<U64> getMatchField() {
+ return MatchField.TUNNEL_ID;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<U64> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmTunnelIdMasked build() {
+ U64 value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ U64 mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmTunnelIdMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmTunnelIdMasked> {
+ @Override
+ public OFOxmTunnelIdMasked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80004d10L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80004d10)
+ throw new OFParseError("Wrong typeLen: Expected=0x80004d10L(0x80004d10L), got="+typeLen);
+ U64 value = U64.ofRaw(bb.readLong());
+ U64 mask = U64.ofRaw(bb.readLong());
+
+ OFOxmTunnelIdMaskedVer13 oxmTunnelIdMaskedVer13 = new OFOxmTunnelIdMaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmTunnelIdMaskedVer13);
+ return oxmTunnelIdMaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmTunnelIdMaskedVer13Funnel FUNNEL = new OFOxmTunnelIdMaskedVer13Funnel();
+ static class OFOxmTunnelIdMaskedVer13Funnel implements Funnel<OFOxmTunnelIdMaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmTunnelIdMaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80004d10L
+ sink.putInt((int) 0x80004d10);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmTunnelIdMaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmTunnelIdMaskedVer13 message) {
+ // fixed value property typeLen = 0x80004d10L
+ bb.writeInt((int) 0x80004d10);
+ bb.writeLong(message.value.getValue());
+ bb.writeLong(message.mask.getValue());
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmTunnelIdMaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmTunnelIdMaskedVer13 other = (OFOxmTunnelIdMaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmTunnelIdVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmTunnelIdVer13.java
new file mode 100644
index 0000000..1a7ef01
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmTunnelIdVer13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmTunnelIdVer13 implements OFOxmTunnelId {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmTunnelIdVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 12;
+
+ private final static U64 DEFAULT_VALUE = U64.ZERO;
+
+ // OF message fields
+ private final U64 value;
+//
+ // Immutable default instance
+ final static OFOxmTunnelIdVer13 DEFAULT = new OFOxmTunnelIdVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmTunnelIdVer13(U64 value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80004c08L;
+ }
+
+ @Override
+ public U64 getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<U64> getMatchField() {
+ return MatchField.TUNNEL_ID;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<U64> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public U64 getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmTunnelId.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmTunnelId.Builder {
+ final OFOxmTunnelIdVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private U64 value;
+
+ BuilderWithParent(OFOxmTunnelIdVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80004c08L;
+ }
+
+ @Override
+ public U64 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmTunnelId.Builder setValue(U64 value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<U64> getMatchField() {
+ return MatchField.TUNNEL_ID;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<U64> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public U64 getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmTunnelId build() {
+ U64 value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmTunnelIdVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmTunnelId.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private U64 value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80004c08L;
+ }
+
+ @Override
+ public U64 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmTunnelId.Builder setValue(U64 value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<U64> getMatchField() {
+ return MatchField.TUNNEL_ID;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<U64> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public U64 getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmTunnelId build() {
+ U64 value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmTunnelIdVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmTunnelId> {
+ @Override
+ public OFOxmTunnelId readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80004c08L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80004c08)
+ throw new OFParseError("Wrong typeLen: Expected=0x80004c08L(0x80004c08L), got="+typeLen);
+ U64 value = U64.ofRaw(bb.readLong());
+
+ OFOxmTunnelIdVer13 oxmTunnelIdVer13 = new OFOxmTunnelIdVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmTunnelIdVer13);
+ return oxmTunnelIdVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmTunnelIdVer13Funnel FUNNEL = new OFOxmTunnelIdVer13Funnel();
+ static class OFOxmTunnelIdVer13Funnel implements Funnel<OFOxmTunnelIdVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmTunnelIdVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80004c08L
+ sink.putInt((int) 0x80004c08);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmTunnelIdVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmTunnelIdVer13 message) {
+ // fixed value property typeLen = 0x80004c08L
+ bb.writeInt((int) 0x80004c08);
+ bb.writeLong(message.value.getValue());
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmTunnelIdVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmTunnelIdVer13 other = (OFOxmTunnelIdVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmUdpDstMaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmUdpDstMaskedVer13.java
new file mode 100644
index 0000000..f1cb1ad
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmUdpDstMaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmUdpDstMaskedVer13 implements OFOxmUdpDstMasked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmUdpDstMaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static TransportPort DEFAULT_VALUE = TransportPort.NONE;
+ private final static TransportPort DEFAULT_VALUE_MASK = TransportPort.NONE;
+
+ // OF message fields
+ private final TransportPort value;
+ private final TransportPort mask;
+//
+ // Immutable default instance
+ final static OFOxmUdpDstMaskedVer13 DEFAULT = new OFOxmUdpDstMaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmUdpDstMaskedVer13(TransportPort value, TransportPort mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80002104L;
+ }
+
+ @Override
+ public TransportPort getValue() {
+ return value;
+ }
+
+ @Override
+ public TransportPort getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<TransportPort> getMatchField() {
+ return MatchField.UDP_DST;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<TransportPort> getCanonical() {
+ if (TransportPort.NO_MASK.equals(mask)) {
+ return new OFOxmUdpDstVer13(value);
+ } else if(TransportPort.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmUdpDstMasked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmUdpDstMasked.Builder {
+ final OFOxmUdpDstMaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private TransportPort value;
+ private boolean maskSet;
+ private TransportPort mask;
+
+ BuilderWithParent(OFOxmUdpDstMaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80002104L;
+ }
+
+ @Override
+ public TransportPort getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmUdpDstMasked.Builder setValue(TransportPort value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public TransportPort getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmUdpDstMasked.Builder setMask(TransportPort mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<TransportPort> getMatchField() {
+ return MatchField.UDP_DST;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<TransportPort> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmUdpDstMasked build() {
+ TransportPort value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ TransportPort mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmUdpDstMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmUdpDstMasked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private TransportPort value;
+ private boolean maskSet;
+ private TransportPort mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80002104L;
+ }
+
+ @Override
+ public TransportPort getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmUdpDstMasked.Builder setValue(TransportPort value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public TransportPort getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmUdpDstMasked.Builder setMask(TransportPort mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<TransportPort> getMatchField() {
+ return MatchField.UDP_DST;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<TransportPort> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmUdpDstMasked build() {
+ TransportPort value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ TransportPort mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmUdpDstMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmUdpDstMasked> {
+ @Override
+ public OFOxmUdpDstMasked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80002104L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80002104)
+ throw new OFParseError("Wrong typeLen: Expected=0x80002104L(0x80002104L), got="+typeLen);
+ TransportPort value = TransportPort.read2Bytes(bb);
+ TransportPort mask = TransportPort.read2Bytes(bb);
+
+ OFOxmUdpDstMaskedVer13 oxmUdpDstMaskedVer13 = new OFOxmUdpDstMaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmUdpDstMaskedVer13);
+ return oxmUdpDstMaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmUdpDstMaskedVer13Funnel FUNNEL = new OFOxmUdpDstMaskedVer13Funnel();
+ static class OFOxmUdpDstMaskedVer13Funnel implements Funnel<OFOxmUdpDstMaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmUdpDstMaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80002104L
+ sink.putInt((int) 0x80002104);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmUdpDstMaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmUdpDstMaskedVer13 message) {
+ // fixed value property typeLen = 0x80002104L
+ bb.writeInt((int) 0x80002104);
+ message.value.write2Bytes(bb);
+ message.mask.write2Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmUdpDstMaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmUdpDstMaskedVer13 other = (OFOxmUdpDstMaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmUdpDstVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmUdpDstVer13.java
new file mode 100644
index 0000000..e1032ce
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmUdpDstVer13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmUdpDstVer13 implements OFOxmUdpDst {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmUdpDstVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 6;
+
+ private final static TransportPort DEFAULT_VALUE = TransportPort.NONE;
+
+ // OF message fields
+ private final TransportPort value;
+//
+ // Immutable default instance
+ final static OFOxmUdpDstVer13 DEFAULT = new OFOxmUdpDstVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmUdpDstVer13(TransportPort value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80002002L;
+ }
+
+ @Override
+ public TransportPort getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<TransportPort> getMatchField() {
+ return MatchField.UDP_DST;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<TransportPort> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public TransportPort getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmUdpDst.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmUdpDst.Builder {
+ final OFOxmUdpDstVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private TransportPort value;
+
+ BuilderWithParent(OFOxmUdpDstVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80002002L;
+ }
+
+ @Override
+ public TransportPort getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmUdpDst.Builder setValue(TransportPort value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<TransportPort> getMatchField() {
+ return MatchField.UDP_DST;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<TransportPort> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public TransportPort getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmUdpDst build() {
+ TransportPort value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmUdpDstVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmUdpDst.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private TransportPort value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80002002L;
+ }
+
+ @Override
+ public TransportPort getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmUdpDst.Builder setValue(TransportPort value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<TransportPort> getMatchField() {
+ return MatchField.UDP_DST;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<TransportPort> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public TransportPort getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmUdpDst build() {
+ TransportPort value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmUdpDstVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmUdpDst> {
+ @Override
+ public OFOxmUdpDst readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80002002L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80002002)
+ throw new OFParseError("Wrong typeLen: Expected=0x80002002L(0x80002002L), got="+typeLen);
+ TransportPort value = TransportPort.read2Bytes(bb);
+
+ OFOxmUdpDstVer13 oxmUdpDstVer13 = new OFOxmUdpDstVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmUdpDstVer13);
+ return oxmUdpDstVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmUdpDstVer13Funnel FUNNEL = new OFOxmUdpDstVer13Funnel();
+ static class OFOxmUdpDstVer13Funnel implements Funnel<OFOxmUdpDstVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmUdpDstVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80002002L
+ sink.putInt((int) 0x80002002);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmUdpDstVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmUdpDstVer13 message) {
+ // fixed value property typeLen = 0x80002002L
+ bb.writeInt((int) 0x80002002);
+ message.value.write2Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmUdpDstVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmUdpDstVer13 other = (OFOxmUdpDstVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmUdpSrcMaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmUdpSrcMaskedVer13.java
new file mode 100644
index 0000000..41e1757
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmUdpSrcMaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmUdpSrcMaskedVer13 implements OFOxmUdpSrcMasked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmUdpSrcMaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static TransportPort DEFAULT_VALUE = TransportPort.NONE;
+ private final static TransportPort DEFAULT_VALUE_MASK = TransportPort.NONE;
+
+ // OF message fields
+ private final TransportPort value;
+ private final TransportPort mask;
+//
+ // Immutable default instance
+ final static OFOxmUdpSrcMaskedVer13 DEFAULT = new OFOxmUdpSrcMaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmUdpSrcMaskedVer13(TransportPort value, TransportPort mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80001f04L;
+ }
+
+ @Override
+ public TransportPort getValue() {
+ return value;
+ }
+
+ @Override
+ public TransportPort getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<TransportPort> getMatchField() {
+ return MatchField.UDP_SRC;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<TransportPort> getCanonical() {
+ if (TransportPort.NO_MASK.equals(mask)) {
+ return new OFOxmUdpSrcVer13(value);
+ } else if(TransportPort.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmUdpSrcMasked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmUdpSrcMasked.Builder {
+ final OFOxmUdpSrcMaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private TransportPort value;
+ private boolean maskSet;
+ private TransportPort mask;
+
+ BuilderWithParent(OFOxmUdpSrcMaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80001f04L;
+ }
+
+ @Override
+ public TransportPort getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmUdpSrcMasked.Builder setValue(TransportPort value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public TransportPort getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmUdpSrcMasked.Builder setMask(TransportPort mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<TransportPort> getMatchField() {
+ return MatchField.UDP_SRC;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<TransportPort> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmUdpSrcMasked build() {
+ TransportPort value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ TransportPort mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmUdpSrcMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmUdpSrcMasked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private TransportPort value;
+ private boolean maskSet;
+ private TransportPort mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80001f04L;
+ }
+
+ @Override
+ public TransportPort getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmUdpSrcMasked.Builder setValue(TransportPort value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public TransportPort getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmUdpSrcMasked.Builder setMask(TransportPort mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<TransportPort> getMatchField() {
+ return MatchField.UDP_SRC;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<TransportPort> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmUdpSrcMasked build() {
+ TransportPort value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ TransportPort mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmUdpSrcMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmUdpSrcMasked> {
+ @Override
+ public OFOxmUdpSrcMasked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80001f04L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80001f04)
+ throw new OFParseError("Wrong typeLen: Expected=0x80001f04L(0x80001f04L), got="+typeLen);
+ TransportPort value = TransportPort.read2Bytes(bb);
+ TransportPort mask = TransportPort.read2Bytes(bb);
+
+ OFOxmUdpSrcMaskedVer13 oxmUdpSrcMaskedVer13 = new OFOxmUdpSrcMaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmUdpSrcMaskedVer13);
+ return oxmUdpSrcMaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmUdpSrcMaskedVer13Funnel FUNNEL = new OFOxmUdpSrcMaskedVer13Funnel();
+ static class OFOxmUdpSrcMaskedVer13Funnel implements Funnel<OFOxmUdpSrcMaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmUdpSrcMaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80001f04L
+ sink.putInt((int) 0x80001f04);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmUdpSrcMaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmUdpSrcMaskedVer13 message) {
+ // fixed value property typeLen = 0x80001f04L
+ bb.writeInt((int) 0x80001f04);
+ message.value.write2Bytes(bb);
+ message.mask.write2Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmUdpSrcMaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmUdpSrcMaskedVer13 other = (OFOxmUdpSrcMaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmUdpSrcVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmUdpSrcVer13.java
new file mode 100644
index 0000000..98916b0
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmUdpSrcVer13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmUdpSrcVer13 implements OFOxmUdpSrc {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmUdpSrcVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 6;
+
+ private final static TransportPort DEFAULT_VALUE = TransportPort.NONE;
+
+ // OF message fields
+ private final TransportPort value;
+//
+ // Immutable default instance
+ final static OFOxmUdpSrcVer13 DEFAULT = new OFOxmUdpSrcVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmUdpSrcVer13(TransportPort value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80001e02L;
+ }
+
+ @Override
+ public TransportPort getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<TransportPort> getMatchField() {
+ return MatchField.UDP_SRC;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<TransportPort> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public TransportPort getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmUdpSrc.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmUdpSrc.Builder {
+ final OFOxmUdpSrcVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private TransportPort value;
+
+ BuilderWithParent(OFOxmUdpSrcVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80001e02L;
+ }
+
+ @Override
+ public TransportPort getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmUdpSrc.Builder setValue(TransportPort value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<TransportPort> getMatchField() {
+ return MatchField.UDP_SRC;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<TransportPort> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public TransportPort getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmUdpSrc build() {
+ TransportPort value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmUdpSrcVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmUdpSrc.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private TransportPort value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80001e02L;
+ }
+
+ @Override
+ public TransportPort getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmUdpSrc.Builder setValue(TransportPort value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<TransportPort> getMatchField() {
+ return MatchField.UDP_SRC;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<TransportPort> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public TransportPort getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmUdpSrc build() {
+ TransportPort value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmUdpSrcVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmUdpSrc> {
+ @Override
+ public OFOxmUdpSrc readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80001e02L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80001e02)
+ throw new OFParseError("Wrong typeLen: Expected=0x80001e02L(0x80001e02L), got="+typeLen);
+ TransportPort value = TransportPort.read2Bytes(bb);
+
+ OFOxmUdpSrcVer13 oxmUdpSrcVer13 = new OFOxmUdpSrcVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmUdpSrcVer13);
+ return oxmUdpSrcVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmUdpSrcVer13Funnel FUNNEL = new OFOxmUdpSrcVer13Funnel();
+ static class OFOxmUdpSrcVer13Funnel implements Funnel<OFOxmUdpSrcVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmUdpSrcVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80001e02L
+ sink.putInt((int) 0x80001e02);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmUdpSrcVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmUdpSrcVer13 message) {
+ // fixed value property typeLen = 0x80001e02L
+ bb.writeInt((int) 0x80001e02);
+ message.value.write2Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmUdpSrcVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmUdpSrcVer13 other = (OFOxmUdpSrcVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmVer13.java
new file mode 100644
index 0000000..c8b2e59
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmVer13.java
@@ -0,0 +1,380 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_virtual_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.jboss.netty.buffer.ChannelBuffer;
+
+abstract class OFOxmVer13 {
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 4;
+
+
+ public final static OFOxmVer13.Reader READER = new Reader();
+
+ static class Reader implements OFMessageReader<OFOxm<?>> {
+ @Override
+ public OFOxm<?> readFrom(ChannelBuffer bb) throws OFParseError {
+ if(bb.readableBytes() < MINIMUM_LENGTH)
+ return null;
+ int start = bb.readerIndex();
+ int typeLen = bb.readInt();
+ bb.readerIndex(start);
+ switch(typeLen) {
+ case (int) 0x80002a02:
+ // discriminator value 0x80002a02L=0x80002a02L for class OFOxmArpOpVer13
+ return OFOxmArpOpVer13.READER.readFrom(bb);
+ case (int) 0x80002b04:
+ // discriminator value 0x80002b04L=0x80002b04L for class OFOxmArpOpMaskedVer13
+ return OFOxmArpOpMaskedVer13.READER.readFrom(bb);
+ case (int) 0x80003006:
+ // discriminator value 0x80003006L=0x80003006L for class OFOxmArpShaVer13
+ return OFOxmArpShaVer13.READER.readFrom(bb);
+ case (int) 0x8000310c:
+ // discriminator value 0x8000310cL=0x8000310cL for class OFOxmArpShaMaskedVer13
+ return OFOxmArpShaMaskedVer13.READER.readFrom(bb);
+ case (int) 0x80002c04:
+ // discriminator value 0x80002c04L=0x80002c04L for class OFOxmArpSpaVer13
+ return OFOxmArpSpaVer13.READER.readFrom(bb);
+ case (int) 0x80002d08:
+ // discriminator value 0x80002d08L=0x80002d08L for class OFOxmArpSpaMaskedVer13
+ return OFOxmArpSpaMaskedVer13.READER.readFrom(bb);
+ case (int) 0x80003206:
+ // discriminator value 0x80003206L=0x80003206L for class OFOxmArpThaVer13
+ return OFOxmArpThaVer13.READER.readFrom(bb);
+ case (int) 0x8000330c:
+ // discriminator value 0x8000330cL=0x8000330cL for class OFOxmArpThaMaskedVer13
+ return OFOxmArpThaMaskedVer13.READER.readFrom(bb);
+ case (int) 0x80002e04:
+ // discriminator value 0x80002e04L=0x80002e04L for class OFOxmArpTpaVer13
+ return OFOxmArpTpaVer13.READER.readFrom(bb);
+ case (int) 0x80002f08:
+ // discriminator value 0x80002f08L=0x80002f08L for class OFOxmArpTpaMaskedVer13
+ return OFOxmArpTpaMaskedVer13.READER.readFrom(bb);
+ case 0x30e04:
+ // discriminator value 0x30e04L=0x30e04L for class OFOxmBsnEgrPortGroupIdVer13
+ return OFOxmBsnEgrPortGroupIdVer13.READER.readFrom(bb);
+ case 0x30f08:
+ // discriminator value 0x30f08L=0x30f08L for class OFOxmBsnEgrPortGroupIdMaskedVer13
+ return OFOxmBsnEgrPortGroupIdMaskedVer13.READER.readFrom(bb);
+ case 0x30601:
+ // discriminator value 0x30601L=0x30601L for class OFOxmBsnGlobalVrfAllowedVer13
+ return OFOxmBsnGlobalVrfAllowedVer13.READER.readFrom(bb);
+ case 0x30702:
+ // discriminator value 0x30702L=0x30702L for class OFOxmBsnGlobalVrfAllowedMaskedVer13
+ return OFOxmBsnGlobalVrfAllowedMaskedVer13.READER.readFrom(bb);
+ case 0x30010:
+ // discriminator value 0x30010L=0x30010L for class OFOxmBsnInPorts128Ver13
+ return OFOxmBsnInPorts128Ver13.READER.readFrom(bb);
+ case 0x30120:
+ // discriminator value 0x30120L=0x30120L for class OFOxmBsnInPorts128MaskedVer13
+ return OFOxmBsnInPorts128MaskedVer13.READER.readFrom(bb);
+ case 0x30c04:
+ // discriminator value 0x30c04L=0x30c04L for class OFOxmBsnL3DstClassIdVer13
+ return OFOxmBsnL3DstClassIdVer13.READER.readFrom(bb);
+ case 0x30d08:
+ // discriminator value 0x30d08L=0x30d08L for class OFOxmBsnL3DstClassIdMaskedVer13
+ return OFOxmBsnL3DstClassIdMaskedVer13.READER.readFrom(bb);
+ case 0x30804:
+ // discriminator value 0x30804L=0x30804L for class OFOxmBsnL3InterfaceClassIdVer13
+ return OFOxmBsnL3InterfaceClassIdVer13.READER.readFrom(bb);
+ case 0x30908:
+ // discriminator value 0x30908L=0x30908L for class OFOxmBsnL3InterfaceClassIdMaskedVer13
+ return OFOxmBsnL3InterfaceClassIdMaskedVer13.READER.readFrom(bb);
+ case 0x30a04:
+ // discriminator value 0x30a04L=0x30a04L for class OFOxmBsnL3SrcClassIdVer13
+ return OFOxmBsnL3SrcClassIdVer13.READER.readFrom(bb);
+ case 0x30b08:
+ // discriminator value 0x30b08L=0x30b08L for class OFOxmBsnL3SrcClassIdMaskedVer13
+ return OFOxmBsnL3SrcClassIdMaskedVer13.READER.readFrom(bb);
+ case 0x30204:
+ // discriminator value 0x30204L=0x30204L for class OFOxmBsnLagIdVer13
+ return OFOxmBsnLagIdVer13.READER.readFrom(bb);
+ case 0x30308:
+ // discriminator value 0x30308L=0x30308L for class OFOxmBsnLagIdMaskedVer13
+ return OFOxmBsnLagIdMaskedVer13.READER.readFrom(bb);
+ case 0x32002:
+ // discriminator value 0x32002L=0x32002L for class OFOxmBsnTcpFlagsVer13
+ return OFOxmBsnTcpFlagsVer13.READER.readFrom(bb);
+ case 0x32104:
+ // discriminator value 0x32104L=0x32104L for class OFOxmBsnTcpFlagsMaskedVer13
+ return OFOxmBsnTcpFlagsMaskedVer13.READER.readFrom(bb);
+ case 0x31004:
+ // discriminator value 0x31004L=0x31004L for class OFOxmBsnUdf0Ver13
+ return OFOxmBsnUdf0Ver13.READER.readFrom(bb);
+ case 0x31108:
+ // discriminator value 0x31108L=0x31108L for class OFOxmBsnUdf0MaskedVer13
+ return OFOxmBsnUdf0MaskedVer13.READER.readFrom(bb);
+ case 0x31204:
+ // discriminator value 0x31204L=0x31204L for class OFOxmBsnUdf1Ver13
+ return OFOxmBsnUdf1Ver13.READER.readFrom(bb);
+ case 0x31308:
+ // discriminator value 0x31308L=0x31308L for class OFOxmBsnUdf1MaskedVer13
+ return OFOxmBsnUdf1MaskedVer13.READER.readFrom(bb);
+ case 0x31404:
+ // discriminator value 0x31404L=0x31404L for class OFOxmBsnUdf2Ver13
+ return OFOxmBsnUdf2Ver13.READER.readFrom(bb);
+ case 0x31508:
+ // discriminator value 0x31508L=0x31508L for class OFOxmBsnUdf2MaskedVer13
+ return OFOxmBsnUdf2MaskedVer13.READER.readFrom(bb);
+ case 0x31604:
+ // discriminator value 0x31604L=0x31604L for class OFOxmBsnUdf3Ver13
+ return OFOxmBsnUdf3Ver13.READER.readFrom(bb);
+ case 0x31708:
+ // discriminator value 0x31708L=0x31708L for class OFOxmBsnUdf3MaskedVer13
+ return OFOxmBsnUdf3MaskedVer13.READER.readFrom(bb);
+ case 0x31804:
+ // discriminator value 0x31804L=0x31804L for class OFOxmBsnUdf4Ver13
+ return OFOxmBsnUdf4Ver13.READER.readFrom(bb);
+ case 0x31908:
+ // discriminator value 0x31908L=0x31908L for class OFOxmBsnUdf4MaskedVer13
+ return OFOxmBsnUdf4MaskedVer13.READER.readFrom(bb);
+ case 0x31a04:
+ // discriminator value 0x31a04L=0x31a04L for class OFOxmBsnUdf5Ver13
+ return OFOxmBsnUdf5Ver13.READER.readFrom(bb);
+ case 0x31b08:
+ // discriminator value 0x31b08L=0x31b08L for class OFOxmBsnUdf5MaskedVer13
+ return OFOxmBsnUdf5MaskedVer13.READER.readFrom(bb);
+ case 0x31c04:
+ // discriminator value 0x31c04L=0x31c04L for class OFOxmBsnUdf6Ver13
+ return OFOxmBsnUdf6Ver13.READER.readFrom(bb);
+ case 0x31d08:
+ // discriminator value 0x31d08L=0x31d08L for class OFOxmBsnUdf6MaskedVer13
+ return OFOxmBsnUdf6MaskedVer13.READER.readFrom(bb);
+ case 0x31e04:
+ // discriminator value 0x31e04L=0x31e04L for class OFOxmBsnUdf7Ver13
+ return OFOxmBsnUdf7Ver13.READER.readFrom(bb);
+ case 0x31f08:
+ // discriminator value 0x31f08L=0x31f08L for class OFOxmBsnUdf7MaskedVer13
+ return OFOxmBsnUdf7MaskedVer13.READER.readFrom(bb);
+ case 0x32204:
+ // discriminator value 0x32204L=0x32204L for class OFOxmBsnVlanXlatePortGroupIdVer13
+ return OFOxmBsnVlanXlatePortGroupIdVer13.READER.readFrom(bb);
+ case 0x32308:
+ // discriminator value 0x32308L=0x32308L for class OFOxmBsnVlanXlatePortGroupIdMaskedVer13
+ return OFOxmBsnVlanXlatePortGroupIdMaskedVer13.READER.readFrom(bb);
+ case 0x30404:
+ // discriminator value 0x30404L=0x30404L for class OFOxmBsnVrfVer13
+ return OFOxmBsnVrfVer13.READER.readFrom(bb);
+ case 0x30508:
+ // discriminator value 0x30508L=0x30508L for class OFOxmBsnVrfMaskedVer13
+ return OFOxmBsnVrfMaskedVer13.READER.readFrom(bb);
+ case (int) 0x80000606:
+ // discriminator value 0x80000606L=0x80000606L for class OFOxmEthDstVer13
+ return OFOxmEthDstVer13.READER.readFrom(bb);
+ case (int) 0x8000070c:
+ // discriminator value 0x8000070cL=0x8000070cL for class OFOxmEthDstMaskedVer13
+ return OFOxmEthDstMaskedVer13.READER.readFrom(bb);
+ case (int) 0x80000806:
+ // discriminator value 0x80000806L=0x80000806L for class OFOxmEthSrcVer13
+ return OFOxmEthSrcVer13.READER.readFrom(bb);
+ case (int) 0x8000090c:
+ // discriminator value 0x8000090cL=0x8000090cL for class OFOxmEthSrcMaskedVer13
+ return OFOxmEthSrcMaskedVer13.READER.readFrom(bb);
+ case (int) 0x80000a02:
+ // discriminator value 0x80000a02L=0x80000a02L for class OFOxmEthTypeVer13
+ return OFOxmEthTypeVer13.READER.readFrom(bb);
+ case (int) 0x80000b04:
+ // discriminator value 0x80000b04L=0x80000b04L for class OFOxmEthTypeMaskedVer13
+ return OFOxmEthTypeMaskedVer13.READER.readFrom(bb);
+ case (int) 0x80002801:
+ // discriminator value 0x80002801L=0x80002801L for class OFOxmIcmpv4CodeVer13
+ return OFOxmIcmpv4CodeVer13.READER.readFrom(bb);
+ case (int) 0x80002902:
+ // discriminator value 0x80002902L=0x80002902L for class OFOxmIcmpv4CodeMaskedVer13
+ return OFOxmIcmpv4CodeMaskedVer13.READER.readFrom(bb);
+ case (int) 0x80002601:
+ // discriminator value 0x80002601L=0x80002601L for class OFOxmIcmpv4TypeVer13
+ return OFOxmIcmpv4TypeVer13.READER.readFrom(bb);
+ case (int) 0x80002702:
+ // discriminator value 0x80002702L=0x80002702L for class OFOxmIcmpv4TypeMaskedVer13
+ return OFOxmIcmpv4TypeMaskedVer13.READER.readFrom(bb);
+ case (int) 0x80003c01:
+ // discriminator value 0x80003c01L=0x80003c01L for class OFOxmIcmpv6CodeVer13
+ return OFOxmIcmpv6CodeVer13.READER.readFrom(bb);
+ case (int) 0x80003d02:
+ // discriminator value 0x80003d02L=0x80003d02L for class OFOxmIcmpv6CodeMaskedVer13
+ return OFOxmIcmpv6CodeMaskedVer13.READER.readFrom(bb);
+ case (int) 0x80003a01:
+ // discriminator value 0x80003a01L=0x80003a01L for class OFOxmIcmpv6TypeVer13
+ return OFOxmIcmpv6TypeVer13.READER.readFrom(bb);
+ case (int) 0x80003b02:
+ // discriminator value 0x80003b02L=0x80003b02L for class OFOxmIcmpv6TypeMaskedVer13
+ return OFOxmIcmpv6TypeMaskedVer13.READER.readFrom(bb);
+ case (int) 0x80000204:
+ // discriminator value 0x80000204L=0x80000204L for class OFOxmInPhyPortVer13
+ return OFOxmInPhyPortVer13.READER.readFrom(bb);
+ case (int) 0x80000308:
+ // discriminator value 0x80000308L=0x80000308L for class OFOxmInPhyPortMaskedVer13
+ return OFOxmInPhyPortMaskedVer13.READER.readFrom(bb);
+ case (int) 0x80000004:
+ // discriminator value 0x80000004L=0x80000004L for class OFOxmInPortVer13
+ return OFOxmInPortVer13.READER.readFrom(bb);
+ case (int) 0x80000108:
+ // discriminator value 0x80000108L=0x80000108L for class OFOxmInPortMaskedVer13
+ return OFOxmInPortMaskedVer13.READER.readFrom(bb);
+ case (int) 0x80001001:
+ // discriminator value 0x80001001L=0x80001001L for class OFOxmIpDscpVer13
+ return OFOxmIpDscpVer13.READER.readFrom(bb);
+ case (int) 0x80001102:
+ // discriminator value 0x80001102L=0x80001102L for class OFOxmIpDscpMaskedVer13
+ return OFOxmIpDscpMaskedVer13.READER.readFrom(bb);
+ case (int) 0x80001201:
+ // discriminator value 0x80001201L=0x80001201L for class OFOxmIpEcnVer13
+ return OFOxmIpEcnVer13.READER.readFrom(bb);
+ case (int) 0x80001302:
+ // discriminator value 0x80001302L=0x80001302L for class OFOxmIpEcnMaskedVer13
+ return OFOxmIpEcnMaskedVer13.READER.readFrom(bb);
+ case (int) 0x80001401:
+ // discriminator value 0x80001401L=0x80001401L for class OFOxmIpProtoVer13
+ return OFOxmIpProtoVer13.READER.readFrom(bb);
+ case (int) 0x80001502:
+ // discriminator value 0x80001502L=0x80001502L for class OFOxmIpProtoMaskedVer13
+ return OFOxmIpProtoMaskedVer13.READER.readFrom(bb);
+ case (int) 0x80001804:
+ // discriminator value 0x80001804L=0x80001804L for class OFOxmIpv4DstVer13
+ return OFOxmIpv4DstVer13.READER.readFrom(bb);
+ case (int) 0x80001908:
+ // discriminator value 0x80001908L=0x80001908L for class OFOxmIpv4DstMaskedVer13
+ return OFOxmIpv4DstMaskedVer13.READER.readFrom(bb);
+ case (int) 0x80001604:
+ // discriminator value 0x80001604L=0x80001604L for class OFOxmIpv4SrcVer13
+ return OFOxmIpv4SrcVer13.READER.readFrom(bb);
+ case (int) 0x80001708:
+ // discriminator value 0x80001708L=0x80001708L for class OFOxmIpv4SrcMaskedVer13
+ return OFOxmIpv4SrcMaskedVer13.READER.readFrom(bb);
+ case (int) 0x80003610:
+ // discriminator value 0x80003610L=0x80003610L for class OFOxmIpv6DstVer13
+ return OFOxmIpv6DstVer13.READER.readFrom(bb);
+ case (int) 0x80003720:
+ // discriminator value 0x80003720L=0x80003720L for class OFOxmIpv6DstMaskedVer13
+ return OFOxmIpv6DstMaskedVer13.READER.readFrom(bb);
+ case (int) 0x80003804:
+ // discriminator value 0x80003804L=0x80003804L for class OFOxmIpv6FlabelVer13
+ return OFOxmIpv6FlabelVer13.READER.readFrom(bb);
+ case (int) 0x80003908:
+ // discriminator value 0x80003908L=0x80003908L for class OFOxmIpv6FlabelMaskedVer13
+ return OFOxmIpv6FlabelMaskedVer13.READER.readFrom(bb);
+ case (int) 0x80004006:
+ // discriminator value 0x80004006L=0x80004006L for class OFOxmIpv6NdSllVer13
+ return OFOxmIpv6NdSllVer13.READER.readFrom(bb);
+ case (int) 0x8000410c:
+ // discriminator value 0x8000410cL=0x8000410cL for class OFOxmIpv6NdSllMaskedVer13
+ return OFOxmIpv6NdSllMaskedVer13.READER.readFrom(bb);
+ case (int) 0x80003e10:
+ // discriminator value 0x80003e10L=0x80003e10L for class OFOxmIpv6NdTargetVer13
+ return OFOxmIpv6NdTargetVer13.READER.readFrom(bb);
+ case (int) 0x80003f20:
+ // discriminator value 0x80003f20L=0x80003f20L for class OFOxmIpv6NdTargetMaskedVer13
+ return OFOxmIpv6NdTargetMaskedVer13.READER.readFrom(bb);
+ case (int) 0x80004206:
+ // discriminator value 0x80004206L=0x80004206L for class OFOxmIpv6NdTllVer13
+ return OFOxmIpv6NdTllVer13.READER.readFrom(bb);
+ case (int) 0x8000430c:
+ // discriminator value 0x8000430cL=0x8000430cL for class OFOxmIpv6NdTllMaskedVer13
+ return OFOxmIpv6NdTllMaskedVer13.READER.readFrom(bb);
+ case (int) 0x80003410:
+ // discriminator value 0x80003410L=0x80003410L for class OFOxmIpv6SrcVer13
+ return OFOxmIpv6SrcVer13.READER.readFrom(bb);
+ case (int) 0x80003520:
+ // discriminator value 0x80003520L=0x80003520L for class OFOxmIpv6SrcMaskedVer13
+ return OFOxmIpv6SrcMaskedVer13.READER.readFrom(bb);
+ case (int) 0x80000408:
+ // discriminator value 0x80000408L=0x80000408L for class OFOxmMetadataVer13
+ return OFOxmMetadataVer13.READER.readFrom(bb);
+ case (int) 0x80000510:
+ // discriminator value 0x80000510L=0x80000510L for class OFOxmMetadataMaskedVer13
+ return OFOxmMetadataMaskedVer13.READER.readFrom(bb);
+ case (int) 0x80004404:
+ // discriminator value 0x80004404L=0x80004404L for class OFOxmMplsLabelVer13
+ return OFOxmMplsLabelVer13.READER.readFrom(bb);
+ case (int) 0x80004508:
+ // discriminator value 0x80004508L=0x80004508L for class OFOxmMplsLabelMaskedVer13
+ return OFOxmMplsLabelMaskedVer13.READER.readFrom(bb);
+ case (int) 0x80004601:
+ // discriminator value 0x80004601L=0x80004601L for class OFOxmMplsTcVer13
+ return OFOxmMplsTcVer13.READER.readFrom(bb);
+ case (int) 0x80004702:
+ // discriminator value 0x80004702L=0x80004702L for class OFOxmMplsTcMaskedVer13
+ return OFOxmMplsTcMaskedVer13.READER.readFrom(bb);
+ case (int) 0x80002402:
+ // discriminator value 0x80002402L=0x80002402L for class OFOxmSctpDstVer13
+ return OFOxmSctpDstVer13.READER.readFrom(bb);
+ case (int) 0x80002504:
+ // discriminator value 0x80002504L=0x80002504L for class OFOxmSctpDstMaskedVer13
+ return OFOxmSctpDstMaskedVer13.READER.readFrom(bb);
+ case (int) 0x80002202:
+ // discriminator value 0x80002202L=0x80002202L for class OFOxmSctpSrcVer13
+ return OFOxmSctpSrcVer13.READER.readFrom(bb);
+ case (int) 0x80002304:
+ // discriminator value 0x80002304L=0x80002304L for class OFOxmSctpSrcMaskedVer13
+ return OFOxmSctpSrcMaskedVer13.READER.readFrom(bb);
+ case (int) 0x80001c02:
+ // discriminator value 0x80001c02L=0x80001c02L for class OFOxmTcpDstVer13
+ return OFOxmTcpDstVer13.READER.readFrom(bb);
+ case (int) 0x80001d04:
+ // discriminator value 0x80001d04L=0x80001d04L for class OFOxmTcpDstMaskedVer13
+ return OFOxmTcpDstMaskedVer13.READER.readFrom(bb);
+ case (int) 0x80001a02:
+ // discriminator value 0x80001a02L=0x80001a02L for class OFOxmTcpSrcVer13
+ return OFOxmTcpSrcVer13.READER.readFrom(bb);
+ case (int) 0x80001b04:
+ // discriminator value 0x80001b04L=0x80001b04L for class OFOxmTcpSrcMaskedVer13
+ return OFOxmTcpSrcMaskedVer13.READER.readFrom(bb);
+ case (int) 0x80002002:
+ // discriminator value 0x80002002L=0x80002002L for class OFOxmUdpDstVer13
+ return OFOxmUdpDstVer13.READER.readFrom(bb);
+ case (int) 0x80002104:
+ // discriminator value 0x80002104L=0x80002104L for class OFOxmUdpDstMaskedVer13
+ return OFOxmUdpDstMaskedVer13.READER.readFrom(bb);
+ case (int) 0x80001e02:
+ // discriminator value 0x80001e02L=0x80001e02L for class OFOxmUdpSrcVer13
+ return OFOxmUdpSrcVer13.READER.readFrom(bb);
+ case (int) 0x80001f04:
+ // discriminator value 0x80001f04L=0x80001f04L for class OFOxmUdpSrcMaskedVer13
+ return OFOxmUdpSrcMaskedVer13.READER.readFrom(bb);
+ case (int) 0x80000e01:
+ // discriminator value 0x80000e01L=0x80000e01L for class OFOxmVlanPcpVer13
+ return OFOxmVlanPcpVer13.READER.readFrom(bb);
+ case (int) 0x80000f02:
+ // discriminator value 0x80000f02L=0x80000f02L for class OFOxmVlanPcpMaskedVer13
+ return OFOxmVlanPcpMaskedVer13.READER.readFrom(bb);
+ case (int) 0x80000c02:
+ // discriminator value 0x80000c02L=0x80000c02L for class OFOxmVlanVidVer13
+ return OFOxmVlanVidVer13.READER.readFrom(bb);
+ case (int) 0x80000d04:
+ // discriminator value 0x80000d04L=0x80000d04L for class OFOxmVlanVidMaskedVer13
+ return OFOxmVlanVidMaskedVer13.READER.readFrom(bb);
+ case (int) 0x80004c08:
+ // discriminator value 0x80004c08L=0x80004c08L for class OFOxmTunnelIdVer13
+ return OFOxmTunnelIdVer13.READER.readFrom(bb);
+ case (int) 0x80004d10:
+ // discriminator value 0x80004d10L=0x80004d10L for class OFOxmTunnelIdMaskedVer13
+ return OFOxmTunnelIdMaskedVer13.READER.readFrom(bb);
+ default:
+ throw new OFParseError("Unknown value for discriminator typeLen of class OFOxmVer13: " + typeLen);
+ }
+ }
+ }
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmVlanPcpMaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmVlanPcpMaskedVer13.java
new file mode 100644
index 0000000..f5e54a4
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmVlanPcpMaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmVlanPcpMaskedVer13 implements OFOxmVlanPcpMasked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmVlanPcpMaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 6;
+
+ private final static VlanPcp DEFAULT_VALUE = VlanPcp.NONE;
+ private final static VlanPcp DEFAULT_VALUE_MASK = VlanPcp.NONE;
+
+ // OF message fields
+ private final VlanPcp value;
+ private final VlanPcp mask;
+//
+ // Immutable default instance
+ final static OFOxmVlanPcpMaskedVer13 DEFAULT = new OFOxmVlanPcpMaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmVlanPcpMaskedVer13(VlanPcp value, VlanPcp mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80000f02L;
+ }
+
+ @Override
+ public VlanPcp getValue() {
+ return value;
+ }
+
+ @Override
+ public VlanPcp getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<VlanPcp> getMatchField() {
+ return MatchField.VLAN_PCP;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<VlanPcp> getCanonical() {
+ if (VlanPcp.NO_MASK.equals(mask)) {
+ return new OFOxmVlanPcpVer13(value);
+ } else if(VlanPcp.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmVlanPcpMasked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmVlanPcpMasked.Builder {
+ final OFOxmVlanPcpMaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private VlanPcp value;
+ private boolean maskSet;
+ private VlanPcp mask;
+
+ BuilderWithParent(OFOxmVlanPcpMaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80000f02L;
+ }
+
+ @Override
+ public VlanPcp getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmVlanPcpMasked.Builder setValue(VlanPcp value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public VlanPcp getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmVlanPcpMasked.Builder setMask(VlanPcp mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<VlanPcp> getMatchField() {
+ return MatchField.VLAN_PCP;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<VlanPcp> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmVlanPcpMasked build() {
+ VlanPcp value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ VlanPcp mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmVlanPcpMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmVlanPcpMasked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private VlanPcp value;
+ private boolean maskSet;
+ private VlanPcp mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80000f02L;
+ }
+
+ @Override
+ public VlanPcp getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmVlanPcpMasked.Builder setValue(VlanPcp value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public VlanPcp getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmVlanPcpMasked.Builder setMask(VlanPcp mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<VlanPcp> getMatchField() {
+ return MatchField.VLAN_PCP;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<VlanPcp> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmVlanPcpMasked build() {
+ VlanPcp value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ VlanPcp mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmVlanPcpMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmVlanPcpMasked> {
+ @Override
+ public OFOxmVlanPcpMasked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80000f02L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80000f02)
+ throw new OFParseError("Wrong typeLen: Expected=0x80000f02L(0x80000f02L), got="+typeLen);
+ VlanPcp value = VlanPcp.readByte(bb);
+ VlanPcp mask = VlanPcp.readByte(bb);
+
+ OFOxmVlanPcpMaskedVer13 oxmVlanPcpMaskedVer13 = new OFOxmVlanPcpMaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmVlanPcpMaskedVer13);
+ return oxmVlanPcpMaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmVlanPcpMaskedVer13Funnel FUNNEL = new OFOxmVlanPcpMaskedVer13Funnel();
+ static class OFOxmVlanPcpMaskedVer13Funnel implements Funnel<OFOxmVlanPcpMaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmVlanPcpMaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80000f02L
+ sink.putInt((int) 0x80000f02);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmVlanPcpMaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmVlanPcpMaskedVer13 message) {
+ // fixed value property typeLen = 0x80000f02L
+ bb.writeInt((int) 0x80000f02);
+ message.value.writeByte(bb);
+ message.mask.writeByte(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmVlanPcpMaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmVlanPcpMaskedVer13 other = (OFOxmVlanPcpMaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmVlanPcpVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmVlanPcpVer13.java
new file mode 100644
index 0000000..21dcc14
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmVlanPcpVer13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmVlanPcpVer13 implements OFOxmVlanPcp {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmVlanPcpVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 5;
+
+ private final static VlanPcp DEFAULT_VALUE = VlanPcp.NONE;
+
+ // OF message fields
+ private final VlanPcp value;
+//
+ // Immutable default instance
+ final static OFOxmVlanPcpVer13 DEFAULT = new OFOxmVlanPcpVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmVlanPcpVer13(VlanPcp value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80000e01L;
+ }
+
+ @Override
+ public VlanPcp getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<VlanPcp> getMatchField() {
+ return MatchField.VLAN_PCP;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<VlanPcp> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public VlanPcp getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmVlanPcp.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmVlanPcp.Builder {
+ final OFOxmVlanPcpVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private VlanPcp value;
+
+ BuilderWithParent(OFOxmVlanPcpVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80000e01L;
+ }
+
+ @Override
+ public VlanPcp getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmVlanPcp.Builder setValue(VlanPcp value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<VlanPcp> getMatchField() {
+ return MatchField.VLAN_PCP;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<VlanPcp> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public VlanPcp getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmVlanPcp build() {
+ VlanPcp value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmVlanPcpVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmVlanPcp.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private VlanPcp value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80000e01L;
+ }
+
+ @Override
+ public VlanPcp getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmVlanPcp.Builder setValue(VlanPcp value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<VlanPcp> getMatchField() {
+ return MatchField.VLAN_PCP;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<VlanPcp> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public VlanPcp getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmVlanPcp build() {
+ VlanPcp value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmVlanPcpVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmVlanPcp> {
+ @Override
+ public OFOxmVlanPcp readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80000e01L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80000e01)
+ throw new OFParseError("Wrong typeLen: Expected=0x80000e01L(0x80000e01L), got="+typeLen);
+ VlanPcp value = VlanPcp.readByte(bb);
+
+ OFOxmVlanPcpVer13 oxmVlanPcpVer13 = new OFOxmVlanPcpVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmVlanPcpVer13);
+ return oxmVlanPcpVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmVlanPcpVer13Funnel FUNNEL = new OFOxmVlanPcpVer13Funnel();
+ static class OFOxmVlanPcpVer13Funnel implements Funnel<OFOxmVlanPcpVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmVlanPcpVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80000e01L
+ sink.putInt((int) 0x80000e01);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmVlanPcpVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmVlanPcpVer13 message) {
+ // fixed value property typeLen = 0x80000e01L
+ bb.writeInt((int) 0x80000e01);
+ message.value.writeByte(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmVlanPcpVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmVlanPcpVer13 other = (OFOxmVlanPcpVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmVlanVidMaskedVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmVlanVidMaskedVer13.java
new file mode 100644
index 0000000..58ebd21
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmVlanVidMaskedVer13.java
@@ -0,0 +1,356 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmVlanVidMaskedVer13 implements OFOxmVlanVidMasked {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmVlanVidMaskedVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static OFVlanVidMatch DEFAULT_VALUE = OFVlanVidMatch.NONE;
+ private final static OFVlanVidMatch DEFAULT_VALUE_MASK = OFVlanVidMatch.NONE;
+
+ // OF message fields
+ private final OFVlanVidMatch value;
+ private final OFVlanVidMatch mask;
+//
+ // Immutable default instance
+ final static OFOxmVlanVidMaskedVer13 DEFAULT = new OFOxmVlanVidMaskedVer13(
+ DEFAULT_VALUE, DEFAULT_VALUE_MASK
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmVlanVidMaskedVer13(OFVlanVidMatch value, OFVlanVidMatch mask) {
+ this.value = value;
+ this.mask = mask;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80000d04L;
+ }
+
+ @Override
+ public OFVlanVidMatch getValue() {
+ return value;
+ }
+
+ @Override
+ public OFVlanVidMatch getMask() {
+ return mask;
+ }
+
+ @Override
+ public MatchField<OFVlanVidMatch> getMatchField() {
+ return MatchField.VLAN_VID;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ public OFOxm<OFVlanVidMatch> getCanonical() {
+ if (OFVlanVidMatch.NO_MASK.equals(mask)) {
+ return new OFOxmVlanVidVer13(value);
+ } else if(OFVlanVidMatch.FULL_MASK.equals(mask)) {
+ return null;
+ } else {
+ return this;
+ }
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmVlanVidMasked.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmVlanVidMasked.Builder {
+ final OFOxmVlanVidMaskedVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private OFVlanVidMatch value;
+ private boolean maskSet;
+ private OFVlanVidMatch mask;
+
+ BuilderWithParent(OFOxmVlanVidMaskedVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80000d04L;
+ }
+
+ @Override
+ public OFVlanVidMatch getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmVlanVidMasked.Builder setValue(OFVlanVidMatch value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFVlanVidMatch getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmVlanVidMasked.Builder setMask(OFVlanVidMatch mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<OFVlanVidMatch> getMatchField() {
+ return MatchField.VLAN_VID;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<OFVlanVidMatch> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmVlanVidMasked build() {
+ OFVlanVidMatch value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ OFVlanVidMatch mask = this.maskSet ? this.mask : parentMessage.mask;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+ //
+ return new OFOxmVlanVidMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmVlanVidMasked.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private OFVlanVidMatch value;
+ private boolean maskSet;
+ private OFVlanVidMatch mask;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80000d04L;
+ }
+
+ @Override
+ public OFVlanVidMatch getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmVlanVidMasked.Builder setValue(OFVlanVidMatch value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFVlanVidMatch getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFOxmVlanVidMasked.Builder setMask(OFVlanVidMatch mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<OFVlanVidMatch> getMatchField() {
+ return MatchField.VLAN_VID;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return true;
+ }
+
+ @Override
+ public OFOxm<OFVlanVidMatch> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmVlanVidMasked build() {
+ OFVlanVidMatch value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+ OFVlanVidMatch mask = this.maskSet ? this.mask : DEFAULT_VALUE_MASK;
+ if(mask == null)
+ throw new NullPointerException("Property mask must not be null");
+
+
+ return new OFOxmVlanVidMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmVlanVidMasked> {
+ @Override
+ public OFOxmVlanVidMasked readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80000d04L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80000d04)
+ throw new OFParseError("Wrong typeLen: Expected=0x80000d04L(0x80000d04L), got="+typeLen);
+ OFVlanVidMatch value = OFVlanVidMatch.read2Bytes(bb);
+ OFVlanVidMatch mask = OFVlanVidMatch.read2Bytes(bb);
+
+ OFOxmVlanVidMaskedVer13 oxmVlanVidMaskedVer13 = new OFOxmVlanVidMaskedVer13(
+ value,
+ mask
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmVlanVidMaskedVer13);
+ return oxmVlanVidMaskedVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmVlanVidMaskedVer13Funnel FUNNEL = new OFOxmVlanVidMaskedVer13Funnel();
+ static class OFOxmVlanVidMaskedVer13Funnel implements Funnel<OFOxmVlanVidMaskedVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmVlanVidMaskedVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80000d04L
+ sink.putInt((int) 0x80000d04);
+ message.value.putTo(sink);
+ message.mask.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmVlanVidMaskedVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmVlanVidMaskedVer13 message) {
+ // fixed value property typeLen = 0x80000d04L
+ bb.writeInt((int) 0x80000d04);
+ message.value.write2Bytes(bb);
+ message.mask.write2Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmVlanVidMaskedVer13(");
+ b.append("value=").append(value);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmVlanVidMaskedVer13 other = (OFOxmVlanVidMaskedVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ if (mask == null) {
+ if (other.mask != null)
+ return false;
+ } else if (!mask.equals(other.mask))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmVlanVidVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmVlanVidVer13.java
new file mode 100644
index 0000000..9d82363
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmVlanVidVer13.java
@@ -0,0 +1,312 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFOxmVlanVidVer13 implements OFOxmVlanVid {
+ private static final Logger logger = LoggerFactory.getLogger(OFOxmVlanVidVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 6;
+
+ private final static OFVlanVidMatch DEFAULT_VALUE = OFVlanVidMatch.NONE;
+
+ // OF message fields
+ private final OFVlanVidMatch value;
+//
+ // Immutable default instance
+ final static OFOxmVlanVidVer13 DEFAULT = new OFOxmVlanVidVer13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFOxmVlanVidVer13(OFVlanVidMatch value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getTypeLen() {
+ return 0x80000c02L;
+ }
+
+ @Override
+ public OFVlanVidMatch getValue() {
+ return value;
+ }
+
+ @Override
+ public MatchField<OFVlanVidMatch> getMatchField() {
+ return MatchField.VLAN_VID;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ public OFOxm<OFVlanVidMatch> getCanonical() {
+ // exact match OXM is always canonical
+ return this;
+ }
+
+ @Override
+ public OFVlanVidMatch getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFOxmVlanVid.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFOxmVlanVid.Builder {
+ final OFOxmVlanVidVer13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private OFVlanVidMatch value;
+
+ BuilderWithParent(OFOxmVlanVidVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getTypeLen() {
+ return 0x80000c02L;
+ }
+
+ @Override
+ public OFVlanVidMatch getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmVlanVid.Builder setValue(OFVlanVidMatch value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<OFVlanVidMatch> getMatchField() {
+ return MatchField.VLAN_VID;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<OFVlanVidMatch> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVlanVidMatch getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFOxmVlanVid build() {
+ OFVlanVidMatch value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFOxmVlanVidVer13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFOxmVlanVid.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private OFVlanVidMatch value;
+
+ @Override
+ public long getTypeLen() {
+ return 0x80000c02L;
+ }
+
+ @Override
+ public OFVlanVidMatch getValue() {
+ return value;
+ }
+
+ @Override
+ public OFOxmVlanVid.Builder setValue(OFVlanVidMatch value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public MatchField<OFVlanVidMatch> getMatchField() {
+ return MatchField.VLAN_VID;
+ }
+
+ @Override
+ public boolean isMasked() {
+ return false;
+ }
+
+ @Override
+ public OFOxm<OFVlanVidMatch> getCanonical()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property canonical not supported in version 1.3");
+ }
+
+ @Override
+ public OFVlanVidMatch getMask()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property mask not supported in version 1.3");
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFOxmVlanVid build() {
+ OFVlanVidMatch value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFOxmVlanVidVer13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFOxmVlanVid> {
+ @Override
+ public OFOxmVlanVid readFrom(ChannelBuffer bb) throws OFParseError {
+ // fixed value property typeLen == 0x80000c02L
+ int typeLen = bb.readInt();
+ if(typeLen != (int) 0x80000c02)
+ throw new OFParseError("Wrong typeLen: Expected=0x80000c02L(0x80000c02L), got="+typeLen);
+ OFVlanVidMatch value = OFVlanVidMatch.read2Bytes(bb);
+
+ OFOxmVlanVidVer13 oxmVlanVidVer13 = new OFOxmVlanVidVer13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", oxmVlanVidVer13);
+ return oxmVlanVidVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFOxmVlanVidVer13Funnel FUNNEL = new OFOxmVlanVidVer13Funnel();
+ static class OFOxmVlanVidVer13Funnel implements Funnel<OFOxmVlanVidVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFOxmVlanVidVer13 message, PrimitiveSink sink) {
+ // fixed value property typeLen = 0x80000c02L
+ sink.putInt((int) 0x80000c02);
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFOxmVlanVidVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFOxmVlanVidVer13 message) {
+ // fixed value property typeLen = 0x80000c02L
+ bb.writeInt((int) 0x80000c02);
+ message.value.write2Bytes(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFOxmVlanVidVer13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFOxmVlanVidVer13 other = (OFOxmVlanVidVer13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmsVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmsVer13.java
new file mode 100644
index 0000000..1f2f7b7
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmsVer13.java
@@ -0,0 +1,1440 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_factory_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+
+
+public class OFOxmsVer13 implements OFOxms {
+ public final static OFOxmsVer13 INSTANCE = new OFOxmsVer13();
+
+
+
+
+ public OFOxmArpOp.Builder buildArpOp() {
+ return new OFOxmArpOpVer13.Builder();
+ }
+ public OFOxmArpOp arpOp(ArpOpcode value) {
+ return new OFOxmArpOpVer13(
+ value
+ );
+ }
+
+ public OFOxmArpOpMasked.Builder buildArpOpMasked() {
+ return new OFOxmArpOpMaskedVer13.Builder();
+ }
+ public OFOxmArpOpMasked arpOpMasked(ArpOpcode value, ArpOpcode mask) {
+ return new OFOxmArpOpMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmArpSha.Builder buildArpSha() {
+ return new OFOxmArpShaVer13.Builder();
+ }
+ public OFOxmArpSha arpSha(MacAddress value) {
+ return new OFOxmArpShaVer13(
+ value
+ );
+ }
+
+ public OFOxmArpShaMasked.Builder buildArpShaMasked() {
+ return new OFOxmArpShaMaskedVer13.Builder();
+ }
+ public OFOxmArpShaMasked arpShaMasked(MacAddress value, MacAddress mask) {
+ return new OFOxmArpShaMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmArpSpa.Builder buildArpSpa() {
+ return new OFOxmArpSpaVer13.Builder();
+ }
+ public OFOxmArpSpa arpSpa(IPv4Address value) {
+ return new OFOxmArpSpaVer13(
+ value
+ );
+ }
+
+ public OFOxmArpSpaMasked.Builder buildArpSpaMasked() {
+ return new OFOxmArpSpaMaskedVer13.Builder();
+ }
+ public OFOxmArpSpaMasked arpSpaMasked(IPv4Address value, IPv4Address mask) {
+ return new OFOxmArpSpaMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmArpTha.Builder buildArpTha() {
+ return new OFOxmArpThaVer13.Builder();
+ }
+ public OFOxmArpTha arpTha(MacAddress value) {
+ return new OFOxmArpThaVer13(
+ value
+ );
+ }
+
+ public OFOxmArpThaMasked.Builder buildArpThaMasked() {
+ return new OFOxmArpThaMaskedVer13.Builder();
+ }
+ public OFOxmArpThaMasked arpThaMasked(MacAddress value, MacAddress mask) {
+ return new OFOxmArpThaMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmArpTpa.Builder buildArpTpa() {
+ return new OFOxmArpTpaVer13.Builder();
+ }
+ public OFOxmArpTpa arpTpa(IPv4Address value) {
+ return new OFOxmArpTpaVer13(
+ value
+ );
+ }
+
+ public OFOxmArpTpaMasked.Builder buildArpTpaMasked() {
+ return new OFOxmArpTpaMaskedVer13.Builder();
+ }
+ public OFOxmArpTpaMasked arpTpaMasked(IPv4Address value, IPv4Address mask) {
+ return new OFOxmArpTpaMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmBsnEgrPortGroupId.Builder buildBsnEgrPortGroupId() {
+ return new OFOxmBsnEgrPortGroupIdVer13.Builder();
+ }
+ public OFOxmBsnEgrPortGroupId bsnEgrPortGroupId(ClassId value) {
+ return new OFOxmBsnEgrPortGroupIdVer13(
+ value
+ );
+ }
+
+ public OFOxmBsnEgrPortGroupIdMasked.Builder buildBsnEgrPortGroupIdMasked() {
+ return new OFOxmBsnEgrPortGroupIdMaskedVer13.Builder();
+ }
+ public OFOxmBsnEgrPortGroupIdMasked bsnEgrPortGroupIdMasked(ClassId value, ClassId mask) {
+ return new OFOxmBsnEgrPortGroupIdMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmBsnGlobalVrfAllowed.Builder buildBsnGlobalVrfAllowed() {
+ return new OFOxmBsnGlobalVrfAllowedVer13.Builder();
+ }
+ public OFOxmBsnGlobalVrfAllowed bsnGlobalVrfAllowed(OFBooleanValue value) {
+ return new OFOxmBsnGlobalVrfAllowedVer13(
+ value
+ );
+ }
+
+ public OFOxmBsnGlobalVrfAllowedMasked.Builder buildBsnGlobalVrfAllowedMasked() {
+ return new OFOxmBsnGlobalVrfAllowedMaskedVer13.Builder();
+ }
+ public OFOxmBsnGlobalVrfAllowedMasked bsnGlobalVrfAllowedMasked(OFBooleanValue value, OFBooleanValue mask) {
+ return new OFOxmBsnGlobalVrfAllowedMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmBsnInPorts128.Builder buildBsnInPorts128() {
+ return new OFOxmBsnInPorts128Ver13.Builder();
+ }
+ public OFOxmBsnInPorts128 bsnInPorts128(OFBitMask128 value) {
+ return new OFOxmBsnInPorts128Ver13(
+ value
+ );
+ }
+
+ public OFOxmBsnInPorts128Masked.Builder buildBsnInPorts128Masked() {
+ return new OFOxmBsnInPorts128MaskedVer13.Builder();
+ }
+ public OFOxmBsnInPorts128Masked bsnInPorts128Masked(OFBitMask128 value, OFBitMask128 mask) {
+ return new OFOxmBsnInPorts128MaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmBsnL3DstClassId.Builder buildBsnL3DstClassId() {
+ return new OFOxmBsnL3DstClassIdVer13.Builder();
+ }
+ public OFOxmBsnL3DstClassId bsnL3DstClassId(ClassId value) {
+ return new OFOxmBsnL3DstClassIdVer13(
+ value
+ );
+ }
+
+ public OFOxmBsnL3DstClassIdMasked.Builder buildBsnL3DstClassIdMasked() {
+ return new OFOxmBsnL3DstClassIdMaskedVer13.Builder();
+ }
+ public OFOxmBsnL3DstClassIdMasked bsnL3DstClassIdMasked(ClassId value, ClassId mask) {
+ return new OFOxmBsnL3DstClassIdMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmBsnL3InterfaceClassId.Builder buildBsnL3InterfaceClassId() {
+ return new OFOxmBsnL3InterfaceClassIdVer13.Builder();
+ }
+ public OFOxmBsnL3InterfaceClassId bsnL3InterfaceClassId(ClassId value) {
+ return new OFOxmBsnL3InterfaceClassIdVer13(
+ value
+ );
+ }
+
+ public OFOxmBsnL3InterfaceClassIdMasked.Builder buildBsnL3InterfaceClassIdMasked() {
+ return new OFOxmBsnL3InterfaceClassIdMaskedVer13.Builder();
+ }
+ public OFOxmBsnL3InterfaceClassIdMasked bsnL3InterfaceClassIdMasked(ClassId value, ClassId mask) {
+ return new OFOxmBsnL3InterfaceClassIdMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmBsnL3SrcClassId.Builder buildBsnL3SrcClassId() {
+ return new OFOxmBsnL3SrcClassIdVer13.Builder();
+ }
+ public OFOxmBsnL3SrcClassId bsnL3SrcClassId(ClassId value) {
+ return new OFOxmBsnL3SrcClassIdVer13(
+ value
+ );
+ }
+
+ public OFOxmBsnL3SrcClassIdMasked.Builder buildBsnL3SrcClassIdMasked() {
+ return new OFOxmBsnL3SrcClassIdMaskedVer13.Builder();
+ }
+ public OFOxmBsnL3SrcClassIdMasked bsnL3SrcClassIdMasked(ClassId value, ClassId mask) {
+ return new OFOxmBsnL3SrcClassIdMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmBsnLagId.Builder buildBsnLagId() {
+ return new OFOxmBsnLagIdVer13.Builder();
+ }
+ public OFOxmBsnLagId bsnLagId(LagId value) {
+ return new OFOxmBsnLagIdVer13(
+ value
+ );
+ }
+
+ public OFOxmBsnLagIdMasked.Builder buildBsnLagIdMasked() {
+ return new OFOxmBsnLagIdMaskedVer13.Builder();
+ }
+ public OFOxmBsnLagIdMasked bsnLagIdMasked(LagId value, LagId mask) {
+ return new OFOxmBsnLagIdMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmBsnTcpFlags.Builder buildBsnTcpFlags() {
+ return new OFOxmBsnTcpFlagsVer13.Builder();
+ }
+ public OFOxmBsnTcpFlags bsnTcpFlags(U16 value) {
+ return new OFOxmBsnTcpFlagsVer13(
+ value
+ );
+ }
+
+ public OFOxmBsnTcpFlagsMasked.Builder buildBsnTcpFlagsMasked() {
+ return new OFOxmBsnTcpFlagsMaskedVer13.Builder();
+ }
+ public OFOxmBsnTcpFlagsMasked bsnTcpFlagsMasked(U16 value, U16 mask) {
+ return new OFOxmBsnTcpFlagsMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmBsnUdf0.Builder buildBsnUdf0() {
+ return new OFOxmBsnUdf0Ver13.Builder();
+ }
+ public OFOxmBsnUdf0 bsnUdf0(UDF value) {
+ return new OFOxmBsnUdf0Ver13(
+ value
+ );
+ }
+
+ public OFOxmBsnUdf0Masked.Builder buildBsnUdf0Masked() {
+ return new OFOxmBsnUdf0MaskedVer13.Builder();
+ }
+ public OFOxmBsnUdf0Masked bsnUdf0Masked(UDF value, UDF mask) {
+ return new OFOxmBsnUdf0MaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmBsnUdf1.Builder buildBsnUdf1() {
+ return new OFOxmBsnUdf1Ver13.Builder();
+ }
+ public OFOxmBsnUdf1 bsnUdf1(UDF value) {
+ return new OFOxmBsnUdf1Ver13(
+ value
+ );
+ }
+
+ public OFOxmBsnUdf1Masked.Builder buildBsnUdf1Masked() {
+ return new OFOxmBsnUdf1MaskedVer13.Builder();
+ }
+ public OFOxmBsnUdf1Masked bsnUdf1Masked(UDF value, UDF mask) {
+ return new OFOxmBsnUdf1MaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmBsnUdf2.Builder buildBsnUdf2() {
+ return new OFOxmBsnUdf2Ver13.Builder();
+ }
+ public OFOxmBsnUdf2 bsnUdf2(UDF value) {
+ return new OFOxmBsnUdf2Ver13(
+ value
+ );
+ }
+
+ public OFOxmBsnUdf2Masked.Builder buildBsnUdf2Masked() {
+ return new OFOxmBsnUdf2MaskedVer13.Builder();
+ }
+ public OFOxmBsnUdf2Masked bsnUdf2Masked(UDF value, UDF mask) {
+ return new OFOxmBsnUdf2MaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmBsnUdf3.Builder buildBsnUdf3() {
+ return new OFOxmBsnUdf3Ver13.Builder();
+ }
+ public OFOxmBsnUdf3 bsnUdf3(UDF value) {
+ return new OFOxmBsnUdf3Ver13(
+ value
+ );
+ }
+
+ public OFOxmBsnUdf3Masked.Builder buildBsnUdf3Masked() {
+ return new OFOxmBsnUdf3MaskedVer13.Builder();
+ }
+ public OFOxmBsnUdf3Masked bsnUdf3Masked(UDF value, UDF mask) {
+ return new OFOxmBsnUdf3MaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmBsnUdf4.Builder buildBsnUdf4() {
+ return new OFOxmBsnUdf4Ver13.Builder();
+ }
+ public OFOxmBsnUdf4 bsnUdf4(UDF value) {
+ return new OFOxmBsnUdf4Ver13(
+ value
+ );
+ }
+
+ public OFOxmBsnUdf4Masked.Builder buildBsnUdf4Masked() {
+ return new OFOxmBsnUdf4MaskedVer13.Builder();
+ }
+ public OFOxmBsnUdf4Masked bsnUdf4Masked(UDF value, UDF mask) {
+ return new OFOxmBsnUdf4MaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmBsnUdf5.Builder buildBsnUdf5() {
+ return new OFOxmBsnUdf5Ver13.Builder();
+ }
+ public OFOxmBsnUdf5 bsnUdf5(UDF value) {
+ return new OFOxmBsnUdf5Ver13(
+ value
+ );
+ }
+
+ public OFOxmBsnUdf5Masked.Builder buildBsnUdf5Masked() {
+ return new OFOxmBsnUdf5MaskedVer13.Builder();
+ }
+ public OFOxmBsnUdf5Masked bsnUdf5Masked(UDF value, UDF mask) {
+ return new OFOxmBsnUdf5MaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmBsnUdf6.Builder buildBsnUdf6() {
+ return new OFOxmBsnUdf6Ver13.Builder();
+ }
+ public OFOxmBsnUdf6 bsnUdf6(UDF value) {
+ return new OFOxmBsnUdf6Ver13(
+ value
+ );
+ }
+
+ public OFOxmBsnUdf6Masked.Builder buildBsnUdf6Masked() {
+ return new OFOxmBsnUdf6MaskedVer13.Builder();
+ }
+ public OFOxmBsnUdf6Masked bsnUdf6Masked(UDF value, UDF mask) {
+ return new OFOxmBsnUdf6MaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmBsnUdf7.Builder buildBsnUdf7() {
+ return new OFOxmBsnUdf7Ver13.Builder();
+ }
+ public OFOxmBsnUdf7 bsnUdf7(UDF value) {
+ return new OFOxmBsnUdf7Ver13(
+ value
+ );
+ }
+
+ public OFOxmBsnUdf7Masked.Builder buildBsnUdf7Masked() {
+ return new OFOxmBsnUdf7MaskedVer13.Builder();
+ }
+ public OFOxmBsnUdf7Masked bsnUdf7Masked(UDF value, UDF mask) {
+ return new OFOxmBsnUdf7MaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmBsnVlanXlatePortGroupId.Builder buildBsnVlanXlatePortGroupId() {
+ return new OFOxmBsnVlanXlatePortGroupIdVer13.Builder();
+ }
+ public OFOxmBsnVlanXlatePortGroupId bsnVlanXlatePortGroupId(ClassId value) {
+ return new OFOxmBsnVlanXlatePortGroupIdVer13(
+ value
+ );
+ }
+
+ public OFOxmBsnVlanXlatePortGroupIdMasked.Builder buildBsnVlanXlatePortGroupIdMasked() {
+ return new OFOxmBsnVlanXlatePortGroupIdMaskedVer13.Builder();
+ }
+ public OFOxmBsnVlanXlatePortGroupIdMasked bsnVlanXlatePortGroupIdMasked(ClassId value, ClassId mask) {
+ return new OFOxmBsnVlanXlatePortGroupIdMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmBsnVrf.Builder buildBsnVrf() {
+ return new OFOxmBsnVrfVer13.Builder();
+ }
+ public OFOxmBsnVrf bsnVrf(VRF value) {
+ return new OFOxmBsnVrfVer13(
+ value
+ );
+ }
+
+ public OFOxmBsnVrfMasked.Builder buildBsnVrfMasked() {
+ return new OFOxmBsnVrfMaskedVer13.Builder();
+ }
+ public OFOxmBsnVrfMasked bsnVrfMasked(VRF value, VRF mask) {
+ return new OFOxmBsnVrfMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmEthDst.Builder buildEthDst() {
+ return new OFOxmEthDstVer13.Builder();
+ }
+ public OFOxmEthDst ethDst(MacAddress value) {
+ return new OFOxmEthDstVer13(
+ value
+ );
+ }
+
+ public OFOxmEthDstMasked.Builder buildEthDstMasked() {
+ return new OFOxmEthDstMaskedVer13.Builder();
+ }
+ public OFOxmEthDstMasked ethDstMasked(MacAddress value, MacAddress mask) {
+ return new OFOxmEthDstMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmEthSrc.Builder buildEthSrc() {
+ return new OFOxmEthSrcVer13.Builder();
+ }
+ public OFOxmEthSrc ethSrc(MacAddress value) {
+ return new OFOxmEthSrcVer13(
+ value
+ );
+ }
+
+ public OFOxmEthSrcMasked.Builder buildEthSrcMasked() {
+ return new OFOxmEthSrcMaskedVer13.Builder();
+ }
+ public OFOxmEthSrcMasked ethSrcMasked(MacAddress value, MacAddress mask) {
+ return new OFOxmEthSrcMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmEthType.Builder buildEthType() {
+ return new OFOxmEthTypeVer13.Builder();
+ }
+ public OFOxmEthType ethType(EthType value) {
+ return new OFOxmEthTypeVer13(
+ value
+ );
+ }
+
+ public OFOxmEthTypeMasked.Builder buildEthTypeMasked() {
+ return new OFOxmEthTypeMaskedVer13.Builder();
+ }
+ public OFOxmEthTypeMasked ethTypeMasked(EthType value, EthType mask) {
+ return new OFOxmEthTypeMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmIcmpv4Code.Builder buildIcmpv4Code() {
+ return new OFOxmIcmpv4CodeVer13.Builder();
+ }
+ public OFOxmIcmpv4Code icmpv4Code(ICMPv4Code value) {
+ return new OFOxmIcmpv4CodeVer13(
+ value
+ );
+ }
+
+ public OFOxmIcmpv4CodeMasked.Builder buildIcmpv4CodeMasked() {
+ return new OFOxmIcmpv4CodeMaskedVer13.Builder();
+ }
+ public OFOxmIcmpv4CodeMasked icmpv4CodeMasked(ICMPv4Code value, ICMPv4Code mask) {
+ return new OFOxmIcmpv4CodeMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmIcmpv4Type.Builder buildIcmpv4Type() {
+ return new OFOxmIcmpv4TypeVer13.Builder();
+ }
+ public OFOxmIcmpv4Type icmpv4Type(ICMPv4Type value) {
+ return new OFOxmIcmpv4TypeVer13(
+ value
+ );
+ }
+
+ public OFOxmIcmpv4TypeMasked.Builder buildIcmpv4TypeMasked() {
+ return new OFOxmIcmpv4TypeMaskedVer13.Builder();
+ }
+ public OFOxmIcmpv4TypeMasked icmpv4TypeMasked(ICMPv4Type value, ICMPv4Type mask) {
+ return new OFOxmIcmpv4TypeMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmIcmpv6Code.Builder buildIcmpv6Code() {
+ return new OFOxmIcmpv6CodeVer13.Builder();
+ }
+ public OFOxmIcmpv6Code icmpv6Code(U8 value) {
+ return new OFOxmIcmpv6CodeVer13(
+ value
+ );
+ }
+
+ public OFOxmIcmpv6CodeMasked.Builder buildIcmpv6CodeMasked() {
+ return new OFOxmIcmpv6CodeMaskedVer13.Builder();
+ }
+ public OFOxmIcmpv6CodeMasked icmpv6CodeMasked(U8 value, U8 mask) {
+ return new OFOxmIcmpv6CodeMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmIcmpv6Type.Builder buildIcmpv6Type() {
+ return new OFOxmIcmpv6TypeVer13.Builder();
+ }
+ public OFOxmIcmpv6Type icmpv6Type(U8 value) {
+ return new OFOxmIcmpv6TypeVer13(
+ value
+ );
+ }
+
+ public OFOxmIcmpv6TypeMasked.Builder buildIcmpv6TypeMasked() {
+ return new OFOxmIcmpv6TypeMaskedVer13.Builder();
+ }
+ public OFOxmIcmpv6TypeMasked icmpv6TypeMasked(U8 value, U8 mask) {
+ return new OFOxmIcmpv6TypeMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmInPhyPort.Builder buildInPhyPort() {
+ return new OFOxmInPhyPortVer13.Builder();
+ }
+ public OFOxmInPhyPort inPhyPort(OFPort value) {
+ return new OFOxmInPhyPortVer13(
+ value
+ );
+ }
+
+ public OFOxmInPhyPortMasked.Builder buildInPhyPortMasked() {
+ return new OFOxmInPhyPortMaskedVer13.Builder();
+ }
+ public OFOxmInPhyPortMasked inPhyPortMasked(OFPort value, OFPort mask) {
+ return new OFOxmInPhyPortMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmInPort.Builder buildInPort() {
+ return new OFOxmInPortVer13.Builder();
+ }
+ public OFOxmInPort inPort(OFPort value) {
+ return new OFOxmInPortVer13(
+ value
+ );
+ }
+
+ public OFOxmInPortMasked.Builder buildInPortMasked() {
+ return new OFOxmInPortMaskedVer13.Builder();
+ }
+ public OFOxmInPortMasked inPortMasked(OFPort value, OFPort mask) {
+ return new OFOxmInPortMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmIpDscp.Builder buildIpDscp() {
+ return new OFOxmIpDscpVer13.Builder();
+ }
+ public OFOxmIpDscp ipDscp(IpDscp value) {
+ return new OFOxmIpDscpVer13(
+ value
+ );
+ }
+
+ public OFOxmIpDscpMasked.Builder buildIpDscpMasked() {
+ return new OFOxmIpDscpMaskedVer13.Builder();
+ }
+ public OFOxmIpDscpMasked ipDscpMasked(IpDscp value, IpDscp mask) {
+ return new OFOxmIpDscpMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmIpEcn.Builder buildIpEcn() {
+ return new OFOxmIpEcnVer13.Builder();
+ }
+ public OFOxmIpEcn ipEcn(IpEcn value) {
+ return new OFOxmIpEcnVer13(
+ value
+ );
+ }
+
+ public OFOxmIpEcnMasked.Builder buildIpEcnMasked() {
+ return new OFOxmIpEcnMaskedVer13.Builder();
+ }
+ public OFOxmIpEcnMasked ipEcnMasked(IpEcn value, IpEcn mask) {
+ return new OFOxmIpEcnMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmIpProto.Builder buildIpProto() {
+ return new OFOxmIpProtoVer13.Builder();
+ }
+ public OFOxmIpProto ipProto(IpProtocol value) {
+ return new OFOxmIpProtoVer13(
+ value
+ );
+ }
+
+ public OFOxmIpProtoMasked.Builder buildIpProtoMasked() {
+ return new OFOxmIpProtoMaskedVer13.Builder();
+ }
+ public OFOxmIpProtoMasked ipProtoMasked(IpProtocol value, IpProtocol mask) {
+ return new OFOxmIpProtoMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmIpv4Dst.Builder buildIpv4Dst() {
+ return new OFOxmIpv4DstVer13.Builder();
+ }
+ public OFOxmIpv4Dst ipv4Dst(IPv4Address value) {
+ return new OFOxmIpv4DstVer13(
+ value
+ );
+ }
+
+ public OFOxmIpv4DstMasked.Builder buildIpv4DstMasked() {
+ return new OFOxmIpv4DstMaskedVer13.Builder();
+ }
+ public OFOxmIpv4DstMasked ipv4DstMasked(IPv4Address value, IPv4Address mask) {
+ return new OFOxmIpv4DstMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmIpv4Src.Builder buildIpv4Src() {
+ return new OFOxmIpv4SrcVer13.Builder();
+ }
+ public OFOxmIpv4Src ipv4Src(IPv4Address value) {
+ return new OFOxmIpv4SrcVer13(
+ value
+ );
+ }
+
+ public OFOxmIpv4SrcMasked.Builder buildIpv4SrcMasked() {
+ return new OFOxmIpv4SrcMaskedVer13.Builder();
+ }
+ public OFOxmIpv4SrcMasked ipv4SrcMasked(IPv4Address value, IPv4Address mask) {
+ return new OFOxmIpv4SrcMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmIpv6Dst.Builder buildIpv6Dst() {
+ return new OFOxmIpv6DstVer13.Builder();
+ }
+ public OFOxmIpv6Dst ipv6Dst(IPv6Address value) {
+ return new OFOxmIpv6DstVer13(
+ value
+ );
+ }
+
+ public OFOxmIpv6DstMasked.Builder buildIpv6DstMasked() {
+ return new OFOxmIpv6DstMaskedVer13.Builder();
+ }
+ public OFOxmIpv6DstMasked ipv6DstMasked(IPv6Address value, IPv6Address mask) {
+ return new OFOxmIpv6DstMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmIpv6Flabel.Builder buildIpv6Flabel() {
+ return new OFOxmIpv6FlabelVer13.Builder();
+ }
+ public OFOxmIpv6Flabel ipv6Flabel(IPv6FlowLabel value) {
+ return new OFOxmIpv6FlabelVer13(
+ value
+ );
+ }
+
+ public OFOxmIpv6FlabelMasked.Builder buildIpv6FlabelMasked() {
+ return new OFOxmIpv6FlabelMaskedVer13.Builder();
+ }
+ public OFOxmIpv6FlabelMasked ipv6FlabelMasked(IPv6FlowLabel value, IPv6FlowLabel mask) {
+ return new OFOxmIpv6FlabelMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmIpv6NdSll.Builder buildIpv6NdSll() {
+ return new OFOxmIpv6NdSllVer13.Builder();
+ }
+ public OFOxmIpv6NdSll ipv6NdSll(MacAddress value) {
+ return new OFOxmIpv6NdSllVer13(
+ value
+ );
+ }
+
+ public OFOxmIpv6NdSllMasked.Builder buildIpv6NdSllMasked() {
+ return new OFOxmIpv6NdSllMaskedVer13.Builder();
+ }
+ public OFOxmIpv6NdSllMasked ipv6NdSllMasked(MacAddress value, MacAddress mask) {
+ return new OFOxmIpv6NdSllMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmIpv6NdTarget.Builder buildIpv6NdTarget() {
+ return new OFOxmIpv6NdTargetVer13.Builder();
+ }
+ public OFOxmIpv6NdTarget ipv6NdTarget(IPv6Address value) {
+ return new OFOxmIpv6NdTargetVer13(
+ value
+ );
+ }
+
+ public OFOxmIpv6NdTargetMasked.Builder buildIpv6NdTargetMasked() {
+ return new OFOxmIpv6NdTargetMaskedVer13.Builder();
+ }
+ public OFOxmIpv6NdTargetMasked ipv6NdTargetMasked(IPv6Address value, IPv6Address mask) {
+ return new OFOxmIpv6NdTargetMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmIpv6NdTll.Builder buildIpv6NdTll() {
+ return new OFOxmIpv6NdTllVer13.Builder();
+ }
+ public OFOxmIpv6NdTll ipv6NdTll(MacAddress value) {
+ return new OFOxmIpv6NdTllVer13(
+ value
+ );
+ }
+
+ public OFOxmIpv6NdTllMasked.Builder buildIpv6NdTllMasked() {
+ return new OFOxmIpv6NdTllMaskedVer13.Builder();
+ }
+ public OFOxmIpv6NdTllMasked ipv6NdTllMasked(MacAddress value, MacAddress mask) {
+ return new OFOxmIpv6NdTllMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmIpv6Src.Builder buildIpv6Src() {
+ return new OFOxmIpv6SrcVer13.Builder();
+ }
+ public OFOxmIpv6Src ipv6Src(IPv6Address value) {
+ return new OFOxmIpv6SrcVer13(
+ value
+ );
+ }
+
+ public OFOxmIpv6SrcMasked.Builder buildIpv6SrcMasked() {
+ return new OFOxmIpv6SrcMaskedVer13.Builder();
+ }
+ public OFOxmIpv6SrcMasked ipv6SrcMasked(IPv6Address value, IPv6Address mask) {
+ return new OFOxmIpv6SrcMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmMetadata.Builder buildMetadata() {
+ return new OFOxmMetadataVer13.Builder();
+ }
+ public OFOxmMetadata metadata(OFMetadata value) {
+ return new OFOxmMetadataVer13(
+ value
+ );
+ }
+
+ public OFOxmMetadataMasked.Builder buildMetadataMasked() {
+ return new OFOxmMetadataMaskedVer13.Builder();
+ }
+ public OFOxmMetadataMasked metadataMasked(OFMetadata value, OFMetadata mask) {
+ return new OFOxmMetadataMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmMplsLabel.Builder buildMplsLabel() {
+ return new OFOxmMplsLabelVer13.Builder();
+ }
+ public OFOxmMplsLabel mplsLabel(U32 value) {
+ return new OFOxmMplsLabelVer13(
+ value
+ );
+ }
+
+ public OFOxmMplsLabelMasked.Builder buildMplsLabelMasked() {
+ return new OFOxmMplsLabelMaskedVer13.Builder();
+ }
+ public OFOxmMplsLabelMasked mplsLabelMasked(U32 value, U32 mask) {
+ return new OFOxmMplsLabelMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmMplsTc.Builder buildMplsTc() {
+ return new OFOxmMplsTcVer13.Builder();
+ }
+ public OFOxmMplsTc mplsTc(U8 value) {
+ return new OFOxmMplsTcVer13(
+ value
+ );
+ }
+
+ public OFOxmMplsTcMasked.Builder buildMplsTcMasked() {
+ return new OFOxmMplsTcMaskedVer13.Builder();
+ }
+ public OFOxmMplsTcMasked mplsTcMasked(U8 value, U8 mask) {
+ return new OFOxmMplsTcMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmSctpDst.Builder buildSctpDst() {
+ return new OFOxmSctpDstVer13.Builder();
+ }
+ public OFOxmSctpDst sctpDst(TransportPort value) {
+ return new OFOxmSctpDstVer13(
+ value
+ );
+ }
+
+ public OFOxmSctpDstMasked.Builder buildSctpDstMasked() {
+ return new OFOxmSctpDstMaskedVer13.Builder();
+ }
+ public OFOxmSctpDstMasked sctpDstMasked(TransportPort value, TransportPort mask) {
+ return new OFOxmSctpDstMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmSctpSrc.Builder buildSctpSrc() {
+ return new OFOxmSctpSrcVer13.Builder();
+ }
+ public OFOxmSctpSrc sctpSrc(TransportPort value) {
+ return new OFOxmSctpSrcVer13(
+ value
+ );
+ }
+
+ public OFOxmSctpSrcMasked.Builder buildSctpSrcMasked() {
+ return new OFOxmSctpSrcMaskedVer13.Builder();
+ }
+ public OFOxmSctpSrcMasked sctpSrcMasked(TransportPort value, TransportPort mask) {
+ return new OFOxmSctpSrcMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmTcpDst.Builder buildTcpDst() {
+ return new OFOxmTcpDstVer13.Builder();
+ }
+ public OFOxmTcpDst tcpDst(TransportPort value) {
+ return new OFOxmTcpDstVer13(
+ value
+ );
+ }
+
+ public OFOxmTcpDstMasked.Builder buildTcpDstMasked() {
+ return new OFOxmTcpDstMaskedVer13.Builder();
+ }
+ public OFOxmTcpDstMasked tcpDstMasked(TransportPort value, TransportPort mask) {
+ return new OFOxmTcpDstMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmTcpSrc.Builder buildTcpSrc() {
+ return new OFOxmTcpSrcVer13.Builder();
+ }
+ public OFOxmTcpSrc tcpSrc(TransportPort value) {
+ return new OFOxmTcpSrcVer13(
+ value
+ );
+ }
+
+ public OFOxmTcpSrcMasked.Builder buildTcpSrcMasked() {
+ return new OFOxmTcpSrcMaskedVer13.Builder();
+ }
+ public OFOxmTcpSrcMasked tcpSrcMasked(TransportPort value, TransportPort mask) {
+ return new OFOxmTcpSrcMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmUdpDst.Builder buildUdpDst() {
+ return new OFOxmUdpDstVer13.Builder();
+ }
+ public OFOxmUdpDst udpDst(TransportPort value) {
+ return new OFOxmUdpDstVer13(
+ value
+ );
+ }
+
+ public OFOxmUdpDstMasked.Builder buildUdpDstMasked() {
+ return new OFOxmUdpDstMaskedVer13.Builder();
+ }
+ public OFOxmUdpDstMasked udpDstMasked(TransportPort value, TransportPort mask) {
+ return new OFOxmUdpDstMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmUdpSrc.Builder buildUdpSrc() {
+ return new OFOxmUdpSrcVer13.Builder();
+ }
+ public OFOxmUdpSrc udpSrc(TransportPort value) {
+ return new OFOxmUdpSrcVer13(
+ value
+ );
+ }
+
+ public OFOxmUdpSrcMasked.Builder buildUdpSrcMasked() {
+ return new OFOxmUdpSrcMaskedVer13.Builder();
+ }
+ public OFOxmUdpSrcMasked udpSrcMasked(TransportPort value, TransportPort mask) {
+ return new OFOxmUdpSrcMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmVlanPcp.Builder buildVlanPcp() {
+ return new OFOxmVlanPcpVer13.Builder();
+ }
+ public OFOxmVlanPcp vlanPcp(VlanPcp value) {
+ return new OFOxmVlanPcpVer13(
+ value
+ );
+ }
+
+ public OFOxmVlanPcpMasked.Builder buildVlanPcpMasked() {
+ return new OFOxmVlanPcpMaskedVer13.Builder();
+ }
+ public OFOxmVlanPcpMasked vlanPcpMasked(VlanPcp value, VlanPcp mask) {
+ return new OFOxmVlanPcpMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmVlanVid.Builder buildVlanVid() {
+ return new OFOxmVlanVidVer13.Builder();
+ }
+ public OFOxmVlanVid vlanVid(OFVlanVidMatch value) {
+ return new OFOxmVlanVidVer13(
+ value
+ );
+ }
+
+ public OFOxmVlanVidMasked.Builder buildVlanVidMasked() {
+ return new OFOxmVlanVidMaskedVer13.Builder();
+ }
+ public OFOxmVlanVidMasked vlanVidMasked(OFVlanVidMatch value, OFVlanVidMatch mask) {
+ return new OFOxmVlanVidMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFOxmTunnelId.Builder buildTunnelId() {
+ return new OFOxmTunnelIdVer13.Builder();
+ }
+ public OFOxmTunnelId tunnelId(U64 value) {
+ return new OFOxmTunnelIdVer13(
+ value
+ );
+ }
+
+ public OFOxmTunnelIdMasked.Builder buildTunnelIdMasked() {
+ return new OFOxmTunnelIdMaskedVer13.Builder();
+ }
+ public OFOxmTunnelIdMasked tunnelIdMasked(U64 value, U64 mask) {
+ return new OFOxmTunnelIdMaskedVer13(
+ value,
+ mask
+ );
+ }
+
+ public OFMessageReader<OFOxm<?>> getReader() {
+ return OFOxmVer13.READER;
+ }
+
+ @SuppressWarnings("unchecked")
+ public <F extends OFValueType<F>> OFOxm<F> fromValue(F value, MatchField<F> field) {
+ switch (field.id) {
+ case ARP_OP:
+ return (OFOxm<F>)((Object)arpOp((ArpOpcode)((Object)value)));
+ case ARP_SHA:
+ return (OFOxm<F>)((Object)arpSha((MacAddress)((Object)value)));
+ case ARP_SPA:
+ return (OFOxm<F>)((Object)arpSpa((IPv4Address)((Object)value)));
+ case ARP_THA:
+ return (OFOxm<F>)((Object)arpTha((MacAddress)((Object)value)));
+ case ARP_TPA:
+ return (OFOxm<F>)((Object)arpTpa((IPv4Address)((Object)value)));
+ case BSN_EGR_PORT_GROUP_ID:
+ return (OFOxm<F>)((Object)bsnEgrPortGroupId((ClassId)((Object)value)));
+ case BSN_GLOBAL_VRF_ALLOWED:
+ return (OFOxm<F>)((Object)bsnGlobalVrfAllowed((OFBooleanValue)((Object)value)));
+ case BSN_IN_PORTS_128:
+ return (OFOxm<F>)((Object)bsnInPorts128((OFBitMask128)((Object)value)));
+ case BSN_L3_DST_CLASS_ID:
+ return (OFOxm<F>)((Object)bsnL3DstClassId((ClassId)((Object)value)));
+ case BSN_L3_INTERFACE_CLASS_ID:
+ return (OFOxm<F>)((Object)bsnL3InterfaceClassId((ClassId)((Object)value)));
+ case BSN_L3_SRC_CLASS_ID:
+ return (OFOxm<F>)((Object)bsnL3SrcClassId((ClassId)((Object)value)));
+ case BSN_LAG_ID:
+ return (OFOxm<F>)((Object)bsnLagId((LagId)((Object)value)));
+ case BSN_TCP_FLAGS:
+ return (OFOxm<F>)((Object)bsnTcpFlags((U16)((Object)value)));
+ case BSN_UDF0:
+ return (OFOxm<F>)((Object)bsnUdf0((UDF)((Object)value)));
+ case BSN_UDF1:
+ return (OFOxm<F>)((Object)bsnUdf1((UDF)((Object)value)));
+ case BSN_UDF2:
+ return (OFOxm<F>)((Object)bsnUdf2((UDF)((Object)value)));
+ case BSN_UDF3:
+ return (OFOxm<F>)((Object)bsnUdf3((UDF)((Object)value)));
+ case BSN_UDF4:
+ return (OFOxm<F>)((Object)bsnUdf4((UDF)((Object)value)));
+ case BSN_UDF5:
+ return (OFOxm<F>)((Object)bsnUdf5((UDF)((Object)value)));
+ case BSN_UDF6:
+ return (OFOxm<F>)((Object)bsnUdf6((UDF)((Object)value)));
+ case BSN_UDF7:
+ return (OFOxm<F>)((Object)bsnUdf7((UDF)((Object)value)));
+ case BSN_VLAN_XLATE_PORT_GROUP_ID:
+ return (OFOxm<F>)((Object)bsnVlanXlatePortGroupId((ClassId)((Object)value)));
+ case BSN_VRF:
+ return (OFOxm<F>)((Object)bsnVrf((VRF)((Object)value)));
+ case ETH_DST:
+ return (OFOxm<F>)((Object)ethDst((MacAddress)((Object)value)));
+ case ETH_SRC:
+ return (OFOxm<F>)((Object)ethSrc((MacAddress)((Object)value)));
+ case ETH_TYPE:
+ return (OFOxm<F>)((Object)ethType((EthType)((Object)value)));
+ case ICMPV4_CODE:
+ return (OFOxm<F>)((Object)icmpv4Code((ICMPv4Code)((Object)value)));
+ case ICMPV4_TYPE:
+ return (OFOxm<F>)((Object)icmpv4Type((ICMPv4Type)((Object)value)));
+ case ICMPV6_CODE:
+ return (OFOxm<F>)((Object)icmpv6Code((U8)((Object)value)));
+ case ICMPV6_TYPE:
+ return (OFOxm<F>)((Object)icmpv6Type((U8)((Object)value)));
+ case IN_PHY_PORT:
+ return (OFOxm<F>)((Object)inPhyPort((OFPort)((Object)value)));
+ case IN_PORT:
+ return (OFOxm<F>)((Object)inPort((OFPort)((Object)value)));
+ case IP_DSCP:
+ return (OFOxm<F>)((Object)ipDscp((IpDscp)((Object)value)));
+ case IP_ECN:
+ return (OFOxm<F>)((Object)ipEcn((IpEcn)((Object)value)));
+ case IP_PROTO:
+ return (OFOxm<F>)((Object)ipProto((IpProtocol)((Object)value)));
+ case IPV4_DST:
+ return (OFOxm<F>)((Object)ipv4Dst((IPv4Address)((Object)value)));
+ case IPV4_SRC:
+ return (OFOxm<F>)((Object)ipv4Src((IPv4Address)((Object)value)));
+ case IPV6_DST:
+ return (OFOxm<F>)((Object)ipv6Dst((IPv6Address)((Object)value)));
+ case IPV6_FLABEL:
+ return (OFOxm<F>)((Object)ipv6Flabel((IPv6FlowLabel)((Object)value)));
+ case IPV6_ND_SLL:
+ return (OFOxm<F>)((Object)ipv6NdSll((MacAddress)((Object)value)));
+ case IPV6_ND_TARGET:
+ return (OFOxm<F>)((Object)ipv6NdTarget((IPv6Address)((Object)value)));
+ case IPV6_ND_TLL:
+ return (OFOxm<F>)((Object)ipv6NdTll((MacAddress)((Object)value)));
+ case IPV6_SRC:
+ return (OFOxm<F>)((Object)ipv6Src((IPv6Address)((Object)value)));
+ case METADATA:
+ return (OFOxm<F>)((Object)metadata((OFMetadata)((Object)value)));
+ case MPLS_LABEL:
+ return (OFOxm<F>)((Object)mplsLabel((U32)((Object)value)));
+ case MPLS_TC:
+ return (OFOxm<F>)((Object)mplsTc((U8)((Object)value)));
+ case SCTP_DST:
+ return (OFOxm<F>)((Object)sctpDst((TransportPort)((Object)value)));
+ case SCTP_SRC:
+ return (OFOxm<F>)((Object)sctpSrc((TransportPort)((Object)value)));
+ case TCP_DST:
+ return (OFOxm<F>)((Object)tcpDst((TransportPort)((Object)value)));
+ case TCP_SRC:
+ return (OFOxm<F>)((Object)tcpSrc((TransportPort)((Object)value)));
+ case UDP_DST:
+ return (OFOxm<F>)((Object)udpDst((TransportPort)((Object)value)));
+ case UDP_SRC:
+ return (OFOxm<F>)((Object)udpSrc((TransportPort)((Object)value)));
+ case VLAN_PCP:
+ return (OFOxm<F>)((Object)vlanPcp((VlanPcp)((Object)value)));
+ case VLAN_VID:
+ return (OFOxm<F>)((Object)vlanVid((OFVlanVidMatch)((Object)value)));
+ case TUNNEL_ID:
+ return (OFOxm<F>)((Object)tunnelId((U64)((Object)value)));
+ default:
+ throw new IllegalArgumentException("No OXM known for match field " + field);
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public <F extends OFValueType<F>> OFOxm<F> fromValueAndMask(F value, F mask, MatchField<F> field) {
+ switch (field.id) {
+ case ARP_OP:
+ return (OFOxm<F>)((Object)arpOpMasked((ArpOpcode)((Object)value), (ArpOpcode)((Object)mask)));
+ case ARP_SHA:
+ return (OFOxm<F>)((Object)arpShaMasked((MacAddress)((Object)value), (MacAddress)((Object)mask)));
+ case ARP_SPA:
+ return (OFOxm<F>)((Object)arpSpaMasked((IPv4Address)((Object)value), (IPv4Address)((Object)mask)));
+ case ARP_THA:
+ return (OFOxm<F>)((Object)arpThaMasked((MacAddress)((Object)value), (MacAddress)((Object)mask)));
+ case ARP_TPA:
+ return (OFOxm<F>)((Object)arpTpaMasked((IPv4Address)((Object)value), (IPv4Address)((Object)mask)));
+ case BSN_EGR_PORT_GROUP_ID:
+ return (OFOxm<F>)((Object)bsnEgrPortGroupIdMasked((ClassId)((Object)value), (ClassId)((Object)mask)));
+ case BSN_GLOBAL_VRF_ALLOWED:
+ return (OFOxm<F>)((Object)bsnGlobalVrfAllowedMasked((OFBooleanValue)((Object)value), (OFBooleanValue)((Object)mask)));
+ case BSN_IN_PORTS_128:
+ return (OFOxm<F>)((Object)bsnInPorts128Masked((OFBitMask128)((Object)value), (OFBitMask128)((Object)mask)));
+ case BSN_L3_DST_CLASS_ID:
+ return (OFOxm<F>)((Object)bsnL3DstClassIdMasked((ClassId)((Object)value), (ClassId)((Object)mask)));
+ case BSN_L3_INTERFACE_CLASS_ID:
+ return (OFOxm<F>)((Object)bsnL3InterfaceClassIdMasked((ClassId)((Object)value), (ClassId)((Object)mask)));
+ case BSN_L3_SRC_CLASS_ID:
+ return (OFOxm<F>)((Object)bsnL3SrcClassIdMasked((ClassId)((Object)value), (ClassId)((Object)mask)));
+ case BSN_LAG_ID:
+ return (OFOxm<F>)((Object)bsnLagIdMasked((LagId)((Object)value), (LagId)((Object)mask)));
+ case BSN_TCP_FLAGS:
+ return (OFOxm<F>)((Object)bsnTcpFlagsMasked((U16)((Object)value), (U16)((Object)mask)));
+ case BSN_UDF0:
+ return (OFOxm<F>)((Object)bsnUdf0Masked((UDF)((Object)value), (UDF)((Object)mask)));
+ case BSN_UDF1:
+ return (OFOxm<F>)((Object)bsnUdf1Masked((UDF)((Object)value), (UDF)((Object)mask)));
+ case BSN_UDF2:
+ return (OFOxm<F>)((Object)bsnUdf2Masked((UDF)((Object)value), (UDF)((Object)mask)));
+ case BSN_UDF3:
+ return (OFOxm<F>)((Object)bsnUdf3Masked((UDF)((Object)value), (UDF)((Object)mask)));
+ case BSN_UDF4:
+ return (OFOxm<F>)((Object)bsnUdf4Masked((UDF)((Object)value), (UDF)((Object)mask)));
+ case BSN_UDF5:
+ return (OFOxm<F>)((Object)bsnUdf5Masked((UDF)((Object)value), (UDF)((Object)mask)));
+ case BSN_UDF6:
+ return (OFOxm<F>)((Object)bsnUdf6Masked((UDF)((Object)value), (UDF)((Object)mask)));
+ case BSN_UDF7:
+ return (OFOxm<F>)((Object)bsnUdf7Masked((UDF)((Object)value), (UDF)((Object)mask)));
+ case BSN_VLAN_XLATE_PORT_GROUP_ID:
+ return (OFOxm<F>)((Object)bsnVlanXlatePortGroupIdMasked((ClassId)((Object)value), (ClassId)((Object)mask)));
+ case BSN_VRF:
+ return (OFOxm<F>)((Object)bsnVrfMasked((VRF)((Object)value), (VRF)((Object)mask)));
+ case ETH_DST:
+ return (OFOxm<F>)((Object)ethDstMasked((MacAddress)((Object)value), (MacAddress)((Object)mask)));
+ case ETH_SRC:
+ return (OFOxm<F>)((Object)ethSrcMasked((MacAddress)((Object)value), (MacAddress)((Object)mask)));
+ case ETH_TYPE:
+ return (OFOxm<F>)((Object)ethTypeMasked((EthType)((Object)value), (EthType)((Object)mask)));
+ case ICMPV4_CODE:
+ return (OFOxm<F>)((Object)icmpv4CodeMasked((ICMPv4Code)((Object)value), (ICMPv4Code)((Object)mask)));
+ case ICMPV4_TYPE:
+ return (OFOxm<F>)((Object)icmpv4TypeMasked((ICMPv4Type)((Object)value), (ICMPv4Type)((Object)mask)));
+ case ICMPV6_CODE:
+ return (OFOxm<F>)((Object)icmpv6CodeMasked((U8)((Object)value), (U8)((Object)mask)));
+ case ICMPV6_TYPE:
+ return (OFOxm<F>)((Object)icmpv6TypeMasked((U8)((Object)value), (U8)((Object)mask)));
+ case IN_PHY_PORT:
+ return (OFOxm<F>)((Object)inPhyPortMasked((OFPort)((Object)value), (OFPort)((Object)mask)));
+ case IN_PORT:
+ return (OFOxm<F>)((Object)inPortMasked((OFPort)((Object)value), (OFPort)((Object)mask)));
+ case IP_DSCP:
+ return (OFOxm<F>)((Object)ipDscpMasked((IpDscp)((Object)value), (IpDscp)((Object)mask)));
+ case IP_ECN:
+ return (OFOxm<F>)((Object)ipEcnMasked((IpEcn)((Object)value), (IpEcn)((Object)mask)));
+ case IP_PROTO:
+ return (OFOxm<F>)((Object)ipProtoMasked((IpProtocol)((Object)value), (IpProtocol)((Object)mask)));
+ case IPV4_DST:
+ return (OFOxm<F>)((Object)ipv4DstMasked((IPv4Address)((Object)value), (IPv4Address)((Object)mask)));
+ case IPV4_SRC:
+ return (OFOxm<F>)((Object)ipv4SrcMasked((IPv4Address)((Object)value), (IPv4Address)((Object)mask)));
+ case IPV6_DST:
+ return (OFOxm<F>)((Object)ipv6DstMasked((IPv6Address)((Object)value), (IPv6Address)((Object)mask)));
+ case IPV6_FLABEL:
+ return (OFOxm<F>)((Object)ipv6FlabelMasked((IPv6FlowLabel)((Object)value), (IPv6FlowLabel)((Object)mask)));
+ case IPV6_ND_SLL:
+ return (OFOxm<F>)((Object)ipv6NdSllMasked((MacAddress)((Object)value), (MacAddress)((Object)mask)));
+ case IPV6_ND_TARGET:
+ return (OFOxm<F>)((Object)ipv6NdTargetMasked((IPv6Address)((Object)value), (IPv6Address)((Object)mask)));
+ case IPV6_ND_TLL:
+ return (OFOxm<F>)((Object)ipv6NdTllMasked((MacAddress)((Object)value), (MacAddress)((Object)mask)));
+ case IPV6_SRC:
+ return (OFOxm<F>)((Object)ipv6SrcMasked((IPv6Address)((Object)value), (IPv6Address)((Object)mask)));
+ case METADATA:
+ return (OFOxm<F>)((Object)metadataMasked((OFMetadata)((Object)value), (OFMetadata)((Object)mask)));
+ case MPLS_LABEL:
+ return (OFOxm<F>)((Object)mplsLabelMasked((U32)((Object)value), (U32)((Object)mask)));
+ case MPLS_TC:
+ return (OFOxm<F>)((Object)mplsTcMasked((U8)((Object)value), (U8)((Object)mask)));
+ case SCTP_DST:
+ return (OFOxm<F>)((Object)sctpDstMasked((TransportPort)((Object)value), (TransportPort)((Object)mask)));
+ case SCTP_SRC:
+ return (OFOxm<F>)((Object)sctpSrcMasked((TransportPort)((Object)value), (TransportPort)((Object)mask)));
+ case TCP_DST:
+ return (OFOxm<F>)((Object)tcpDstMasked((TransportPort)((Object)value), (TransportPort)((Object)mask)));
+ case TCP_SRC:
+ return (OFOxm<F>)((Object)tcpSrcMasked((TransportPort)((Object)value), (TransportPort)((Object)mask)));
+ case UDP_DST:
+ return (OFOxm<F>)((Object)udpDstMasked((TransportPort)((Object)value), (TransportPort)((Object)mask)));
+ case UDP_SRC:
+ return (OFOxm<F>)((Object)udpSrcMasked((TransportPort)((Object)value), (TransportPort)((Object)mask)));
+ case VLAN_PCP:
+ return (OFOxm<F>)((Object)vlanPcpMasked((VlanPcp)((Object)value), (VlanPcp)((Object)mask)));
+ case VLAN_VID:
+ return (OFOxm<F>)((Object)vlanVidMasked((OFVlanVidMatch)((Object)value), (OFVlanVidMatch)((Object)mask)));
+ case TUNNEL_ID:
+ return (OFOxm<F>)((Object)tunnelIdMasked((U64)((Object)value), (U64)((Object)mask)));
+ default:
+ throw new IllegalArgumentException("No OXM known for match field " + field);
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public <F extends OFValueType<F>> OFOxm<F> fromMasked(Masked<F> masked, MatchField<F> field) {
+ switch (field.id) {
+ case ARP_OP:
+ return (OFOxm<F>)((Object)arpOpMasked((ArpOpcode)((Object)(masked.getValue())), (ArpOpcode)((Object)(masked.getMask()))));
+ case ARP_SHA:
+ return (OFOxm<F>)((Object)arpShaMasked((MacAddress)((Object)(masked.getValue())), (MacAddress)((Object)(masked.getMask()))));
+ case ARP_SPA:
+ return (OFOxm<F>)((Object)arpSpaMasked((IPv4Address)((Object)(masked.getValue())), (IPv4Address)((Object)(masked.getMask()))));
+ case ARP_THA:
+ return (OFOxm<F>)((Object)arpThaMasked((MacAddress)((Object)(masked.getValue())), (MacAddress)((Object)(masked.getMask()))));
+ case ARP_TPA:
+ return (OFOxm<F>)((Object)arpTpaMasked((IPv4Address)((Object)(masked.getValue())), (IPv4Address)((Object)(masked.getMask()))));
+ case BSN_EGR_PORT_GROUP_ID:
+ return (OFOxm<F>)((Object)bsnEgrPortGroupIdMasked((ClassId)((Object)(masked.getValue())), (ClassId)((Object)(masked.getMask()))));
+ case BSN_GLOBAL_VRF_ALLOWED:
+ return (OFOxm<F>)((Object)bsnGlobalVrfAllowedMasked((OFBooleanValue)((Object)(masked.getValue())), (OFBooleanValue)((Object)(masked.getMask()))));
+ case BSN_IN_PORTS_128:
+ return (OFOxm<F>)((Object)bsnInPorts128Masked((OFBitMask128)((Object)(masked.getValue())), (OFBitMask128)((Object)(masked.getMask()))));
+ case BSN_L3_DST_CLASS_ID:
+ return (OFOxm<F>)((Object)bsnL3DstClassIdMasked((ClassId)((Object)(masked.getValue())), (ClassId)((Object)(masked.getMask()))));
+ case BSN_L3_INTERFACE_CLASS_ID:
+ return (OFOxm<F>)((Object)bsnL3InterfaceClassIdMasked((ClassId)((Object)(masked.getValue())), (ClassId)((Object)(masked.getMask()))));
+ case BSN_L3_SRC_CLASS_ID:
+ return (OFOxm<F>)((Object)bsnL3SrcClassIdMasked((ClassId)((Object)(masked.getValue())), (ClassId)((Object)(masked.getMask()))));
+ case BSN_LAG_ID:
+ return (OFOxm<F>)((Object)bsnLagIdMasked((LagId)((Object)(masked.getValue())), (LagId)((Object)(masked.getMask()))));
+ case BSN_TCP_FLAGS:
+ return (OFOxm<F>)((Object)bsnTcpFlagsMasked((U16)((Object)(masked.getValue())), (U16)((Object)(masked.getMask()))));
+ case BSN_UDF0:
+ return (OFOxm<F>)((Object)bsnUdf0Masked((UDF)((Object)(masked.getValue())), (UDF)((Object)(masked.getMask()))));
+ case BSN_UDF1:
+ return (OFOxm<F>)((Object)bsnUdf1Masked((UDF)((Object)(masked.getValue())), (UDF)((Object)(masked.getMask()))));
+ case BSN_UDF2:
+ return (OFOxm<F>)((Object)bsnUdf2Masked((UDF)((Object)(masked.getValue())), (UDF)((Object)(masked.getMask()))));
+ case BSN_UDF3:
+ return (OFOxm<F>)((Object)bsnUdf3Masked((UDF)((Object)(masked.getValue())), (UDF)((Object)(masked.getMask()))));
+ case BSN_UDF4:
+ return (OFOxm<F>)((Object)bsnUdf4Masked((UDF)((Object)(masked.getValue())), (UDF)((Object)(masked.getMask()))));
+ case BSN_UDF5:
+ return (OFOxm<F>)((Object)bsnUdf5Masked((UDF)((Object)(masked.getValue())), (UDF)((Object)(masked.getMask()))));
+ case BSN_UDF6:
+ return (OFOxm<F>)((Object)bsnUdf6Masked((UDF)((Object)(masked.getValue())), (UDF)((Object)(masked.getMask()))));
+ case BSN_UDF7:
+ return (OFOxm<F>)((Object)bsnUdf7Masked((UDF)((Object)(masked.getValue())), (UDF)((Object)(masked.getMask()))));
+ case BSN_VLAN_XLATE_PORT_GROUP_ID:
+ return (OFOxm<F>)((Object)bsnVlanXlatePortGroupIdMasked((ClassId)((Object)(masked.getValue())), (ClassId)((Object)(masked.getMask()))));
+ case BSN_VRF:
+ return (OFOxm<F>)((Object)bsnVrfMasked((VRF)((Object)(masked.getValue())), (VRF)((Object)(masked.getMask()))));
+ case ETH_DST:
+ return (OFOxm<F>)((Object)ethDstMasked((MacAddress)((Object)(masked.getValue())), (MacAddress)((Object)(masked.getMask()))));
+ case ETH_SRC:
+ return (OFOxm<F>)((Object)ethSrcMasked((MacAddress)((Object)(masked.getValue())), (MacAddress)((Object)(masked.getMask()))));
+ case ETH_TYPE:
+ return (OFOxm<F>)((Object)ethTypeMasked((EthType)((Object)(masked.getValue())), (EthType)((Object)(masked.getMask()))));
+ case ICMPV4_CODE:
+ return (OFOxm<F>)((Object)icmpv4CodeMasked((ICMPv4Code)((Object)(masked.getValue())), (ICMPv4Code)((Object)(masked.getMask()))));
+ case ICMPV4_TYPE:
+ return (OFOxm<F>)((Object)icmpv4TypeMasked((ICMPv4Type)((Object)(masked.getValue())), (ICMPv4Type)((Object)(masked.getMask()))));
+ case ICMPV6_CODE:
+ return (OFOxm<F>)((Object)icmpv6CodeMasked((U8)((Object)(masked.getValue())), (U8)((Object)(masked.getMask()))));
+ case ICMPV6_TYPE:
+ return (OFOxm<F>)((Object)icmpv6TypeMasked((U8)((Object)(masked.getValue())), (U8)((Object)(masked.getMask()))));
+ case IN_PHY_PORT:
+ return (OFOxm<F>)((Object)inPhyPortMasked((OFPort)((Object)(masked.getValue())), (OFPort)((Object)(masked.getMask()))));
+ case IN_PORT:
+ return (OFOxm<F>)((Object)inPortMasked((OFPort)((Object)(masked.getValue())), (OFPort)((Object)(masked.getMask()))));
+ case IP_DSCP:
+ return (OFOxm<F>)((Object)ipDscpMasked((IpDscp)((Object)(masked.getValue())), (IpDscp)((Object)(masked.getMask()))));
+ case IP_ECN:
+ return (OFOxm<F>)((Object)ipEcnMasked((IpEcn)((Object)(masked.getValue())), (IpEcn)((Object)(masked.getMask()))));
+ case IP_PROTO:
+ return (OFOxm<F>)((Object)ipProtoMasked((IpProtocol)((Object)(masked.getValue())), (IpProtocol)((Object)(masked.getMask()))));
+ case IPV4_DST:
+ return (OFOxm<F>)((Object)ipv4DstMasked((IPv4Address)((Object)(masked.getValue())), (IPv4Address)((Object)(masked.getMask()))));
+ case IPV4_SRC:
+ return (OFOxm<F>)((Object)ipv4SrcMasked((IPv4Address)((Object)(masked.getValue())), (IPv4Address)((Object)(masked.getMask()))));
+ case IPV6_DST:
+ return (OFOxm<F>)((Object)ipv6DstMasked((IPv6Address)((Object)(masked.getValue())), (IPv6Address)((Object)(masked.getMask()))));
+ case IPV6_FLABEL:
+ return (OFOxm<F>)((Object)ipv6FlabelMasked((IPv6FlowLabel)((Object)(masked.getValue())), (IPv6FlowLabel)((Object)(masked.getMask()))));
+ case IPV6_ND_SLL:
+ return (OFOxm<F>)((Object)ipv6NdSllMasked((MacAddress)((Object)(masked.getValue())), (MacAddress)((Object)(masked.getMask()))));
+ case IPV6_ND_TARGET:
+ return (OFOxm<F>)((Object)ipv6NdTargetMasked((IPv6Address)((Object)(masked.getValue())), (IPv6Address)((Object)(masked.getMask()))));
+ case IPV6_ND_TLL:
+ return (OFOxm<F>)((Object)ipv6NdTllMasked((MacAddress)((Object)(masked.getValue())), (MacAddress)((Object)(masked.getMask()))));
+ case IPV6_SRC:
+ return (OFOxm<F>)((Object)ipv6SrcMasked((IPv6Address)((Object)(masked.getValue())), (IPv6Address)((Object)(masked.getMask()))));
+ case METADATA:
+ return (OFOxm<F>)((Object)metadataMasked((OFMetadata)((Object)(masked.getValue())), (OFMetadata)((Object)(masked.getMask()))));
+ case MPLS_LABEL:
+ return (OFOxm<F>)((Object)mplsLabelMasked((U32)((Object)(masked.getValue())), (U32)((Object)(masked.getMask()))));
+ case MPLS_TC:
+ return (OFOxm<F>)((Object)mplsTcMasked((U8)((Object)(masked.getValue())), (U8)((Object)(masked.getMask()))));
+ case SCTP_DST:
+ return (OFOxm<F>)((Object)sctpDstMasked((TransportPort)((Object)(masked.getValue())), (TransportPort)((Object)(masked.getMask()))));
+ case SCTP_SRC:
+ return (OFOxm<F>)((Object)sctpSrcMasked((TransportPort)((Object)(masked.getValue())), (TransportPort)((Object)(masked.getMask()))));
+ case TCP_DST:
+ return (OFOxm<F>)((Object)tcpDstMasked((TransportPort)((Object)(masked.getValue())), (TransportPort)((Object)(masked.getMask()))));
+ case TCP_SRC:
+ return (OFOxm<F>)((Object)tcpSrcMasked((TransportPort)((Object)(masked.getValue())), (TransportPort)((Object)(masked.getMask()))));
+ case UDP_DST:
+ return (OFOxm<F>)((Object)udpDstMasked((TransportPort)((Object)(masked.getValue())), (TransportPort)((Object)(masked.getMask()))));
+ case UDP_SRC:
+ return (OFOxm<F>)((Object)udpSrcMasked((TransportPort)((Object)(masked.getValue())), (TransportPort)((Object)(masked.getMask()))));
+ case VLAN_PCP:
+ return (OFOxm<F>)((Object)vlanPcpMasked((VlanPcp)((Object)(masked.getValue())), (VlanPcp)((Object)(masked.getMask()))));
+ case VLAN_VID:
+ return (OFOxm<F>)((Object)vlanVidMasked((OFVlanVidMatch)((Object)(masked.getValue())), (OFVlanVidMatch)((Object)(masked.getMask()))));
+ case TUNNEL_ID:
+ return (OFOxm<F>)((Object)tunnelIdMasked((U64)((Object)(masked.getValue())), (U64)((Object)(masked.getMask()))));
+ default:
+ return null;
+ }
+ }
+
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPacketInReasonSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPacketInReasonSerializerVer13.java
new file mode 100644
index 0000000..3787e64
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPacketInReasonSerializerVer13.java
@@ -0,0 +1,149 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFPacketInReason;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+
+public class OFPacketInReasonSerializerVer13 {
+
+ public final static byte NO_MATCH_VAL = (byte) 0x0;
+ public final static byte ACTION_VAL = (byte) 0x1;
+ public final static byte INVALID_TTL_VAL = (byte) 0x2;
+ public final static byte BSN_NEW_HOST_VAL = (byte) 0x80;
+ public final static byte BSN_STATION_MOVE_VAL = (byte) 0x81;
+ public final static byte BSN_BAD_VLAN_VAL = (byte) 0x82;
+ public final static byte BSN_DESTINATION_LOOKUP_FAILURE_VAL = (byte) 0x83;
+ public final static byte BSN_NO_ROUTE_VAL = (byte) 0x84;
+ public final static byte BSN_ICMP_ECHO_REQUEST_VAL = (byte) 0x85;
+ public final static byte BSN_DEST_NETWORK_UNREACHABLE_VAL = (byte) 0x86;
+ public final static byte BSN_DEST_HOST_UNREACHABLE_VAL = (byte) 0x87;
+ public final static byte BSN_DEST_PORT_UNREACHABLE_VAL = (byte) 0x88;
+ public final static byte BSN_FRAGMENTATION_REQUIRED_VAL = (byte) 0x89;
+ public final static byte BSN_ARP_VAL = (byte) 0x8b;
+ public final static byte BSN_DHCP_VAL = (byte) 0x8c;
+ public final static byte BSN_DEBUG_VAL = (byte) 0x8d;
+ public final static byte BSN_PACKET_OF_DEATH_VAL = (byte) 0x8e;
+
+ public static OFPacketInReason readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readByte());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, OFPacketInReason e) {
+ bb.writeByte(toWireValue(e));
+ }
+
+ public static void putTo(OFPacketInReason e, PrimitiveSink sink) {
+ sink.putByte(toWireValue(e));
+ }
+
+ public static OFPacketInReason ofWireValue(byte val) {
+ switch(val) {
+ case NO_MATCH_VAL:
+ return OFPacketInReason.NO_MATCH;
+ case ACTION_VAL:
+ return OFPacketInReason.ACTION;
+ case INVALID_TTL_VAL:
+ return OFPacketInReason.INVALID_TTL;
+ case BSN_NEW_HOST_VAL:
+ return OFPacketInReason.BSN_NEW_HOST;
+ case BSN_STATION_MOVE_VAL:
+ return OFPacketInReason.BSN_STATION_MOVE;
+ case BSN_BAD_VLAN_VAL:
+ return OFPacketInReason.BSN_BAD_VLAN;
+ case BSN_DESTINATION_LOOKUP_FAILURE_VAL:
+ return OFPacketInReason.BSN_DESTINATION_LOOKUP_FAILURE;
+ case BSN_NO_ROUTE_VAL:
+ return OFPacketInReason.BSN_NO_ROUTE;
+ case BSN_ICMP_ECHO_REQUEST_VAL:
+ return OFPacketInReason.BSN_ICMP_ECHO_REQUEST;
+ case BSN_DEST_NETWORK_UNREACHABLE_VAL:
+ return OFPacketInReason.BSN_DEST_NETWORK_UNREACHABLE;
+ case BSN_DEST_HOST_UNREACHABLE_VAL:
+ return OFPacketInReason.BSN_DEST_HOST_UNREACHABLE;
+ case BSN_DEST_PORT_UNREACHABLE_VAL:
+ return OFPacketInReason.BSN_DEST_PORT_UNREACHABLE;
+ case BSN_FRAGMENTATION_REQUIRED_VAL:
+ return OFPacketInReason.BSN_FRAGMENTATION_REQUIRED;
+ case BSN_ARP_VAL:
+ return OFPacketInReason.BSN_ARP;
+ case BSN_DHCP_VAL:
+ return OFPacketInReason.BSN_DHCP;
+ case BSN_DEBUG_VAL:
+ return OFPacketInReason.BSN_DEBUG;
+ case BSN_PACKET_OF_DEATH_VAL:
+ return OFPacketInReason.BSN_PACKET_OF_DEATH;
+ default:
+ throw new IllegalArgumentException("Illegal wire value for type OFPacketInReason in version 1.3: " + val);
+ }
+ }
+
+
+ public static byte toWireValue(OFPacketInReason e) {
+ switch(e) {
+ case NO_MATCH:
+ return NO_MATCH_VAL;
+ case ACTION:
+ return ACTION_VAL;
+ case INVALID_TTL:
+ return INVALID_TTL_VAL;
+ case BSN_NEW_HOST:
+ return BSN_NEW_HOST_VAL;
+ case BSN_STATION_MOVE:
+ return BSN_STATION_MOVE_VAL;
+ case BSN_BAD_VLAN:
+ return BSN_BAD_VLAN_VAL;
+ case BSN_DESTINATION_LOOKUP_FAILURE:
+ return BSN_DESTINATION_LOOKUP_FAILURE_VAL;
+ case BSN_NO_ROUTE:
+ return BSN_NO_ROUTE_VAL;
+ case BSN_ICMP_ECHO_REQUEST:
+ return BSN_ICMP_ECHO_REQUEST_VAL;
+ case BSN_DEST_NETWORK_UNREACHABLE:
+ return BSN_DEST_NETWORK_UNREACHABLE_VAL;
+ case BSN_DEST_HOST_UNREACHABLE:
+ return BSN_DEST_HOST_UNREACHABLE_VAL;
+ case BSN_DEST_PORT_UNREACHABLE:
+ return BSN_DEST_PORT_UNREACHABLE_VAL;
+ case BSN_FRAGMENTATION_REQUIRED:
+ return BSN_FRAGMENTATION_REQUIRED_VAL;
+ case BSN_ARP:
+ return BSN_ARP_VAL;
+ case BSN_DHCP:
+ return BSN_DHCP_VAL;
+ case BSN_DEBUG:
+ return BSN_DEBUG_VAL;
+ case BSN_PACKET_OF_DEATH:
+ return BSN_PACKET_OF_DEATH_VAL;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFPacketInReason in version 1.3: " + e);
+ }
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPacketInVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPacketInVer13.java
new file mode 100644
index 0000000..b496100
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPacketInVer13.java
@@ -0,0 +1,689 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+import java.util.Arrays;
+
+class OFPacketInVer13 implements OFPacketIn {
+ private static final Logger logger = LoggerFactory.getLogger(OFPacketInVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 30;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static OFBufferId DEFAULT_BUFFER_ID = OFBufferId.NO_BUFFER;
+ private final static int DEFAULT_TOTAL_LEN = 0x0;
+ private final static TableId DEFAULT_TABLE_ID = TableId.ALL;
+ private final static U64 DEFAULT_COOKIE = U64.ZERO;
+ private final static Match DEFAULT_MATCH = OFFactoryVer13.MATCH_WILDCARD_ALL;
+ private final static byte[] DEFAULT_DATA = new byte[0];
+
+ // OF message fields
+ private final long xid;
+ private final OFBufferId bufferId;
+ private final int totalLen;
+ private final OFPacketInReason reason;
+ private final TableId tableId;
+ private final U64 cookie;
+ private final Match match;
+ private final byte[] data;
+//
+
+ // package private constructor - used by readers, builders, and factory
+ OFPacketInVer13(long xid, OFBufferId bufferId, int totalLen, OFPacketInReason reason, TableId tableId, U64 cookie, Match match, byte[] data) {
+ this.xid = xid;
+ this.bufferId = bufferId;
+ this.totalLen = totalLen;
+ this.reason = reason;
+ this.tableId = tableId;
+ this.cookie = cookie;
+ this.match = match;
+ this.data = data;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.PACKET_IN;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBufferId getBufferId() {
+ return bufferId;
+ }
+
+ @Override
+ public int getTotalLen() {
+ return totalLen;
+ }
+
+ @Override
+ public OFPacketInReason getReason() {
+ return reason;
+ }
+
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public Match getMatch() {
+ return match;
+ }
+
+ @Override
+ public byte[] getData() {
+ return data;
+ }
+
+ @Override
+ public OFPort getInPort()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property inPort not supported in version 1.3");
+ }
+
+ @Override
+ public OFPort getInPhyPort()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property inPhyPort not supported in version 1.3");
+ }
+
+ @Override
+ public U64 getCookie() {
+ return cookie;
+ }
+
+
+
+ public OFPacketIn.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFPacketIn.Builder {
+ final OFPacketInVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean bufferIdSet;
+ private OFBufferId bufferId;
+ private boolean totalLenSet;
+ private int totalLen;
+ private boolean reasonSet;
+ private OFPacketInReason reason;
+ private boolean tableIdSet;
+ private TableId tableId;
+ private boolean cookieSet;
+ private U64 cookie;
+ private boolean matchSet;
+ private Match match;
+ private boolean dataSet;
+ private byte[] data;
+
+ BuilderWithParent(OFPacketInVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.PACKET_IN;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFPacketIn.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFBufferId getBufferId() {
+ return bufferId;
+ }
+
+ @Override
+ public OFPacketIn.Builder setBufferId(OFBufferId bufferId) {
+ this.bufferId = bufferId;
+ this.bufferIdSet = true;
+ return this;
+ }
+ @Override
+ public int getTotalLen() {
+ return totalLen;
+ }
+
+ @Override
+ public OFPacketIn.Builder setTotalLen(int totalLen) {
+ this.totalLen = totalLen;
+ this.totalLenSet = true;
+ return this;
+ }
+ @Override
+ public OFPacketInReason getReason() {
+ return reason;
+ }
+
+ @Override
+ public OFPacketIn.Builder setReason(OFPacketInReason reason) {
+ this.reason = reason;
+ this.reasonSet = true;
+ return this;
+ }
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFPacketIn.Builder setTableId(TableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+ @Override
+ public Match getMatch() {
+ return match;
+ }
+
+ @Override
+ public OFPacketIn.Builder setMatch(Match match) {
+ this.match = match;
+ this.matchSet = true;
+ return this;
+ }
+ @Override
+ public byte[] getData() {
+ return data;
+ }
+
+ @Override
+ public OFPacketIn.Builder setData(byte[] data) {
+ this.data = data;
+ this.dataSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getInPort()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property inPort not supported in version 1.3");
+ }
+
+ @Override
+ public OFPacketIn.Builder setInPort(OFPort inPort) throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property inPort not supported in version 1.3");
+ }
+ @Override
+ public OFPort getInPhyPort()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property inPhyPort not supported in version 1.3");
+ }
+
+ @Override
+ public OFPacketIn.Builder setInPhyPort(OFPort inPhyPort) throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property inPhyPort not supported in version 1.3");
+ }
+ @Override
+ public U64 getCookie() {
+ return cookie;
+ }
+
+ @Override
+ public OFPacketIn.Builder setCookie(U64 cookie) {
+ this.cookie = cookie;
+ this.cookieSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFPacketIn build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ OFBufferId bufferId = this.bufferIdSet ? this.bufferId : parentMessage.bufferId;
+ if(bufferId == null)
+ throw new NullPointerException("Property bufferId must not be null");
+ int totalLen = this.totalLenSet ? this.totalLen : parentMessage.totalLen;
+ OFPacketInReason reason = this.reasonSet ? this.reason : parentMessage.reason;
+ if(reason == null)
+ throw new NullPointerException("Property reason must not be null");
+ TableId tableId = this.tableIdSet ? this.tableId : parentMessage.tableId;
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+ U64 cookie = this.cookieSet ? this.cookie : parentMessage.cookie;
+ if(cookie == null)
+ throw new NullPointerException("Property cookie must not be null");
+ Match match = this.matchSet ? this.match : parentMessage.match;
+ if(match == null)
+ throw new NullPointerException("Property match must not be null");
+ byte[] data = this.dataSet ? this.data : parentMessage.data;
+ if(data == null)
+ throw new NullPointerException("Property data must not be null");
+
+ //
+ return new OFPacketInVer13(
+ xid,
+ bufferId,
+ totalLen,
+ reason,
+ tableId,
+ cookie,
+ match,
+ data
+ );
+ }
+
+ }
+
+ static class Builder implements OFPacketIn.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean bufferIdSet;
+ private OFBufferId bufferId;
+ private boolean totalLenSet;
+ private int totalLen;
+ private boolean reasonSet;
+ private OFPacketInReason reason;
+ private boolean tableIdSet;
+ private TableId tableId;
+ private boolean cookieSet;
+ private U64 cookie;
+ private boolean matchSet;
+ private Match match;
+ private boolean dataSet;
+ private byte[] data;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.PACKET_IN;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFPacketIn.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFBufferId getBufferId() {
+ return bufferId;
+ }
+
+ @Override
+ public OFPacketIn.Builder setBufferId(OFBufferId bufferId) {
+ this.bufferId = bufferId;
+ this.bufferIdSet = true;
+ return this;
+ }
+ @Override
+ public int getTotalLen() {
+ return totalLen;
+ }
+
+ @Override
+ public OFPacketIn.Builder setTotalLen(int totalLen) {
+ this.totalLen = totalLen;
+ this.totalLenSet = true;
+ return this;
+ }
+ @Override
+ public OFPacketInReason getReason() {
+ return reason;
+ }
+
+ @Override
+ public OFPacketIn.Builder setReason(OFPacketInReason reason) {
+ this.reason = reason;
+ this.reasonSet = true;
+ return this;
+ }
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFPacketIn.Builder setTableId(TableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+ @Override
+ public Match getMatch() {
+ return match;
+ }
+
+ @Override
+ public OFPacketIn.Builder setMatch(Match match) {
+ this.match = match;
+ this.matchSet = true;
+ return this;
+ }
+ @Override
+ public byte[] getData() {
+ return data;
+ }
+
+ @Override
+ public OFPacketIn.Builder setData(byte[] data) {
+ this.data = data;
+ this.dataSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getInPort()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property inPort not supported in version 1.3");
+ }
+
+ @Override
+ public OFPacketIn.Builder setInPort(OFPort inPort) throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property inPort not supported in version 1.3");
+ }
+ @Override
+ public OFPort getInPhyPort()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property inPhyPort not supported in version 1.3");
+ }
+
+ @Override
+ public OFPacketIn.Builder setInPhyPort(OFPort inPhyPort) throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property inPhyPort not supported in version 1.3");
+ }
+ @Override
+ public U64 getCookie() {
+ return cookie;
+ }
+
+ @Override
+ public OFPacketIn.Builder setCookie(U64 cookie) {
+ this.cookie = cookie;
+ this.cookieSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFPacketIn build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ OFBufferId bufferId = this.bufferIdSet ? this.bufferId : DEFAULT_BUFFER_ID;
+ if(bufferId == null)
+ throw new NullPointerException("Property bufferId must not be null");
+ int totalLen = this.totalLenSet ? this.totalLen : DEFAULT_TOTAL_LEN;
+ if(!this.reasonSet)
+ throw new IllegalStateException("Property reason doesn't have default value -- must be set");
+ if(reason == null)
+ throw new NullPointerException("Property reason must not be null");
+ TableId tableId = this.tableIdSet ? this.tableId : DEFAULT_TABLE_ID;
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+ U64 cookie = this.cookieSet ? this.cookie : DEFAULT_COOKIE;
+ if(cookie == null)
+ throw new NullPointerException("Property cookie must not be null");
+ Match match = this.matchSet ? this.match : DEFAULT_MATCH;
+ if(match == null)
+ throw new NullPointerException("Property match must not be null");
+ byte[] data = this.dataSet ? this.data : DEFAULT_DATA;
+ if(data == null)
+ throw new NullPointerException("Property data must not be null");
+
+
+ return new OFPacketInVer13(
+ xid,
+ bufferId,
+ totalLen,
+ reason,
+ tableId,
+ cookie,
+ match,
+ data
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFPacketIn> {
+ @Override
+ public OFPacketIn readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 10
+ byte type = bb.readByte();
+ if(type != (byte) 0xa)
+ throw new OFParseError("Wrong type: Expected=OFType.PACKET_IN(10), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ OFBufferId bufferId = OFBufferId.of(bb.readInt());
+ int totalLen = U16.f(bb.readShort());
+ OFPacketInReason reason = OFPacketInReasonSerializerVer13.readFrom(bb);
+ TableId tableId = TableId.readByte(bb);
+ U64 cookie = U64.ofRaw(bb.readLong());
+ Match match = ChannelUtilsVer13.readOFMatch(bb);
+ // pad: 2 bytes
+ bb.skipBytes(2);
+ byte[] data = ChannelUtils.readBytes(bb, length - (bb.readerIndex() - start));
+
+ OFPacketInVer13 packetInVer13 = new OFPacketInVer13(
+ xid,
+ bufferId,
+ totalLen,
+ reason,
+ tableId,
+ cookie,
+ match,
+ data
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", packetInVer13);
+ return packetInVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFPacketInVer13Funnel FUNNEL = new OFPacketInVer13Funnel();
+ static class OFPacketInVer13Funnel implements Funnel<OFPacketInVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFPacketInVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 10
+ sink.putByte((byte) 0xa);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ message.bufferId.putTo(sink);
+ sink.putInt(message.totalLen);
+ OFPacketInReasonSerializerVer13.putTo(message.reason, sink);
+ message.tableId.putTo(sink);
+ message.cookie.putTo(sink);
+ message.match.putTo(sink);
+ // skip pad (2 bytes)
+ sink.putBytes(message.data);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFPacketInVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFPacketInVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 10
+ bb.writeByte((byte) 0xa);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ bb.writeInt(message.bufferId.getInt());
+ bb.writeShort(U16.t(message.totalLen));
+ OFPacketInReasonSerializerVer13.writeTo(bb, message.reason);
+ message.tableId.writeByte(bb);
+ bb.writeLong(message.cookie.getValue());
+ message.match.writeTo(bb);
+ // pad: 2 bytes
+ bb.writeZero(2);
+ bb.writeBytes(message.data);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFPacketInVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("bufferId=").append(bufferId);
+ b.append(", ");
+ b.append("totalLen=").append(totalLen);
+ b.append(", ");
+ b.append("reason=").append(reason);
+ b.append(", ");
+ b.append("tableId=").append(tableId);
+ b.append(", ");
+ b.append("cookie=").append(cookie);
+ b.append(", ");
+ b.append("match=").append(match);
+ b.append(", ");
+ b.append("data=").append(Arrays.toString(data));
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFPacketInVer13 other = (OFPacketInVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (bufferId == null) {
+ if (other.bufferId != null)
+ return false;
+ } else if (!bufferId.equals(other.bufferId))
+ return false;
+ if( totalLen != other.totalLen)
+ return false;
+ if (reason == null) {
+ if (other.reason != null)
+ return false;
+ } else if (!reason.equals(other.reason))
+ return false;
+ if (tableId == null) {
+ if (other.tableId != null)
+ return false;
+ } else if (!tableId.equals(other.tableId))
+ return false;
+ if (cookie == null) {
+ if (other.cookie != null)
+ return false;
+ } else if (!cookie.equals(other.cookie))
+ return false;
+ if (match == null) {
+ if (other.match != null)
+ return false;
+ } else if (!match.equals(other.match))
+ return false;
+ if (!Arrays.equals(data, other.data))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((bufferId == null) ? 0 : bufferId.hashCode());
+ result = prime * result + totalLen;
+ result = prime * result + ((reason == null) ? 0 : reason.hashCode());
+ result = prime * result + ((tableId == null) ? 0 : tableId.hashCode());
+ result = prime * result + ((cookie == null) ? 0 : cookie.hashCode());
+ result = prime * result + ((match == null) ? 0 : match.hashCode());
+ result = prime * result + Arrays.hashCode(data);
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPacketOutVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPacketOutVer13.java
new file mode 100644
index 0000000..e4876f9
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPacketOutVer13.java
@@ -0,0 +1,504 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+import java.util.Arrays;
+
+class OFPacketOutVer13 implements OFPacketOut {
+ private static final Logger logger = LoggerFactory.getLogger(OFPacketOutVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 24;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static OFBufferId DEFAULT_BUFFER_ID = OFBufferId.NO_BUFFER;
+ private final static OFPort DEFAULT_IN_PORT = OFPort.ANY;
+ private final static List<OFAction> DEFAULT_ACTIONS = ImmutableList.<OFAction>of();
+ private final static byte[] DEFAULT_DATA = new byte[0];
+
+ // OF message fields
+ private final long xid;
+ private final OFBufferId bufferId;
+ private final OFPort inPort;
+ private final List<OFAction> actions;
+ private final byte[] data;
+//
+ // Immutable default instance
+ final static OFPacketOutVer13 DEFAULT = new OFPacketOutVer13(
+ DEFAULT_XID, DEFAULT_BUFFER_ID, DEFAULT_IN_PORT, DEFAULT_ACTIONS, DEFAULT_DATA
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFPacketOutVer13(long xid, OFBufferId bufferId, OFPort inPort, List<OFAction> actions, byte[] data) {
+ this.xid = xid;
+ this.bufferId = bufferId;
+ this.inPort = inPort;
+ this.actions = actions;
+ this.data = data;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.PACKET_OUT;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFBufferId getBufferId() {
+ return bufferId;
+ }
+
+ @Override
+ public OFPort getInPort() {
+ return inPort;
+ }
+
+ @Override
+ public List<OFAction> getActions() {
+ return actions;
+ }
+
+ @Override
+ public byte[] getData() {
+ return data;
+ }
+
+
+
+ public OFPacketOut.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFPacketOut.Builder {
+ final OFPacketOutVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean bufferIdSet;
+ private OFBufferId bufferId;
+ private boolean inPortSet;
+ private OFPort inPort;
+ private boolean actionsSet;
+ private List<OFAction> actions;
+ private boolean dataSet;
+ private byte[] data;
+
+ BuilderWithParent(OFPacketOutVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.PACKET_OUT;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFPacketOut.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFBufferId getBufferId() {
+ return bufferId;
+ }
+
+ @Override
+ public OFPacketOut.Builder setBufferId(OFBufferId bufferId) {
+ this.bufferId = bufferId;
+ this.bufferIdSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getInPort() {
+ return inPort;
+ }
+
+ @Override
+ public OFPacketOut.Builder setInPort(OFPort inPort) {
+ this.inPort = inPort;
+ this.inPortSet = true;
+ return this;
+ }
+ @Override
+ public List<OFAction> getActions() {
+ return actions;
+ }
+
+ @Override
+ public OFPacketOut.Builder setActions(List<OFAction> actions) {
+ this.actions = actions;
+ this.actionsSet = true;
+ return this;
+ }
+ @Override
+ public byte[] getData() {
+ return data;
+ }
+
+ @Override
+ public OFPacketOut.Builder setData(byte[] data) {
+ this.data = data;
+ this.dataSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFPacketOut build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ OFBufferId bufferId = this.bufferIdSet ? this.bufferId : parentMessage.bufferId;
+ if(bufferId == null)
+ throw new NullPointerException("Property bufferId must not be null");
+ OFPort inPort = this.inPortSet ? this.inPort : parentMessage.inPort;
+ if(inPort == null)
+ throw new NullPointerException("Property inPort must not be null");
+ List<OFAction> actions = this.actionsSet ? this.actions : parentMessage.actions;
+ if(actions == null)
+ throw new NullPointerException("Property actions must not be null");
+ byte[] data = this.dataSet ? this.data : parentMessage.data;
+ if(data == null)
+ throw new NullPointerException("Property data must not be null");
+
+ //
+ return new OFPacketOutVer13(
+ xid,
+ bufferId,
+ inPort,
+ actions,
+ data
+ );
+ }
+
+ }
+
+ static class Builder implements OFPacketOut.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean bufferIdSet;
+ private OFBufferId bufferId;
+ private boolean inPortSet;
+ private OFPort inPort;
+ private boolean actionsSet;
+ private List<OFAction> actions;
+ private boolean dataSet;
+ private byte[] data;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.PACKET_OUT;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFPacketOut.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFBufferId getBufferId() {
+ return bufferId;
+ }
+
+ @Override
+ public OFPacketOut.Builder setBufferId(OFBufferId bufferId) {
+ this.bufferId = bufferId;
+ this.bufferIdSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getInPort() {
+ return inPort;
+ }
+
+ @Override
+ public OFPacketOut.Builder setInPort(OFPort inPort) {
+ this.inPort = inPort;
+ this.inPortSet = true;
+ return this;
+ }
+ @Override
+ public List<OFAction> getActions() {
+ return actions;
+ }
+
+ @Override
+ public OFPacketOut.Builder setActions(List<OFAction> actions) {
+ this.actions = actions;
+ this.actionsSet = true;
+ return this;
+ }
+ @Override
+ public byte[] getData() {
+ return data;
+ }
+
+ @Override
+ public OFPacketOut.Builder setData(byte[] data) {
+ this.data = data;
+ this.dataSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFPacketOut build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ OFBufferId bufferId = this.bufferIdSet ? this.bufferId : DEFAULT_BUFFER_ID;
+ if(bufferId == null)
+ throw new NullPointerException("Property bufferId must not be null");
+ OFPort inPort = this.inPortSet ? this.inPort : DEFAULT_IN_PORT;
+ if(inPort == null)
+ throw new NullPointerException("Property inPort must not be null");
+ List<OFAction> actions = this.actionsSet ? this.actions : DEFAULT_ACTIONS;
+ if(actions == null)
+ throw new NullPointerException("Property actions must not be null");
+ byte[] data = this.dataSet ? this.data : DEFAULT_DATA;
+ if(data == null)
+ throw new NullPointerException("Property data must not be null");
+
+
+ return new OFPacketOutVer13(
+ xid,
+ bufferId,
+ inPort,
+ actions,
+ data
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFPacketOut> {
+ @Override
+ public OFPacketOut readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 13
+ byte type = bb.readByte();
+ if(type != (byte) 0xd)
+ throw new OFParseError("Wrong type: Expected=OFType.PACKET_OUT(13), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ OFBufferId bufferId = OFBufferId.of(bb.readInt());
+ OFPort inPort = OFPort.read4Bytes(bb);
+ int actionsLen = U16.f(bb.readShort());
+ // pad: 6 bytes
+ bb.skipBytes(6);
+ List<OFAction> actions = ChannelUtils.readList(bb, actionsLen, OFActionVer13.READER);
+ byte[] data = ChannelUtils.readBytes(bb, length - (bb.readerIndex() - start));
+
+ OFPacketOutVer13 packetOutVer13 = new OFPacketOutVer13(
+ xid,
+ bufferId,
+ inPort,
+ actions,
+ data
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", packetOutVer13);
+ return packetOutVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFPacketOutVer13Funnel FUNNEL = new OFPacketOutVer13Funnel();
+ static class OFPacketOutVer13Funnel implements Funnel<OFPacketOutVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFPacketOutVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 13
+ sink.putByte((byte) 0xd);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ message.bufferId.putTo(sink);
+ message.inPort.putTo(sink);
+ // FIXME: skip funnel of actionsLen
+ // skip pad (6 bytes)
+ FunnelUtils.putList(message.actions, sink);
+ sink.putBytes(message.data);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFPacketOutVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFPacketOutVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 13
+ bb.writeByte((byte) 0xd);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ bb.writeInt(message.bufferId.getInt());
+ message.inPort.write4Bytes(bb);
+ // actionsLen is length indicator for actions, will be
+ // udpated when actions has been written
+ int actionsLenIndex = bb.writerIndex();
+ bb.writeShort(0);
+ // pad: 6 bytes
+ bb.writeZero(6);
+ int actionsStartIndex = bb.writerIndex();
+ ChannelUtils.writeList(bb, message.actions);
+ // update field length member actionsLen
+ int actionsLength = bb.writerIndex() - actionsStartIndex;
+ bb.setShort(actionsLenIndex, actionsLength);
+ bb.writeBytes(message.data);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFPacketOutVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("bufferId=").append(bufferId);
+ b.append(", ");
+ b.append("inPort=").append(inPort);
+ b.append(", ");
+ b.append("actions=").append(actions);
+ b.append(", ");
+ b.append("data=").append(Arrays.toString(data));
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFPacketOutVer13 other = (OFPacketOutVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (bufferId == null) {
+ if (other.bufferId != null)
+ return false;
+ } else if (!bufferId.equals(other.bufferId))
+ return false;
+ if (inPort == null) {
+ if (other.inPort != null)
+ return false;
+ } else if (!inPort.equals(other.inPort))
+ return false;
+ if (actions == null) {
+ if (other.actions != null)
+ return false;
+ } else if (!actions.equals(other.actions))
+ return false;
+ if (!Arrays.equals(data, other.data))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((bufferId == null) ? 0 : bufferId.hashCode());
+ result = prime * result + ((inPort == null) ? 0 : inPort.hashCode());
+ result = prime * result + ((actions == null) ? 0 : actions.hashCode());
+ result = prime * result + Arrays.hashCode(data);
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPacketQueueVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPacketQueueVer13.java
new file mode 100644
index 0000000..bc14042
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPacketQueueVer13.java
@@ -0,0 +1,357 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFPacketQueueVer13 implements OFPacketQueue {
+ private static final Logger logger = LoggerFactory.getLogger(OFPacketQueueVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 16;
+
+ private final static long DEFAULT_QUEUE_ID = 0x0L;
+ private final static OFPort DEFAULT_PORT = OFPort.ANY;
+ private final static List<OFQueueProp> DEFAULT_PROPERTIES = ImmutableList.<OFQueueProp>of();
+
+ // OF message fields
+ private final long queueId;
+ private final OFPort port;
+ private final List<OFQueueProp> properties;
+//
+ // Immutable default instance
+ final static OFPacketQueueVer13 DEFAULT = new OFPacketQueueVer13(
+ DEFAULT_QUEUE_ID, DEFAULT_PORT, DEFAULT_PROPERTIES
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFPacketQueueVer13(long queueId, OFPort port, List<OFQueueProp> properties) {
+ this.queueId = queueId;
+ this.port = port;
+ this.properties = properties;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public long getQueueId() {
+ return queueId;
+ }
+
+ @Override
+ public OFPort getPort() {
+ return port;
+ }
+
+ @Override
+ public List<OFQueueProp> getProperties() {
+ return properties;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFPacketQueue.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFPacketQueue.Builder {
+ final OFPacketQueueVer13 parentMessage;
+
+ // OF message fields
+ private boolean queueIdSet;
+ private long queueId;
+ private boolean portSet;
+ private OFPort port;
+ private boolean propertiesSet;
+ private List<OFQueueProp> properties;
+
+ BuilderWithParent(OFPacketQueueVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public long getQueueId() {
+ return queueId;
+ }
+
+ @Override
+ public OFPacketQueue.Builder setQueueId(long queueId) {
+ this.queueId = queueId;
+ this.queueIdSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getPort() {
+ return port;
+ }
+
+ @Override
+ public OFPacketQueue.Builder setPort(OFPort port) {
+ this.port = port;
+ this.portSet = true;
+ return this;
+ }
+ @Override
+ public List<OFQueueProp> getProperties() {
+ return properties;
+ }
+
+ @Override
+ public OFPacketQueue.Builder setProperties(List<OFQueueProp> properties) {
+ this.properties = properties;
+ this.propertiesSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFPacketQueue build() {
+ long queueId = this.queueIdSet ? this.queueId : parentMessage.queueId;
+ OFPort port = this.portSet ? this.port : parentMessage.port;
+ if(port == null)
+ throw new NullPointerException("Property port must not be null");
+ List<OFQueueProp> properties = this.propertiesSet ? this.properties : parentMessage.properties;
+ if(properties == null)
+ throw new NullPointerException("Property properties must not be null");
+
+ //
+ return new OFPacketQueueVer13(
+ queueId,
+ port,
+ properties
+ );
+ }
+
+ }
+
+ static class Builder implements OFPacketQueue.Builder {
+ // OF message fields
+ private boolean queueIdSet;
+ private long queueId;
+ private boolean portSet;
+ private OFPort port;
+ private boolean propertiesSet;
+ private List<OFQueueProp> properties;
+
+ @Override
+ public long getQueueId() {
+ return queueId;
+ }
+
+ @Override
+ public OFPacketQueue.Builder setQueueId(long queueId) {
+ this.queueId = queueId;
+ this.queueIdSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getPort() {
+ return port;
+ }
+
+ @Override
+ public OFPacketQueue.Builder setPort(OFPort port) {
+ this.port = port;
+ this.portSet = true;
+ return this;
+ }
+ @Override
+ public List<OFQueueProp> getProperties() {
+ return properties;
+ }
+
+ @Override
+ public OFPacketQueue.Builder setProperties(List<OFQueueProp> properties) {
+ this.properties = properties;
+ this.propertiesSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFPacketQueue build() {
+ long queueId = this.queueIdSet ? this.queueId : DEFAULT_QUEUE_ID;
+ OFPort port = this.portSet ? this.port : DEFAULT_PORT;
+ if(port == null)
+ throw new NullPointerException("Property port must not be null");
+ List<OFQueueProp> properties = this.propertiesSet ? this.properties : DEFAULT_PROPERTIES;
+ if(properties == null)
+ throw new NullPointerException("Property properties must not be null");
+
+
+ return new OFPacketQueueVer13(
+ queueId,
+ port,
+ properties
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFPacketQueue> {
+ @Override
+ public OFPacketQueue readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ long queueId = U32.f(bb.readInt());
+ OFPort port = OFPort.read4Bytes(bb);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ // pad: 6 bytes
+ bb.skipBytes(6);
+ List<OFQueueProp> properties = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFQueuePropVer13.READER);
+
+ OFPacketQueueVer13 packetQueueVer13 = new OFPacketQueueVer13(
+ queueId,
+ port,
+ properties
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", packetQueueVer13);
+ return packetQueueVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFPacketQueueVer13Funnel FUNNEL = new OFPacketQueueVer13Funnel();
+ static class OFPacketQueueVer13Funnel implements Funnel<OFPacketQueueVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFPacketQueueVer13 message, PrimitiveSink sink) {
+ sink.putLong(message.queueId);
+ message.port.putTo(sink);
+ // FIXME: skip funnel of length
+ // skip pad (6 bytes)
+ FunnelUtils.putList(message.properties, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFPacketQueueVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFPacketQueueVer13 message) {
+ int startIndex = bb.writerIndex();
+ bb.writeInt(U32.t(message.queueId));
+ message.port.write4Bytes(bb);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ // pad: 6 bytes
+ bb.writeZero(6);
+ ChannelUtils.writeList(bb, message.properties);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFPacketQueueVer13(");
+ b.append("queueId=").append(queueId);
+ b.append(", ");
+ b.append("port=").append(port);
+ b.append(", ");
+ b.append("properties=").append(properties);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFPacketQueueVer13 other = (OFPacketQueueVer13) obj;
+
+ if( queueId != other.queueId)
+ return false;
+ if (port == null) {
+ if (other.port != null)
+ return false;
+ } else if (!port.equals(other.port))
+ return false;
+ if (properties == null) {
+ if (other.properties != null)
+ return false;
+ } else if (!properties.equals(other.properties))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (queueId ^ (queueId >>> 32));
+ result = prime * result + ((port == null) ? 0 : port.hashCode());
+ result = prime * result + ((properties == null) ? 0 : properties.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPortConfigSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPortConfigSerializerVer13.java
new file mode 100644
index 0000000..3d47d7d
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPortConfigSerializerVer13.java
@@ -0,0 +1,102 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_set_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFPortConfig;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import java.util.EnumSet;
+import java.util.Collections;
+
+
+public class OFPortConfigSerializerVer13 {
+
+ public final static int PORT_DOWN_VAL = 0x1;
+ public final static int NO_RECV_VAL = 0x4;
+ public final static int NO_FWD_VAL = 0x20;
+ public final static int NO_PACKET_IN_VAL = 0x40;
+ public final static int BSN_MIRROR_DEST_VAL = (int) 0x80000000;
+
+ public static Set<OFPortConfig> readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readInt());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, Set<OFPortConfig> set) {
+ bb.writeInt(toWireValue(set));
+ }
+
+ public static void putTo(Set<OFPortConfig> set, PrimitiveSink sink) {
+ sink.putInt(toWireValue(set));
+ }
+
+
+ public static Set<OFPortConfig> ofWireValue(int val) {
+ EnumSet<OFPortConfig> set = EnumSet.noneOf(OFPortConfig.class);
+
+ if((val & PORT_DOWN_VAL) != 0)
+ set.add(OFPortConfig.PORT_DOWN);
+ if((val & NO_RECV_VAL) != 0)
+ set.add(OFPortConfig.NO_RECV);
+ if((val & NO_FWD_VAL) != 0)
+ set.add(OFPortConfig.NO_FWD);
+ if((val & NO_PACKET_IN_VAL) != 0)
+ set.add(OFPortConfig.NO_PACKET_IN);
+ if((val & BSN_MIRROR_DEST_VAL) != 0)
+ set.add(OFPortConfig.BSN_MIRROR_DEST);
+ return Collections.unmodifiableSet(set);
+ }
+
+ public static int toWireValue(Set<OFPortConfig> set) {
+ int wireValue = 0;
+
+ for(OFPortConfig e: set) {
+ switch(e) {
+ case PORT_DOWN:
+ wireValue |= PORT_DOWN_VAL;
+ break;
+ case NO_RECV:
+ wireValue |= NO_RECV_VAL;
+ break;
+ case NO_FWD:
+ wireValue |= NO_FWD_VAL;
+ break;
+ case NO_PACKET_IN:
+ wireValue |= NO_PACKET_IN_VAL;
+ break;
+ case BSN_MIRROR_DEST:
+ wireValue |= BSN_MIRROR_DEST_VAL;
+ break;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFPortConfig in version 1.3: " + e);
+ }
+ }
+ return wireValue;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPortDescStatsReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPortDescStatsReplyVer13.java
new file mode 100644
index 0000000..6834465
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPortDescStatsReplyVer13.java
@@ -0,0 +1,412 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFPortDescStatsReplyVer13 implements OFPortDescStatsReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFPortDescStatsReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 16;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsReplyFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsReplyFlags>of();
+ private final static List<OFPortDesc> DEFAULT_ENTRIES = ImmutableList.<OFPortDesc>of();
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsReplyFlags> flags;
+ private final List<OFPortDesc> entries;
+//
+ // Immutable default instance
+ final static OFPortDescStatsReplyVer13 DEFAULT = new OFPortDescStatsReplyVer13(
+ DEFAULT_XID, DEFAULT_FLAGS, DEFAULT_ENTRIES
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFPortDescStatsReplyVer13(long xid, Set<OFStatsReplyFlags> flags, List<OFPortDesc> entries) {
+ this.xid = xid;
+ this.flags = flags;
+ this.entries = entries;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.PORT_DESC;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public List<OFPortDesc> getEntries() {
+ return entries;
+ }
+
+
+
+ public OFPortDescStatsReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFPortDescStatsReply.Builder {
+ final OFPortDescStatsReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean entriesSet;
+ private List<OFPortDesc> entries;
+
+ BuilderWithParent(OFPortDescStatsReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFPortDescStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.PORT_DESC;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFPortDescStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public List<OFPortDesc> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFPortDescStatsReply.Builder setEntries(List<OFPortDesc> entries) {
+ this.entries = entries;
+ this.entriesSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFPortDescStatsReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ List<OFPortDesc> entries = this.entriesSet ? this.entries : parentMessage.entries;
+ if(entries == null)
+ throw new NullPointerException("Property entries must not be null");
+
+ //
+ return new OFPortDescStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ }
+
+ }
+
+ static class Builder implements OFPortDescStatsReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean entriesSet;
+ private List<OFPortDesc> entries;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFPortDescStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.PORT_DESC;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFPortDescStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public List<OFPortDesc> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFPortDescStatsReply.Builder setEntries(List<OFPortDesc> entries) {
+ this.entries = entries;
+ this.entriesSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFPortDescStatsReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ List<OFPortDesc> entries = this.entriesSet ? this.entries : DEFAULT_ENTRIES;
+ if(entries == null)
+ throw new NullPointerException("Property entries must not be null");
+
+
+ return new OFPortDescStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFPortDescStatsReply> {
+ @Override
+ public OFPortDescStatsReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 19
+ byte type = bb.readByte();
+ if(type != (byte) 0x13)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REPLY(19), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 13
+ short statsType = bb.readShort();
+ if(statsType != (short) 0xd)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.PORT_DESC(13), got="+statsType);
+ Set<OFStatsReplyFlags> flags = OFStatsReplyFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ List<OFPortDesc> entries = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFPortDescVer13.READER);
+
+ OFPortDescStatsReplyVer13 portDescStatsReplyVer13 = new OFPortDescStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", portDescStatsReplyVer13);
+ return portDescStatsReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFPortDescStatsReplyVer13Funnel FUNNEL = new OFPortDescStatsReplyVer13Funnel();
+ static class OFPortDescStatsReplyVer13Funnel implements Funnel<OFPortDescStatsReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFPortDescStatsReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 19
+ sink.putByte((byte) 0x13);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property statsType = 13
+ sink.putShort((short) 0xd);
+ OFStatsReplyFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ FunnelUtils.putList(message.entries, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFPortDescStatsReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFPortDescStatsReplyVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 19
+ bb.writeByte((byte) 0x13);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 13
+ bb.writeShort((short) 0xd);
+ OFStatsReplyFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ ChannelUtils.writeList(bb, message.entries);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFPortDescStatsReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("entries=").append(entries);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFPortDescStatsReplyVer13 other = (OFPortDescStatsReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if (entries == null) {
+ if (other.entries != null)
+ return false;
+ } else if (!entries.equals(other.entries))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * result + ((entries == null) ? 0 : entries.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPortDescStatsRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPortDescStatsRequestVer13.java
new file mode 100644
index 0000000..903b98b
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPortDescStatsRequestVer13.java
@@ -0,0 +1,351 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFPortDescStatsRequestVer13 implements OFPortDescStatsRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFPortDescStatsRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 16;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsRequestFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsRequestFlags>of();
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsRequestFlags> flags;
+//
+ // Immutable default instance
+ final static OFPortDescStatsRequestVer13 DEFAULT = new OFPortDescStatsRequestVer13(
+ DEFAULT_XID, DEFAULT_FLAGS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFPortDescStatsRequestVer13(long xid, Set<OFStatsRequestFlags> flags) {
+ this.xid = xid;
+ this.flags = flags;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.PORT_DESC;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+
+
+ public OFPortDescStatsRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFPortDescStatsRequest.Builder {
+ final OFPortDescStatsRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+
+ BuilderWithParent(OFPortDescStatsRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFPortDescStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.PORT_DESC;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFPortDescStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFPortDescStatsRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+
+ //
+ return new OFPortDescStatsRequestVer13(
+ xid,
+ flags
+ );
+ }
+
+ }
+
+ static class Builder implements OFPortDescStatsRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFPortDescStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.PORT_DESC;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFPortDescStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFPortDescStatsRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+
+
+ return new OFPortDescStatsRequestVer13(
+ xid,
+ flags
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFPortDescStatsRequest> {
+ @Override
+ public OFPortDescStatsRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 18
+ byte type = bb.readByte();
+ if(type != (byte) 0x12)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REQUEST(18), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 16)
+ throw new OFParseError("Wrong length: Expected=16(16), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 13
+ short statsType = bb.readShort();
+ if(statsType != (short) 0xd)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.PORT_DESC(13), got="+statsType);
+ Set<OFStatsRequestFlags> flags = OFStatsRequestFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+
+ OFPortDescStatsRequestVer13 portDescStatsRequestVer13 = new OFPortDescStatsRequestVer13(
+ xid,
+ flags
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", portDescStatsRequestVer13);
+ return portDescStatsRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFPortDescStatsRequestVer13Funnel FUNNEL = new OFPortDescStatsRequestVer13Funnel();
+ static class OFPortDescStatsRequestVer13Funnel implements Funnel<OFPortDescStatsRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFPortDescStatsRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 18
+ sink.putByte((byte) 0x12);
+ // fixed value property length = 16
+ sink.putShort((short) 0x10);
+ sink.putLong(message.xid);
+ // fixed value property statsType = 13
+ sink.putShort((short) 0xd);
+ OFStatsRequestFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFPortDescStatsRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFPortDescStatsRequestVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 18
+ bb.writeByte((byte) 0x12);
+ // fixed value property length = 16
+ bb.writeShort((short) 0x10);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 13
+ bb.writeShort((short) 0xd);
+ OFStatsRequestFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFPortDescStatsRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFPortDescStatsRequestVer13 other = (OFPortDescStatsRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPortDescVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPortDescVer13.java
new file mode 100644
index 0000000..ff92652
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPortDescVer13.java
@@ -0,0 +1,766 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFPortDescVer13 implements OFPortDesc {
+ private static final Logger logger = LoggerFactory.getLogger(OFPortDescVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 64;
+
+ private final static OFPort DEFAULT_PORT_NO = OFPort.ANY;
+ private final static MacAddress DEFAULT_HW_ADDR = MacAddress.NONE;
+ private final static String DEFAULT_NAME = "";
+ private final static Set<OFPortConfig> DEFAULT_CONFIG = ImmutableSet.<OFPortConfig>of();
+ private final static Set<OFPortState> DEFAULT_STATE = ImmutableSet.<OFPortState>of();
+ private final static Set<OFPortFeatures> DEFAULT_CURR = ImmutableSet.<OFPortFeatures>of();
+ private final static Set<OFPortFeatures> DEFAULT_ADVERTISED = ImmutableSet.<OFPortFeatures>of();
+ private final static Set<OFPortFeatures> DEFAULT_SUPPORTED = ImmutableSet.<OFPortFeatures>of();
+ private final static Set<OFPortFeatures> DEFAULT_PEER = ImmutableSet.<OFPortFeatures>of();
+ private final static long DEFAULT_CURR_SPEED = 0x0L;
+ private final static long DEFAULT_MAX_SPEED = 0x0L;
+
+ // OF message fields
+ private final OFPort portNo;
+ private final MacAddress hwAddr;
+ private final String name;
+ private final Set<OFPortConfig> config;
+ private final Set<OFPortState> state;
+ private final Set<OFPortFeatures> curr;
+ private final Set<OFPortFeatures> advertised;
+ private final Set<OFPortFeatures> supported;
+ private final Set<OFPortFeatures> peer;
+ private final long currSpeed;
+ private final long maxSpeed;
+//
+ // Immutable default instance
+ final static OFPortDescVer13 DEFAULT = new OFPortDescVer13(
+ DEFAULT_PORT_NO, DEFAULT_HW_ADDR, DEFAULT_NAME, DEFAULT_CONFIG, DEFAULT_STATE, DEFAULT_CURR, DEFAULT_ADVERTISED, DEFAULT_SUPPORTED, DEFAULT_PEER, DEFAULT_CURR_SPEED, DEFAULT_MAX_SPEED
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFPortDescVer13(OFPort portNo, MacAddress hwAddr, String name, Set<OFPortConfig> config, Set<OFPortState> state, Set<OFPortFeatures> curr, Set<OFPortFeatures> advertised, Set<OFPortFeatures> supported, Set<OFPortFeatures> peer, long currSpeed, long maxSpeed) {
+ this.portNo = portNo;
+ this.hwAddr = hwAddr;
+ this.name = name;
+ this.config = config;
+ this.state = state;
+ this.curr = curr;
+ this.advertised = advertised;
+ this.supported = supported;
+ this.peer = peer;
+ this.currSpeed = currSpeed;
+ this.maxSpeed = maxSpeed;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public MacAddress getHwAddr() {
+ return hwAddr;
+ }
+
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ @Override
+ public Set<OFPortConfig> getConfig() {
+ return config;
+ }
+
+ @Override
+ public Set<OFPortState> getState() {
+ return state;
+ }
+
+ @Override
+ public Set<OFPortFeatures> getCurr() {
+ return curr;
+ }
+
+ @Override
+ public Set<OFPortFeatures> getAdvertised() {
+ return advertised;
+ }
+
+ @Override
+ public Set<OFPortFeatures> getSupported() {
+ return supported;
+ }
+
+ @Override
+ public Set<OFPortFeatures> getPeer() {
+ return peer;
+ }
+
+ @Override
+ public long getCurrSpeed() {
+ return currSpeed;
+ }
+
+ @Override
+ public long getMaxSpeed() {
+ return maxSpeed;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFPortDesc.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFPortDesc.Builder {
+ final OFPortDescVer13 parentMessage;
+
+ // OF message fields
+ private boolean portNoSet;
+ private OFPort portNo;
+ private boolean hwAddrSet;
+ private MacAddress hwAddr;
+ private boolean nameSet;
+ private String name;
+ private boolean configSet;
+ private Set<OFPortConfig> config;
+ private boolean stateSet;
+ private Set<OFPortState> state;
+ private boolean currSet;
+ private Set<OFPortFeatures> curr;
+ private boolean advertisedSet;
+ private Set<OFPortFeatures> advertised;
+ private boolean supportedSet;
+ private Set<OFPortFeatures> supported;
+ private boolean peerSet;
+ private Set<OFPortFeatures> peer;
+ private boolean currSpeedSet;
+ private long currSpeed;
+ private boolean maxSpeedSet;
+ private long maxSpeed;
+
+ BuilderWithParent(OFPortDescVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public OFPortDesc.Builder setPortNo(OFPort portNo) {
+ this.portNo = portNo;
+ this.portNoSet = true;
+ return this;
+ }
+ @Override
+ public MacAddress getHwAddr() {
+ return hwAddr;
+ }
+
+ @Override
+ public OFPortDesc.Builder setHwAddr(MacAddress hwAddr) {
+ this.hwAddr = hwAddr;
+ this.hwAddrSet = true;
+ return this;
+ }
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ @Override
+ public OFPortDesc.Builder setName(String name) {
+ this.name = name;
+ this.nameSet = true;
+ return this;
+ }
+ @Override
+ public Set<OFPortConfig> getConfig() {
+ return config;
+ }
+
+ @Override
+ public OFPortDesc.Builder setConfig(Set<OFPortConfig> config) {
+ this.config = config;
+ this.configSet = true;
+ return this;
+ }
+ @Override
+ public Set<OFPortState> getState() {
+ return state;
+ }
+
+ @Override
+ public OFPortDesc.Builder setState(Set<OFPortState> state) {
+ this.state = state;
+ this.stateSet = true;
+ return this;
+ }
+ @Override
+ public Set<OFPortFeatures> getCurr() {
+ return curr;
+ }
+
+ @Override
+ public OFPortDesc.Builder setCurr(Set<OFPortFeatures> curr) {
+ this.curr = curr;
+ this.currSet = true;
+ return this;
+ }
+ @Override
+ public Set<OFPortFeatures> getAdvertised() {
+ return advertised;
+ }
+
+ @Override
+ public OFPortDesc.Builder setAdvertised(Set<OFPortFeatures> advertised) {
+ this.advertised = advertised;
+ this.advertisedSet = true;
+ return this;
+ }
+ @Override
+ public Set<OFPortFeatures> getSupported() {
+ return supported;
+ }
+
+ @Override
+ public OFPortDesc.Builder setSupported(Set<OFPortFeatures> supported) {
+ this.supported = supported;
+ this.supportedSet = true;
+ return this;
+ }
+ @Override
+ public Set<OFPortFeatures> getPeer() {
+ return peer;
+ }
+
+ @Override
+ public OFPortDesc.Builder setPeer(Set<OFPortFeatures> peer) {
+ this.peer = peer;
+ this.peerSet = true;
+ return this;
+ }
+ @Override
+ public long getCurrSpeed() {
+ return currSpeed;
+ }
+
+ @Override
+ public OFPortDesc.Builder setCurrSpeed(long currSpeed) {
+ this.currSpeed = currSpeed;
+ this.currSpeedSet = true;
+ return this;
+ }
+ @Override
+ public long getMaxSpeed() {
+ return maxSpeed;
+ }
+
+ @Override
+ public OFPortDesc.Builder setMaxSpeed(long maxSpeed) {
+ this.maxSpeed = maxSpeed;
+ this.maxSpeedSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFPortDesc build() {
+ OFPort portNo = this.portNoSet ? this.portNo : parentMessage.portNo;
+ if(portNo == null)
+ throw new NullPointerException("Property portNo must not be null");
+ MacAddress hwAddr = this.hwAddrSet ? this.hwAddr : parentMessage.hwAddr;
+ if(hwAddr == null)
+ throw new NullPointerException("Property hwAddr must not be null");
+ String name = this.nameSet ? this.name : parentMessage.name;
+ if(name == null)
+ throw new NullPointerException("Property name must not be null");
+ Set<OFPortConfig> config = this.configSet ? this.config : parentMessage.config;
+ if(config == null)
+ throw new NullPointerException("Property config must not be null");
+ Set<OFPortState> state = this.stateSet ? this.state : parentMessage.state;
+ if(state == null)
+ throw new NullPointerException("Property state must not be null");
+ Set<OFPortFeatures> curr = this.currSet ? this.curr : parentMessage.curr;
+ if(curr == null)
+ throw new NullPointerException("Property curr must not be null");
+ Set<OFPortFeatures> advertised = this.advertisedSet ? this.advertised : parentMessage.advertised;
+ if(advertised == null)
+ throw new NullPointerException("Property advertised must not be null");
+ Set<OFPortFeatures> supported = this.supportedSet ? this.supported : parentMessage.supported;
+ if(supported == null)
+ throw new NullPointerException("Property supported must not be null");
+ Set<OFPortFeatures> peer = this.peerSet ? this.peer : parentMessage.peer;
+ if(peer == null)
+ throw new NullPointerException("Property peer must not be null");
+ long currSpeed = this.currSpeedSet ? this.currSpeed : parentMessage.currSpeed;
+ long maxSpeed = this.maxSpeedSet ? this.maxSpeed : parentMessage.maxSpeed;
+
+ //
+ return new OFPortDescVer13(
+ portNo,
+ hwAddr,
+ name,
+ config,
+ state,
+ curr,
+ advertised,
+ supported,
+ peer,
+ currSpeed,
+ maxSpeed
+ );
+ }
+
+ }
+
+ static class Builder implements OFPortDesc.Builder {
+ // OF message fields
+ private boolean portNoSet;
+ private OFPort portNo;
+ private boolean hwAddrSet;
+ private MacAddress hwAddr;
+ private boolean nameSet;
+ private String name;
+ private boolean configSet;
+ private Set<OFPortConfig> config;
+ private boolean stateSet;
+ private Set<OFPortState> state;
+ private boolean currSet;
+ private Set<OFPortFeatures> curr;
+ private boolean advertisedSet;
+ private Set<OFPortFeatures> advertised;
+ private boolean supportedSet;
+ private Set<OFPortFeatures> supported;
+ private boolean peerSet;
+ private Set<OFPortFeatures> peer;
+ private boolean currSpeedSet;
+ private long currSpeed;
+ private boolean maxSpeedSet;
+ private long maxSpeed;
+
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public OFPortDesc.Builder setPortNo(OFPort portNo) {
+ this.portNo = portNo;
+ this.portNoSet = true;
+ return this;
+ }
+ @Override
+ public MacAddress getHwAddr() {
+ return hwAddr;
+ }
+
+ @Override
+ public OFPortDesc.Builder setHwAddr(MacAddress hwAddr) {
+ this.hwAddr = hwAddr;
+ this.hwAddrSet = true;
+ return this;
+ }
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ @Override
+ public OFPortDesc.Builder setName(String name) {
+ this.name = name;
+ this.nameSet = true;
+ return this;
+ }
+ @Override
+ public Set<OFPortConfig> getConfig() {
+ return config;
+ }
+
+ @Override
+ public OFPortDesc.Builder setConfig(Set<OFPortConfig> config) {
+ this.config = config;
+ this.configSet = true;
+ return this;
+ }
+ @Override
+ public Set<OFPortState> getState() {
+ return state;
+ }
+
+ @Override
+ public OFPortDesc.Builder setState(Set<OFPortState> state) {
+ this.state = state;
+ this.stateSet = true;
+ return this;
+ }
+ @Override
+ public Set<OFPortFeatures> getCurr() {
+ return curr;
+ }
+
+ @Override
+ public OFPortDesc.Builder setCurr(Set<OFPortFeatures> curr) {
+ this.curr = curr;
+ this.currSet = true;
+ return this;
+ }
+ @Override
+ public Set<OFPortFeatures> getAdvertised() {
+ return advertised;
+ }
+
+ @Override
+ public OFPortDesc.Builder setAdvertised(Set<OFPortFeatures> advertised) {
+ this.advertised = advertised;
+ this.advertisedSet = true;
+ return this;
+ }
+ @Override
+ public Set<OFPortFeatures> getSupported() {
+ return supported;
+ }
+
+ @Override
+ public OFPortDesc.Builder setSupported(Set<OFPortFeatures> supported) {
+ this.supported = supported;
+ this.supportedSet = true;
+ return this;
+ }
+ @Override
+ public Set<OFPortFeatures> getPeer() {
+ return peer;
+ }
+
+ @Override
+ public OFPortDesc.Builder setPeer(Set<OFPortFeatures> peer) {
+ this.peer = peer;
+ this.peerSet = true;
+ return this;
+ }
+ @Override
+ public long getCurrSpeed() {
+ return currSpeed;
+ }
+
+ @Override
+ public OFPortDesc.Builder setCurrSpeed(long currSpeed) {
+ this.currSpeed = currSpeed;
+ this.currSpeedSet = true;
+ return this;
+ }
+ @Override
+ public long getMaxSpeed() {
+ return maxSpeed;
+ }
+
+ @Override
+ public OFPortDesc.Builder setMaxSpeed(long maxSpeed) {
+ this.maxSpeed = maxSpeed;
+ this.maxSpeedSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFPortDesc build() {
+ OFPort portNo = this.portNoSet ? this.portNo : DEFAULT_PORT_NO;
+ if(portNo == null)
+ throw new NullPointerException("Property portNo must not be null");
+ MacAddress hwAddr = this.hwAddrSet ? this.hwAddr : DEFAULT_HW_ADDR;
+ if(hwAddr == null)
+ throw new NullPointerException("Property hwAddr must not be null");
+ String name = this.nameSet ? this.name : DEFAULT_NAME;
+ if(name == null)
+ throw new NullPointerException("Property name must not be null");
+ Set<OFPortConfig> config = this.configSet ? this.config : DEFAULT_CONFIG;
+ if(config == null)
+ throw new NullPointerException("Property config must not be null");
+ Set<OFPortState> state = this.stateSet ? this.state : DEFAULT_STATE;
+ if(state == null)
+ throw new NullPointerException("Property state must not be null");
+ Set<OFPortFeatures> curr = this.currSet ? this.curr : DEFAULT_CURR;
+ if(curr == null)
+ throw new NullPointerException("Property curr must not be null");
+ Set<OFPortFeatures> advertised = this.advertisedSet ? this.advertised : DEFAULT_ADVERTISED;
+ if(advertised == null)
+ throw new NullPointerException("Property advertised must not be null");
+ Set<OFPortFeatures> supported = this.supportedSet ? this.supported : DEFAULT_SUPPORTED;
+ if(supported == null)
+ throw new NullPointerException("Property supported must not be null");
+ Set<OFPortFeatures> peer = this.peerSet ? this.peer : DEFAULT_PEER;
+ if(peer == null)
+ throw new NullPointerException("Property peer must not be null");
+ long currSpeed = this.currSpeedSet ? this.currSpeed : DEFAULT_CURR_SPEED;
+ long maxSpeed = this.maxSpeedSet ? this.maxSpeed : DEFAULT_MAX_SPEED;
+
+
+ return new OFPortDescVer13(
+ portNo,
+ hwAddr,
+ name,
+ config,
+ state,
+ curr,
+ advertised,
+ supported,
+ peer,
+ currSpeed,
+ maxSpeed
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFPortDesc> {
+ @Override
+ public OFPortDesc readFrom(ChannelBuffer bb) throws OFParseError {
+ OFPort portNo = OFPort.read4Bytes(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ MacAddress hwAddr = MacAddress.read6Bytes(bb);
+ // pad: 2 bytes
+ bb.skipBytes(2);
+ String name = ChannelUtils.readFixedLengthString(bb, 16);
+ Set<OFPortConfig> config = OFPortConfigSerializerVer13.readFrom(bb);
+ Set<OFPortState> state = OFPortStateSerializerVer13.readFrom(bb);
+ Set<OFPortFeatures> curr = OFPortFeaturesSerializerVer13.readFrom(bb);
+ Set<OFPortFeatures> advertised = OFPortFeaturesSerializerVer13.readFrom(bb);
+ Set<OFPortFeatures> supported = OFPortFeaturesSerializerVer13.readFrom(bb);
+ Set<OFPortFeatures> peer = OFPortFeaturesSerializerVer13.readFrom(bb);
+ long currSpeed = U32.f(bb.readInt());
+ long maxSpeed = U32.f(bb.readInt());
+
+ OFPortDescVer13 portDescVer13 = new OFPortDescVer13(
+ portNo,
+ hwAddr,
+ name,
+ config,
+ state,
+ curr,
+ advertised,
+ supported,
+ peer,
+ currSpeed,
+ maxSpeed
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", portDescVer13);
+ return portDescVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFPortDescVer13Funnel FUNNEL = new OFPortDescVer13Funnel();
+ static class OFPortDescVer13Funnel implements Funnel<OFPortDescVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFPortDescVer13 message, PrimitiveSink sink) {
+ message.portNo.putTo(sink);
+ // skip pad (4 bytes)
+ message.hwAddr.putTo(sink);
+ // skip pad (2 bytes)
+ sink.putUnencodedChars(message.name);
+ OFPortConfigSerializerVer13.putTo(message.config, sink);
+ OFPortStateSerializerVer13.putTo(message.state, sink);
+ OFPortFeaturesSerializerVer13.putTo(message.curr, sink);
+ OFPortFeaturesSerializerVer13.putTo(message.advertised, sink);
+ OFPortFeaturesSerializerVer13.putTo(message.supported, sink);
+ OFPortFeaturesSerializerVer13.putTo(message.peer, sink);
+ sink.putLong(message.currSpeed);
+ sink.putLong(message.maxSpeed);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFPortDescVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFPortDescVer13 message) {
+ message.portNo.write4Bytes(bb);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ message.hwAddr.write6Bytes(bb);
+ // pad: 2 bytes
+ bb.writeZero(2);
+ ChannelUtils.writeFixedLengthString(bb, message.name, 16);
+ OFPortConfigSerializerVer13.writeTo(bb, message.config);
+ OFPortStateSerializerVer13.writeTo(bb, message.state);
+ OFPortFeaturesSerializerVer13.writeTo(bb, message.curr);
+ OFPortFeaturesSerializerVer13.writeTo(bb, message.advertised);
+ OFPortFeaturesSerializerVer13.writeTo(bb, message.supported);
+ OFPortFeaturesSerializerVer13.writeTo(bb, message.peer);
+ bb.writeInt(U32.t(message.currSpeed));
+ bb.writeInt(U32.t(message.maxSpeed));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFPortDescVer13(");
+ b.append("portNo=").append(portNo);
+ b.append(", ");
+ b.append("hwAddr=").append(hwAddr);
+ b.append(", ");
+ b.append("name=").append(name);
+ b.append(", ");
+ b.append("config=").append(config);
+ b.append(", ");
+ b.append("state=").append(state);
+ b.append(", ");
+ b.append("curr=").append(curr);
+ b.append(", ");
+ b.append("advertised=").append(advertised);
+ b.append(", ");
+ b.append("supported=").append(supported);
+ b.append(", ");
+ b.append("peer=").append(peer);
+ b.append(", ");
+ b.append("currSpeed=").append(currSpeed);
+ b.append(", ");
+ b.append("maxSpeed=").append(maxSpeed);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFPortDescVer13 other = (OFPortDescVer13) obj;
+
+ if (portNo == null) {
+ if (other.portNo != null)
+ return false;
+ } else if (!portNo.equals(other.portNo))
+ return false;
+ if (hwAddr == null) {
+ if (other.hwAddr != null)
+ return false;
+ } else if (!hwAddr.equals(other.hwAddr))
+ return false;
+ if (name == null) {
+ if (other.name != null)
+ return false;
+ } else if (!name.equals(other.name))
+ return false;
+ if (config == null) {
+ if (other.config != null)
+ return false;
+ } else if (!config.equals(other.config))
+ return false;
+ if (state == null) {
+ if (other.state != null)
+ return false;
+ } else if (!state.equals(other.state))
+ return false;
+ if (curr == null) {
+ if (other.curr != null)
+ return false;
+ } else if (!curr.equals(other.curr))
+ return false;
+ if (advertised == null) {
+ if (other.advertised != null)
+ return false;
+ } else if (!advertised.equals(other.advertised))
+ return false;
+ if (supported == null) {
+ if (other.supported != null)
+ return false;
+ } else if (!supported.equals(other.supported))
+ return false;
+ if (peer == null) {
+ if (other.peer != null)
+ return false;
+ } else if (!peer.equals(other.peer))
+ return false;
+ if( currSpeed != other.currSpeed)
+ return false;
+ if( maxSpeed != other.maxSpeed)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((portNo == null) ? 0 : portNo.hashCode());
+ result = prime * result + ((hwAddr == null) ? 0 : hwAddr.hashCode());
+ result = prime * result + ((name == null) ? 0 : name.hashCode());
+ result = prime * result + ((config == null) ? 0 : config.hashCode());
+ result = prime * result + ((state == null) ? 0 : state.hashCode());
+ result = prime * result + ((curr == null) ? 0 : curr.hashCode());
+ result = prime * result + ((advertised == null) ? 0 : advertised.hashCode());
+ result = prime * result + ((supported == null) ? 0 : supported.hashCode());
+ result = prime * result + ((peer == null) ? 0 : peer.hashCode());
+ result = prime * (int) (currSpeed ^ (currSpeed >>> 32));
+ result = prime * (int) (maxSpeed ^ (maxSpeed >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPortFeaturesSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPortFeaturesSerializerVer13.java
new file mode 100644
index 0000000..58d4204
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPortFeaturesSerializerVer13.java
@@ -0,0 +1,168 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_set_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFPortFeatures;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import java.util.EnumSet;
+import java.util.Collections;
+
+
+public class OFPortFeaturesSerializerVer13 {
+
+ public final static int PF_10MB_HD_VAL = 0x1;
+ public final static int PF_10MB_FD_VAL = 0x2;
+ public final static int PF_100MB_HD_VAL = 0x4;
+ public final static int PF_100MB_FD_VAL = 0x8;
+ public final static int PF_1GB_HD_VAL = 0x10;
+ public final static int PF_1GB_FD_VAL = 0x20;
+ public final static int PF_10GB_FD_VAL = 0x40;
+ public final static int PF_COPPER_VAL = 0x800;
+ public final static int PF_FIBER_VAL = 0x1000;
+ public final static int PF_AUTONEG_VAL = 0x2000;
+ public final static int PF_PAUSE_VAL = 0x4000;
+ public final static int PF_PAUSE_ASYM_VAL = 0x8000;
+ public final static int PF_40GB_FD_VAL = 0x80;
+ public final static int PF_100GB_FD_VAL = 0x100;
+ public final static int PF_1TB_FD_VAL = 0x200;
+ public final static int PF_OTHER_VAL = 0x400;
+
+ public static Set<OFPortFeatures> readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readInt());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, Set<OFPortFeatures> set) {
+ bb.writeInt(toWireValue(set));
+ }
+
+ public static void putTo(Set<OFPortFeatures> set, PrimitiveSink sink) {
+ sink.putInt(toWireValue(set));
+ }
+
+
+ public static Set<OFPortFeatures> ofWireValue(int val) {
+ EnumSet<OFPortFeatures> set = EnumSet.noneOf(OFPortFeatures.class);
+
+ if((val & PF_10MB_HD_VAL) != 0)
+ set.add(OFPortFeatures.PF_10MB_HD);
+ if((val & PF_10MB_FD_VAL) != 0)
+ set.add(OFPortFeatures.PF_10MB_FD);
+ if((val & PF_100MB_HD_VAL) != 0)
+ set.add(OFPortFeatures.PF_100MB_HD);
+ if((val & PF_100MB_FD_VAL) != 0)
+ set.add(OFPortFeatures.PF_100MB_FD);
+ if((val & PF_1GB_HD_VAL) != 0)
+ set.add(OFPortFeatures.PF_1GB_HD);
+ if((val & PF_1GB_FD_VAL) != 0)
+ set.add(OFPortFeatures.PF_1GB_FD);
+ if((val & PF_10GB_FD_VAL) != 0)
+ set.add(OFPortFeatures.PF_10GB_FD);
+ if((val & PF_COPPER_VAL) != 0)
+ set.add(OFPortFeatures.PF_COPPER);
+ if((val & PF_FIBER_VAL) != 0)
+ set.add(OFPortFeatures.PF_FIBER);
+ if((val & PF_AUTONEG_VAL) != 0)
+ set.add(OFPortFeatures.PF_AUTONEG);
+ if((val & PF_PAUSE_VAL) != 0)
+ set.add(OFPortFeatures.PF_PAUSE);
+ if((val & PF_PAUSE_ASYM_VAL) != 0)
+ set.add(OFPortFeatures.PF_PAUSE_ASYM);
+ if((val & PF_40GB_FD_VAL) != 0)
+ set.add(OFPortFeatures.PF_40GB_FD);
+ if((val & PF_100GB_FD_VAL) != 0)
+ set.add(OFPortFeatures.PF_100GB_FD);
+ if((val & PF_1TB_FD_VAL) != 0)
+ set.add(OFPortFeatures.PF_1TB_FD);
+ if((val & PF_OTHER_VAL) != 0)
+ set.add(OFPortFeatures.PF_OTHER);
+ return Collections.unmodifiableSet(set);
+ }
+
+ public static int toWireValue(Set<OFPortFeatures> set) {
+ int wireValue = 0;
+
+ for(OFPortFeatures e: set) {
+ switch(e) {
+ case PF_10MB_HD:
+ wireValue |= PF_10MB_HD_VAL;
+ break;
+ case PF_10MB_FD:
+ wireValue |= PF_10MB_FD_VAL;
+ break;
+ case PF_100MB_HD:
+ wireValue |= PF_100MB_HD_VAL;
+ break;
+ case PF_100MB_FD:
+ wireValue |= PF_100MB_FD_VAL;
+ break;
+ case PF_1GB_HD:
+ wireValue |= PF_1GB_HD_VAL;
+ break;
+ case PF_1GB_FD:
+ wireValue |= PF_1GB_FD_VAL;
+ break;
+ case PF_10GB_FD:
+ wireValue |= PF_10GB_FD_VAL;
+ break;
+ case PF_COPPER:
+ wireValue |= PF_COPPER_VAL;
+ break;
+ case PF_FIBER:
+ wireValue |= PF_FIBER_VAL;
+ break;
+ case PF_AUTONEG:
+ wireValue |= PF_AUTONEG_VAL;
+ break;
+ case PF_PAUSE:
+ wireValue |= PF_PAUSE_VAL;
+ break;
+ case PF_PAUSE_ASYM:
+ wireValue |= PF_PAUSE_ASYM_VAL;
+ break;
+ case PF_40GB_FD:
+ wireValue |= PF_40GB_FD_VAL;
+ break;
+ case PF_100GB_FD:
+ wireValue |= PF_100GB_FD_VAL;
+ break;
+ case PF_1TB_FD:
+ wireValue |= PF_1TB_FD_VAL;
+ break;
+ case PF_OTHER:
+ wireValue |= PF_OTHER_VAL;
+ break;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFPortFeatures in version 1.3: " + e);
+ }
+ }
+ return wireValue;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPortModFailedCodeSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPortModFailedCodeSerializerVer13.java
new file mode 100644
index 0000000..75e4b79
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPortModFailedCodeSerializerVer13.java
@@ -0,0 +1,89 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFPortModFailedCode;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+
+public class OFPortModFailedCodeSerializerVer13 {
+
+ public final static short BAD_PORT_VAL = (short) 0x0;
+ public final static short BAD_HW_ADDR_VAL = (short) 0x1;
+ public final static short BAD_CONFIG_VAL = (short) 0x2;
+ public final static short BAD_ADVERTISE_VAL = (short) 0x3;
+ public final static short EPERM_VAL = (short) 0x4;
+
+ public static OFPortModFailedCode readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readShort());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, OFPortModFailedCode e) {
+ bb.writeShort(toWireValue(e));
+ }
+
+ public static void putTo(OFPortModFailedCode e, PrimitiveSink sink) {
+ sink.putShort(toWireValue(e));
+ }
+
+ public static OFPortModFailedCode ofWireValue(short val) {
+ switch(val) {
+ case BAD_PORT_VAL:
+ return OFPortModFailedCode.BAD_PORT;
+ case BAD_HW_ADDR_VAL:
+ return OFPortModFailedCode.BAD_HW_ADDR;
+ case BAD_CONFIG_VAL:
+ return OFPortModFailedCode.BAD_CONFIG;
+ case BAD_ADVERTISE_VAL:
+ return OFPortModFailedCode.BAD_ADVERTISE;
+ case EPERM_VAL:
+ return OFPortModFailedCode.EPERM;
+ default:
+ throw new IllegalArgumentException("Illegal wire value for type OFPortModFailedCode in version 1.3: " + val);
+ }
+ }
+
+
+ public static short toWireValue(OFPortModFailedCode e) {
+ switch(e) {
+ case BAD_PORT:
+ return BAD_PORT_VAL;
+ case BAD_HW_ADDR:
+ return BAD_HW_ADDR_VAL;
+ case BAD_CONFIG:
+ return BAD_CONFIG_VAL;
+ case BAD_ADVERTISE:
+ return BAD_ADVERTISE_VAL;
+ case EPERM:
+ return EPERM_VAL;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFPortModFailedCode in version 1.3: " + e);
+ }
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPortModFailedErrorMsgVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPortModFailedErrorMsgVer13.java
new file mode 100644
index 0000000..83a7169
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPortModFailedErrorMsgVer13.java
@@ -0,0 +1,400 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFPortModFailedErrorMsgVer13 implements OFPortModFailedErrorMsg {
+ private static final Logger logger = LoggerFactory.getLogger(OFPortModFailedErrorMsgVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 12;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static OFErrorCauseData DEFAULT_DATA = OFErrorCauseData.NONE;
+
+ // OF message fields
+ private final long xid;
+ private final OFPortModFailedCode code;
+ private final OFErrorCauseData data;
+//
+
+ // package private constructor - used by readers, builders, and factory
+ OFPortModFailedErrorMsgVer13(long xid, OFPortModFailedCode code, OFErrorCauseData data) {
+ this.xid = xid;
+ this.code = code;
+ this.data = data;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ERROR;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFErrorType getErrType() {
+ return OFErrorType.PORT_MOD_FAILED;
+ }
+
+ @Override
+ public OFPortModFailedCode getCode() {
+ return code;
+ }
+
+ @Override
+ public OFErrorCauseData getData() {
+ return data;
+ }
+
+
+
+ public OFPortModFailedErrorMsg.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFPortModFailedErrorMsg.Builder {
+ final OFPortModFailedErrorMsgVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean codeSet;
+ private OFPortModFailedCode code;
+ private boolean dataSet;
+ private OFErrorCauseData data;
+
+ BuilderWithParent(OFPortModFailedErrorMsgVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ERROR;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFPortModFailedErrorMsg.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorType getErrType() {
+ return OFErrorType.PORT_MOD_FAILED;
+ }
+
+ @Override
+ public OFPortModFailedCode getCode() {
+ return code;
+ }
+
+ @Override
+ public OFPortModFailedErrorMsg.Builder setCode(OFPortModFailedCode code) {
+ this.code = code;
+ this.codeSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorCauseData getData() {
+ return data;
+ }
+
+ @Override
+ public OFPortModFailedErrorMsg.Builder setData(OFErrorCauseData data) {
+ this.data = data;
+ this.dataSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFPortModFailedErrorMsg build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ OFPortModFailedCode code = this.codeSet ? this.code : parentMessage.code;
+ if(code == null)
+ throw new NullPointerException("Property code must not be null");
+ OFErrorCauseData data = this.dataSet ? this.data : parentMessage.data;
+ if(data == null)
+ throw new NullPointerException("Property data must not be null");
+
+ //
+ return new OFPortModFailedErrorMsgVer13(
+ xid,
+ code,
+ data
+ );
+ }
+
+ }
+
+ static class Builder implements OFPortModFailedErrorMsg.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean codeSet;
+ private OFPortModFailedCode code;
+ private boolean dataSet;
+ private OFErrorCauseData data;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ERROR;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFPortModFailedErrorMsg.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorType getErrType() {
+ return OFErrorType.PORT_MOD_FAILED;
+ }
+
+ @Override
+ public OFPortModFailedCode getCode() {
+ return code;
+ }
+
+ @Override
+ public OFPortModFailedErrorMsg.Builder setCode(OFPortModFailedCode code) {
+ this.code = code;
+ this.codeSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorCauseData getData() {
+ return data;
+ }
+
+ @Override
+ public OFPortModFailedErrorMsg.Builder setData(OFErrorCauseData data) {
+ this.data = data;
+ this.dataSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFPortModFailedErrorMsg build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ if(!this.codeSet)
+ throw new IllegalStateException("Property code doesn't have default value -- must be set");
+ if(code == null)
+ throw new NullPointerException("Property code must not be null");
+ OFErrorCauseData data = this.dataSet ? this.data : DEFAULT_DATA;
+ if(data == null)
+ throw new NullPointerException("Property data must not be null");
+
+
+ return new OFPortModFailedErrorMsgVer13(
+ xid,
+ code,
+ data
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFPortModFailedErrorMsg> {
+ @Override
+ public OFPortModFailedErrorMsg readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 1
+ byte type = bb.readByte();
+ if(type != (byte) 0x1)
+ throw new OFParseError("Wrong type: Expected=OFType.ERROR(1), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property errType == 7
+ short errType = bb.readShort();
+ if(errType != (short) 0x7)
+ throw new OFParseError("Wrong errType: Expected=OFErrorType.PORT_MOD_FAILED(7), got="+errType);
+ OFPortModFailedCode code = OFPortModFailedCodeSerializerVer13.readFrom(bb);
+ OFErrorCauseData data = OFErrorCauseData.read(bb, length - (bb.readerIndex() - start), OFVersion.OF_13);
+
+ OFPortModFailedErrorMsgVer13 portModFailedErrorMsgVer13 = new OFPortModFailedErrorMsgVer13(
+ xid,
+ code,
+ data
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", portModFailedErrorMsgVer13);
+ return portModFailedErrorMsgVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFPortModFailedErrorMsgVer13Funnel FUNNEL = new OFPortModFailedErrorMsgVer13Funnel();
+ static class OFPortModFailedErrorMsgVer13Funnel implements Funnel<OFPortModFailedErrorMsgVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFPortModFailedErrorMsgVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 1
+ sink.putByte((byte) 0x1);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property errType = 7
+ sink.putShort((short) 0x7);
+ OFPortModFailedCodeSerializerVer13.putTo(message.code, sink);
+ message.data.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFPortModFailedErrorMsgVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFPortModFailedErrorMsgVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 1
+ bb.writeByte((byte) 0x1);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property errType = 7
+ bb.writeShort((short) 0x7);
+ OFPortModFailedCodeSerializerVer13.writeTo(bb, message.code);
+ message.data.writeTo(bb);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFPortModFailedErrorMsgVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("code=").append(code);
+ b.append(", ");
+ b.append("data=").append(data);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFPortModFailedErrorMsgVer13 other = (OFPortModFailedErrorMsgVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (code == null) {
+ if (other.code != null)
+ return false;
+ } else if (!code.equals(other.code))
+ return false;
+ if (data == null) {
+ if (other.data != null)
+ return false;
+ } else if (!data.equals(other.data))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((code == null) ? 0 : code.hashCode());
+ result = prime * result + ((data == null) ? 0 : data.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPortModVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPortModVer13.java
new file mode 100644
index 0000000..e72ffb7
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPortModVer13.java
@@ -0,0 +1,532 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFPortModVer13 implements OFPortMod {
+ private static final Logger logger = LoggerFactory.getLogger(OFPortModVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 40;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static OFPort DEFAULT_PORT_NO = OFPort.ANY;
+ private final static MacAddress DEFAULT_HW_ADDR = MacAddress.NONE;
+ private final static long DEFAULT_CONFIG = 0x0L;
+ private final static long DEFAULT_MASK = 0x0L;
+ private final static long DEFAULT_ADVERTISE = 0x0L;
+
+ // OF message fields
+ private final long xid;
+ private final OFPort portNo;
+ private final MacAddress hwAddr;
+ private final long config;
+ private final long mask;
+ private final long advertise;
+//
+ // Immutable default instance
+ final static OFPortModVer13 DEFAULT = new OFPortModVer13(
+ DEFAULT_XID, DEFAULT_PORT_NO, DEFAULT_HW_ADDR, DEFAULT_CONFIG, DEFAULT_MASK, DEFAULT_ADVERTISE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFPortModVer13(long xid, OFPort portNo, MacAddress hwAddr, long config, long mask, long advertise) {
+ this.xid = xid;
+ this.portNo = portNo;
+ this.hwAddr = hwAddr;
+ this.config = config;
+ this.mask = mask;
+ this.advertise = advertise;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.PORT_MOD;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public MacAddress getHwAddr() {
+ return hwAddr;
+ }
+
+ @Override
+ public long getConfig() {
+ return config;
+ }
+
+ @Override
+ public long getMask() {
+ return mask;
+ }
+
+ @Override
+ public long getAdvertise() {
+ return advertise;
+ }
+
+
+
+ public OFPortMod.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFPortMod.Builder {
+ final OFPortModVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean portNoSet;
+ private OFPort portNo;
+ private boolean hwAddrSet;
+ private MacAddress hwAddr;
+ private boolean configSet;
+ private long config;
+ private boolean maskSet;
+ private long mask;
+ private boolean advertiseSet;
+ private long advertise;
+
+ BuilderWithParent(OFPortModVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.PORT_MOD;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFPortMod.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public OFPortMod.Builder setPortNo(OFPort portNo) {
+ this.portNo = portNo;
+ this.portNoSet = true;
+ return this;
+ }
+ @Override
+ public MacAddress getHwAddr() {
+ return hwAddr;
+ }
+
+ @Override
+ public OFPortMod.Builder setHwAddr(MacAddress hwAddr) {
+ this.hwAddr = hwAddr;
+ this.hwAddrSet = true;
+ return this;
+ }
+ @Override
+ public long getConfig() {
+ return config;
+ }
+
+ @Override
+ public OFPortMod.Builder setConfig(long config) {
+ this.config = config;
+ this.configSet = true;
+ return this;
+ }
+ @Override
+ public long getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFPortMod.Builder setMask(long mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public long getAdvertise() {
+ return advertise;
+ }
+
+ @Override
+ public OFPortMod.Builder setAdvertise(long advertise) {
+ this.advertise = advertise;
+ this.advertiseSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFPortMod build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ OFPort portNo = this.portNoSet ? this.portNo : parentMessage.portNo;
+ if(portNo == null)
+ throw new NullPointerException("Property portNo must not be null");
+ MacAddress hwAddr = this.hwAddrSet ? this.hwAddr : parentMessage.hwAddr;
+ if(hwAddr == null)
+ throw new NullPointerException("Property hwAddr must not be null");
+ long config = this.configSet ? this.config : parentMessage.config;
+ long mask = this.maskSet ? this.mask : parentMessage.mask;
+ long advertise = this.advertiseSet ? this.advertise : parentMessage.advertise;
+
+ //
+ return new OFPortModVer13(
+ xid,
+ portNo,
+ hwAddr,
+ config,
+ mask,
+ advertise
+ );
+ }
+
+ }
+
+ static class Builder implements OFPortMod.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean portNoSet;
+ private OFPort portNo;
+ private boolean hwAddrSet;
+ private MacAddress hwAddr;
+ private boolean configSet;
+ private long config;
+ private boolean maskSet;
+ private long mask;
+ private boolean advertiseSet;
+ private long advertise;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.PORT_MOD;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFPortMod.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public OFPortMod.Builder setPortNo(OFPort portNo) {
+ this.portNo = portNo;
+ this.portNoSet = true;
+ return this;
+ }
+ @Override
+ public MacAddress getHwAddr() {
+ return hwAddr;
+ }
+
+ @Override
+ public OFPortMod.Builder setHwAddr(MacAddress hwAddr) {
+ this.hwAddr = hwAddr;
+ this.hwAddrSet = true;
+ return this;
+ }
+ @Override
+ public long getConfig() {
+ return config;
+ }
+
+ @Override
+ public OFPortMod.Builder setConfig(long config) {
+ this.config = config;
+ this.configSet = true;
+ return this;
+ }
+ @Override
+ public long getMask() {
+ return mask;
+ }
+
+ @Override
+ public OFPortMod.Builder setMask(long mask) {
+ this.mask = mask;
+ this.maskSet = true;
+ return this;
+ }
+ @Override
+ public long getAdvertise() {
+ return advertise;
+ }
+
+ @Override
+ public OFPortMod.Builder setAdvertise(long advertise) {
+ this.advertise = advertise;
+ this.advertiseSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFPortMod build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ OFPort portNo = this.portNoSet ? this.portNo : DEFAULT_PORT_NO;
+ if(portNo == null)
+ throw new NullPointerException("Property portNo must not be null");
+ MacAddress hwAddr = this.hwAddrSet ? this.hwAddr : DEFAULT_HW_ADDR;
+ if(hwAddr == null)
+ throw new NullPointerException("Property hwAddr must not be null");
+ long config = this.configSet ? this.config : DEFAULT_CONFIG;
+ long mask = this.maskSet ? this.mask : DEFAULT_MASK;
+ long advertise = this.advertiseSet ? this.advertise : DEFAULT_ADVERTISE;
+
+
+ return new OFPortModVer13(
+ xid,
+ portNo,
+ hwAddr,
+ config,
+ mask,
+ advertise
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFPortMod> {
+ @Override
+ public OFPortMod readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 16
+ byte type = bb.readByte();
+ if(type != (byte) 0x10)
+ throw new OFParseError("Wrong type: Expected=OFType.PORT_MOD(16), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 40)
+ throw new OFParseError("Wrong length: Expected=40(40), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ OFPort portNo = OFPort.read4Bytes(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ MacAddress hwAddr = MacAddress.read6Bytes(bb);
+ // pad: 2 bytes
+ bb.skipBytes(2);
+ long config = U32.f(bb.readInt());
+ long mask = U32.f(bb.readInt());
+ long advertise = U32.f(bb.readInt());
+ // pad: 4 bytes
+ bb.skipBytes(4);
+
+ OFPortModVer13 portModVer13 = new OFPortModVer13(
+ xid,
+ portNo,
+ hwAddr,
+ config,
+ mask,
+ advertise
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", portModVer13);
+ return portModVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFPortModVer13Funnel FUNNEL = new OFPortModVer13Funnel();
+ static class OFPortModVer13Funnel implements Funnel<OFPortModVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFPortModVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 16
+ sink.putByte((byte) 0x10);
+ // fixed value property length = 40
+ sink.putShort((short) 0x28);
+ sink.putLong(message.xid);
+ message.portNo.putTo(sink);
+ // skip pad (4 bytes)
+ message.hwAddr.putTo(sink);
+ // skip pad (2 bytes)
+ sink.putLong(message.config);
+ sink.putLong(message.mask);
+ sink.putLong(message.advertise);
+ // skip pad (4 bytes)
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFPortModVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFPortModVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 16
+ bb.writeByte((byte) 0x10);
+ // fixed value property length = 40
+ bb.writeShort((short) 0x28);
+ bb.writeInt(U32.t(message.xid));
+ message.portNo.write4Bytes(bb);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ message.hwAddr.write6Bytes(bb);
+ // pad: 2 bytes
+ bb.writeZero(2);
+ bb.writeInt(U32.t(message.config));
+ bb.writeInt(U32.t(message.mask));
+ bb.writeInt(U32.t(message.advertise));
+ // pad: 4 bytes
+ bb.writeZero(4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFPortModVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("portNo=").append(portNo);
+ b.append(", ");
+ b.append("hwAddr=").append(hwAddr);
+ b.append(", ");
+ b.append("config=").append(config);
+ b.append(", ");
+ b.append("mask=").append(mask);
+ b.append(", ");
+ b.append("advertise=").append(advertise);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFPortModVer13 other = (OFPortModVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (portNo == null) {
+ if (other.portNo != null)
+ return false;
+ } else if (!portNo.equals(other.portNo))
+ return false;
+ if (hwAddr == null) {
+ if (other.hwAddr != null)
+ return false;
+ } else if (!hwAddr.equals(other.hwAddr))
+ return false;
+ if( config != other.config)
+ return false;
+ if( mask != other.mask)
+ return false;
+ if( advertise != other.advertise)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((portNo == null) ? 0 : portNo.hashCode());
+ result = prime * result + ((hwAddr == null) ? 0 : hwAddr.hashCode());
+ result = prime * (int) (config ^ (config >>> 32));
+ result = prime * (int) (mask ^ (mask >>> 32));
+ result = prime * (int) (advertise ^ (advertise >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPortReasonSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPortReasonSerializerVer13.java
new file mode 100644
index 0000000..1794800
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPortReasonSerializerVer13.java
@@ -0,0 +1,79 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFPortReason;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+
+public class OFPortReasonSerializerVer13 {
+
+ public final static byte ADD_VAL = (byte) 0x0;
+ public final static byte DELETE_VAL = (byte) 0x1;
+ public final static byte MODIFY_VAL = (byte) 0x2;
+
+ public static OFPortReason readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readByte());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, OFPortReason e) {
+ bb.writeByte(toWireValue(e));
+ }
+
+ public static void putTo(OFPortReason e, PrimitiveSink sink) {
+ sink.putByte(toWireValue(e));
+ }
+
+ public static OFPortReason ofWireValue(byte val) {
+ switch(val) {
+ case ADD_VAL:
+ return OFPortReason.ADD;
+ case DELETE_VAL:
+ return OFPortReason.DELETE;
+ case MODIFY_VAL:
+ return OFPortReason.MODIFY;
+ default:
+ throw new IllegalArgumentException("Illegal wire value for type OFPortReason in version 1.3: " + val);
+ }
+ }
+
+
+ public static byte toWireValue(OFPortReason e) {
+ switch(e) {
+ case ADD:
+ return ADD_VAL;
+ case DELETE:
+ return DELETE_VAL;
+ case MODIFY:
+ return MODIFY_VAL;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFPortReason in version 1.3: " + e);
+ }
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPortStateSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPortStateSerializerVer13.java
new file mode 100644
index 0000000..b7cc4c5
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPortStateSerializerVer13.java
@@ -0,0 +1,90 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_set_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFPortState;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import java.util.EnumSet;
+import java.util.Collections;
+
+
+public class OFPortStateSerializerVer13 {
+
+ public final static int LINK_DOWN_VAL = 0x1;
+ public final static int BLOCKED_VAL = 0x2;
+ public final static int LIVE_VAL = 0x4;
+
+ public static Set<OFPortState> readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readInt());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, Set<OFPortState> set) {
+ bb.writeInt(toWireValue(set));
+ }
+
+ public static void putTo(Set<OFPortState> set, PrimitiveSink sink) {
+ sink.putInt(toWireValue(set));
+ }
+
+
+ public static Set<OFPortState> ofWireValue(int val) {
+ EnumSet<OFPortState> set = EnumSet.noneOf(OFPortState.class);
+
+ if((val & LINK_DOWN_VAL) != 0)
+ set.add(OFPortState.LINK_DOWN);
+ if((val & BLOCKED_VAL) != 0)
+ set.add(OFPortState.BLOCKED);
+ if((val & LIVE_VAL) != 0)
+ set.add(OFPortState.LIVE);
+ return Collections.unmodifiableSet(set);
+ }
+
+ public static int toWireValue(Set<OFPortState> set) {
+ int wireValue = 0;
+
+ for(OFPortState e: set) {
+ switch(e) {
+ case LINK_DOWN:
+ wireValue |= LINK_DOWN_VAL;
+ break;
+ case BLOCKED:
+ wireValue |= BLOCKED_VAL;
+ break;
+ case LIVE:
+ wireValue |= LIVE_VAL;
+ break;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFPortState in version 1.3: " + e);
+ }
+ }
+ return wireValue;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPortStatsEntryVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPortStatsEntryVer13.java
new file mode 100644
index 0000000..3fd23aa
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPortStatsEntryVer13.java
@@ -0,0 +1,976 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFPortStatsEntryVer13 implements OFPortStatsEntry {
+ private static final Logger logger = LoggerFactory.getLogger(OFPortStatsEntryVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 112;
+
+ private final static OFPort DEFAULT_PORT_NO = OFPort.ANY;
+ private final static U64 DEFAULT_RX_PACKETS = U64.ZERO;
+ private final static U64 DEFAULT_TX_PACKETS = U64.ZERO;
+ private final static U64 DEFAULT_RX_BYTES = U64.ZERO;
+ private final static U64 DEFAULT_TX_BYTES = U64.ZERO;
+ private final static U64 DEFAULT_RX_DROPPED = U64.ZERO;
+ private final static U64 DEFAULT_TX_DROPPED = U64.ZERO;
+ private final static U64 DEFAULT_RX_ERRORS = U64.ZERO;
+ private final static U64 DEFAULT_TX_ERRORS = U64.ZERO;
+ private final static U64 DEFAULT_RX_FRAME_ERR = U64.ZERO;
+ private final static U64 DEFAULT_RX_OVER_ERR = U64.ZERO;
+ private final static U64 DEFAULT_RX_CRC_ERR = U64.ZERO;
+ private final static U64 DEFAULT_COLLISIONS = U64.ZERO;
+ private final static long DEFAULT_DURATION_SEC = 0x0L;
+ private final static long DEFAULT_DURATION_NSEC = 0x0L;
+
+ // OF message fields
+ private final OFPort portNo;
+ private final U64 rxPackets;
+ private final U64 txPackets;
+ private final U64 rxBytes;
+ private final U64 txBytes;
+ private final U64 rxDropped;
+ private final U64 txDropped;
+ private final U64 rxErrors;
+ private final U64 txErrors;
+ private final U64 rxFrameErr;
+ private final U64 rxOverErr;
+ private final U64 rxCrcErr;
+ private final U64 collisions;
+ private final long durationSec;
+ private final long durationNsec;
+//
+ // Immutable default instance
+ final static OFPortStatsEntryVer13 DEFAULT = new OFPortStatsEntryVer13(
+ DEFAULT_PORT_NO, DEFAULT_RX_PACKETS, DEFAULT_TX_PACKETS, DEFAULT_RX_BYTES, DEFAULT_TX_BYTES, DEFAULT_RX_DROPPED, DEFAULT_TX_DROPPED, DEFAULT_RX_ERRORS, DEFAULT_TX_ERRORS, DEFAULT_RX_FRAME_ERR, DEFAULT_RX_OVER_ERR, DEFAULT_RX_CRC_ERR, DEFAULT_COLLISIONS, DEFAULT_DURATION_SEC, DEFAULT_DURATION_NSEC
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFPortStatsEntryVer13(OFPort portNo, U64 rxPackets, U64 txPackets, U64 rxBytes, U64 txBytes, U64 rxDropped, U64 txDropped, U64 rxErrors, U64 txErrors, U64 rxFrameErr, U64 rxOverErr, U64 rxCrcErr, U64 collisions, long durationSec, long durationNsec) {
+ this.portNo = portNo;
+ this.rxPackets = rxPackets;
+ this.txPackets = txPackets;
+ this.rxBytes = rxBytes;
+ this.txBytes = txBytes;
+ this.rxDropped = rxDropped;
+ this.txDropped = txDropped;
+ this.rxErrors = rxErrors;
+ this.txErrors = txErrors;
+ this.rxFrameErr = rxFrameErr;
+ this.rxOverErr = rxOverErr;
+ this.rxCrcErr = rxCrcErr;
+ this.collisions = collisions;
+ this.durationSec = durationSec;
+ this.durationNsec = durationNsec;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public U64 getRxPackets() {
+ return rxPackets;
+ }
+
+ @Override
+ public U64 getTxPackets() {
+ return txPackets;
+ }
+
+ @Override
+ public U64 getRxBytes() {
+ return rxBytes;
+ }
+
+ @Override
+ public U64 getTxBytes() {
+ return txBytes;
+ }
+
+ @Override
+ public U64 getRxDropped() {
+ return rxDropped;
+ }
+
+ @Override
+ public U64 getTxDropped() {
+ return txDropped;
+ }
+
+ @Override
+ public U64 getRxErrors() {
+ return rxErrors;
+ }
+
+ @Override
+ public U64 getTxErrors() {
+ return txErrors;
+ }
+
+ @Override
+ public U64 getRxFrameErr() {
+ return rxFrameErr;
+ }
+
+ @Override
+ public U64 getRxOverErr() {
+ return rxOverErr;
+ }
+
+ @Override
+ public U64 getRxCrcErr() {
+ return rxCrcErr;
+ }
+
+ @Override
+ public U64 getCollisions() {
+ return collisions;
+ }
+
+ @Override
+ public long getDurationSec() {
+ return durationSec;
+ }
+
+ @Override
+ public long getDurationNsec() {
+ return durationNsec;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFPortStatsEntry.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFPortStatsEntry.Builder {
+ final OFPortStatsEntryVer13 parentMessage;
+
+ // OF message fields
+ private boolean portNoSet;
+ private OFPort portNo;
+ private boolean rxPacketsSet;
+ private U64 rxPackets;
+ private boolean txPacketsSet;
+ private U64 txPackets;
+ private boolean rxBytesSet;
+ private U64 rxBytes;
+ private boolean txBytesSet;
+ private U64 txBytes;
+ private boolean rxDroppedSet;
+ private U64 rxDropped;
+ private boolean txDroppedSet;
+ private U64 txDropped;
+ private boolean rxErrorsSet;
+ private U64 rxErrors;
+ private boolean txErrorsSet;
+ private U64 txErrors;
+ private boolean rxFrameErrSet;
+ private U64 rxFrameErr;
+ private boolean rxOverErrSet;
+ private U64 rxOverErr;
+ private boolean rxCrcErrSet;
+ private U64 rxCrcErr;
+ private boolean collisionsSet;
+ private U64 collisions;
+ private boolean durationSecSet;
+ private long durationSec;
+ private boolean durationNsecSet;
+ private long durationNsec;
+
+ BuilderWithParent(OFPortStatsEntryVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public OFPortStatsEntry.Builder setPortNo(OFPort portNo) {
+ this.portNo = portNo;
+ this.portNoSet = true;
+ return this;
+ }
+ @Override
+ public U64 getRxPackets() {
+ return rxPackets;
+ }
+
+ @Override
+ public OFPortStatsEntry.Builder setRxPackets(U64 rxPackets) {
+ this.rxPackets = rxPackets;
+ this.rxPacketsSet = true;
+ return this;
+ }
+ @Override
+ public U64 getTxPackets() {
+ return txPackets;
+ }
+
+ @Override
+ public OFPortStatsEntry.Builder setTxPackets(U64 txPackets) {
+ this.txPackets = txPackets;
+ this.txPacketsSet = true;
+ return this;
+ }
+ @Override
+ public U64 getRxBytes() {
+ return rxBytes;
+ }
+
+ @Override
+ public OFPortStatsEntry.Builder setRxBytes(U64 rxBytes) {
+ this.rxBytes = rxBytes;
+ this.rxBytesSet = true;
+ return this;
+ }
+ @Override
+ public U64 getTxBytes() {
+ return txBytes;
+ }
+
+ @Override
+ public OFPortStatsEntry.Builder setTxBytes(U64 txBytes) {
+ this.txBytes = txBytes;
+ this.txBytesSet = true;
+ return this;
+ }
+ @Override
+ public U64 getRxDropped() {
+ return rxDropped;
+ }
+
+ @Override
+ public OFPortStatsEntry.Builder setRxDropped(U64 rxDropped) {
+ this.rxDropped = rxDropped;
+ this.rxDroppedSet = true;
+ return this;
+ }
+ @Override
+ public U64 getTxDropped() {
+ return txDropped;
+ }
+
+ @Override
+ public OFPortStatsEntry.Builder setTxDropped(U64 txDropped) {
+ this.txDropped = txDropped;
+ this.txDroppedSet = true;
+ return this;
+ }
+ @Override
+ public U64 getRxErrors() {
+ return rxErrors;
+ }
+
+ @Override
+ public OFPortStatsEntry.Builder setRxErrors(U64 rxErrors) {
+ this.rxErrors = rxErrors;
+ this.rxErrorsSet = true;
+ return this;
+ }
+ @Override
+ public U64 getTxErrors() {
+ return txErrors;
+ }
+
+ @Override
+ public OFPortStatsEntry.Builder setTxErrors(U64 txErrors) {
+ this.txErrors = txErrors;
+ this.txErrorsSet = true;
+ return this;
+ }
+ @Override
+ public U64 getRxFrameErr() {
+ return rxFrameErr;
+ }
+
+ @Override
+ public OFPortStatsEntry.Builder setRxFrameErr(U64 rxFrameErr) {
+ this.rxFrameErr = rxFrameErr;
+ this.rxFrameErrSet = true;
+ return this;
+ }
+ @Override
+ public U64 getRxOverErr() {
+ return rxOverErr;
+ }
+
+ @Override
+ public OFPortStatsEntry.Builder setRxOverErr(U64 rxOverErr) {
+ this.rxOverErr = rxOverErr;
+ this.rxOverErrSet = true;
+ return this;
+ }
+ @Override
+ public U64 getRxCrcErr() {
+ return rxCrcErr;
+ }
+
+ @Override
+ public OFPortStatsEntry.Builder setRxCrcErr(U64 rxCrcErr) {
+ this.rxCrcErr = rxCrcErr;
+ this.rxCrcErrSet = true;
+ return this;
+ }
+ @Override
+ public U64 getCollisions() {
+ return collisions;
+ }
+
+ @Override
+ public OFPortStatsEntry.Builder setCollisions(U64 collisions) {
+ this.collisions = collisions;
+ this.collisionsSet = true;
+ return this;
+ }
+ @Override
+ public long getDurationSec() {
+ return durationSec;
+ }
+
+ @Override
+ public OFPortStatsEntry.Builder setDurationSec(long durationSec) {
+ this.durationSec = durationSec;
+ this.durationSecSet = true;
+ return this;
+ }
+ @Override
+ public long getDurationNsec() {
+ return durationNsec;
+ }
+
+ @Override
+ public OFPortStatsEntry.Builder setDurationNsec(long durationNsec) {
+ this.durationNsec = durationNsec;
+ this.durationNsecSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFPortStatsEntry build() {
+ OFPort portNo = this.portNoSet ? this.portNo : parentMessage.portNo;
+ if(portNo == null)
+ throw new NullPointerException("Property portNo must not be null");
+ U64 rxPackets = this.rxPacketsSet ? this.rxPackets : parentMessage.rxPackets;
+ if(rxPackets == null)
+ throw new NullPointerException("Property rxPackets must not be null");
+ U64 txPackets = this.txPacketsSet ? this.txPackets : parentMessage.txPackets;
+ if(txPackets == null)
+ throw new NullPointerException("Property txPackets must not be null");
+ U64 rxBytes = this.rxBytesSet ? this.rxBytes : parentMessage.rxBytes;
+ if(rxBytes == null)
+ throw new NullPointerException("Property rxBytes must not be null");
+ U64 txBytes = this.txBytesSet ? this.txBytes : parentMessage.txBytes;
+ if(txBytes == null)
+ throw new NullPointerException("Property txBytes must not be null");
+ U64 rxDropped = this.rxDroppedSet ? this.rxDropped : parentMessage.rxDropped;
+ if(rxDropped == null)
+ throw new NullPointerException("Property rxDropped must not be null");
+ U64 txDropped = this.txDroppedSet ? this.txDropped : parentMessage.txDropped;
+ if(txDropped == null)
+ throw new NullPointerException("Property txDropped must not be null");
+ U64 rxErrors = this.rxErrorsSet ? this.rxErrors : parentMessage.rxErrors;
+ if(rxErrors == null)
+ throw new NullPointerException("Property rxErrors must not be null");
+ U64 txErrors = this.txErrorsSet ? this.txErrors : parentMessage.txErrors;
+ if(txErrors == null)
+ throw new NullPointerException("Property txErrors must not be null");
+ U64 rxFrameErr = this.rxFrameErrSet ? this.rxFrameErr : parentMessage.rxFrameErr;
+ if(rxFrameErr == null)
+ throw new NullPointerException("Property rxFrameErr must not be null");
+ U64 rxOverErr = this.rxOverErrSet ? this.rxOverErr : parentMessage.rxOverErr;
+ if(rxOverErr == null)
+ throw new NullPointerException("Property rxOverErr must not be null");
+ U64 rxCrcErr = this.rxCrcErrSet ? this.rxCrcErr : parentMessage.rxCrcErr;
+ if(rxCrcErr == null)
+ throw new NullPointerException("Property rxCrcErr must not be null");
+ U64 collisions = this.collisionsSet ? this.collisions : parentMessage.collisions;
+ if(collisions == null)
+ throw new NullPointerException("Property collisions must not be null");
+ long durationSec = this.durationSecSet ? this.durationSec : parentMessage.durationSec;
+ long durationNsec = this.durationNsecSet ? this.durationNsec : parentMessage.durationNsec;
+
+ //
+ return new OFPortStatsEntryVer13(
+ portNo,
+ rxPackets,
+ txPackets,
+ rxBytes,
+ txBytes,
+ rxDropped,
+ txDropped,
+ rxErrors,
+ txErrors,
+ rxFrameErr,
+ rxOverErr,
+ rxCrcErr,
+ collisions,
+ durationSec,
+ durationNsec
+ );
+ }
+
+ }
+
+ static class Builder implements OFPortStatsEntry.Builder {
+ // OF message fields
+ private boolean portNoSet;
+ private OFPort portNo;
+ private boolean rxPacketsSet;
+ private U64 rxPackets;
+ private boolean txPacketsSet;
+ private U64 txPackets;
+ private boolean rxBytesSet;
+ private U64 rxBytes;
+ private boolean txBytesSet;
+ private U64 txBytes;
+ private boolean rxDroppedSet;
+ private U64 rxDropped;
+ private boolean txDroppedSet;
+ private U64 txDropped;
+ private boolean rxErrorsSet;
+ private U64 rxErrors;
+ private boolean txErrorsSet;
+ private U64 txErrors;
+ private boolean rxFrameErrSet;
+ private U64 rxFrameErr;
+ private boolean rxOverErrSet;
+ private U64 rxOverErr;
+ private boolean rxCrcErrSet;
+ private U64 rxCrcErr;
+ private boolean collisionsSet;
+ private U64 collisions;
+ private boolean durationSecSet;
+ private long durationSec;
+ private boolean durationNsecSet;
+ private long durationNsec;
+
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public OFPortStatsEntry.Builder setPortNo(OFPort portNo) {
+ this.portNo = portNo;
+ this.portNoSet = true;
+ return this;
+ }
+ @Override
+ public U64 getRxPackets() {
+ return rxPackets;
+ }
+
+ @Override
+ public OFPortStatsEntry.Builder setRxPackets(U64 rxPackets) {
+ this.rxPackets = rxPackets;
+ this.rxPacketsSet = true;
+ return this;
+ }
+ @Override
+ public U64 getTxPackets() {
+ return txPackets;
+ }
+
+ @Override
+ public OFPortStatsEntry.Builder setTxPackets(U64 txPackets) {
+ this.txPackets = txPackets;
+ this.txPacketsSet = true;
+ return this;
+ }
+ @Override
+ public U64 getRxBytes() {
+ return rxBytes;
+ }
+
+ @Override
+ public OFPortStatsEntry.Builder setRxBytes(U64 rxBytes) {
+ this.rxBytes = rxBytes;
+ this.rxBytesSet = true;
+ return this;
+ }
+ @Override
+ public U64 getTxBytes() {
+ return txBytes;
+ }
+
+ @Override
+ public OFPortStatsEntry.Builder setTxBytes(U64 txBytes) {
+ this.txBytes = txBytes;
+ this.txBytesSet = true;
+ return this;
+ }
+ @Override
+ public U64 getRxDropped() {
+ return rxDropped;
+ }
+
+ @Override
+ public OFPortStatsEntry.Builder setRxDropped(U64 rxDropped) {
+ this.rxDropped = rxDropped;
+ this.rxDroppedSet = true;
+ return this;
+ }
+ @Override
+ public U64 getTxDropped() {
+ return txDropped;
+ }
+
+ @Override
+ public OFPortStatsEntry.Builder setTxDropped(U64 txDropped) {
+ this.txDropped = txDropped;
+ this.txDroppedSet = true;
+ return this;
+ }
+ @Override
+ public U64 getRxErrors() {
+ return rxErrors;
+ }
+
+ @Override
+ public OFPortStatsEntry.Builder setRxErrors(U64 rxErrors) {
+ this.rxErrors = rxErrors;
+ this.rxErrorsSet = true;
+ return this;
+ }
+ @Override
+ public U64 getTxErrors() {
+ return txErrors;
+ }
+
+ @Override
+ public OFPortStatsEntry.Builder setTxErrors(U64 txErrors) {
+ this.txErrors = txErrors;
+ this.txErrorsSet = true;
+ return this;
+ }
+ @Override
+ public U64 getRxFrameErr() {
+ return rxFrameErr;
+ }
+
+ @Override
+ public OFPortStatsEntry.Builder setRxFrameErr(U64 rxFrameErr) {
+ this.rxFrameErr = rxFrameErr;
+ this.rxFrameErrSet = true;
+ return this;
+ }
+ @Override
+ public U64 getRxOverErr() {
+ return rxOverErr;
+ }
+
+ @Override
+ public OFPortStatsEntry.Builder setRxOverErr(U64 rxOverErr) {
+ this.rxOverErr = rxOverErr;
+ this.rxOverErrSet = true;
+ return this;
+ }
+ @Override
+ public U64 getRxCrcErr() {
+ return rxCrcErr;
+ }
+
+ @Override
+ public OFPortStatsEntry.Builder setRxCrcErr(U64 rxCrcErr) {
+ this.rxCrcErr = rxCrcErr;
+ this.rxCrcErrSet = true;
+ return this;
+ }
+ @Override
+ public U64 getCollisions() {
+ return collisions;
+ }
+
+ @Override
+ public OFPortStatsEntry.Builder setCollisions(U64 collisions) {
+ this.collisions = collisions;
+ this.collisionsSet = true;
+ return this;
+ }
+ @Override
+ public long getDurationSec() {
+ return durationSec;
+ }
+
+ @Override
+ public OFPortStatsEntry.Builder setDurationSec(long durationSec) {
+ this.durationSec = durationSec;
+ this.durationSecSet = true;
+ return this;
+ }
+ @Override
+ public long getDurationNsec() {
+ return durationNsec;
+ }
+
+ @Override
+ public OFPortStatsEntry.Builder setDurationNsec(long durationNsec) {
+ this.durationNsec = durationNsec;
+ this.durationNsecSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFPortStatsEntry build() {
+ OFPort portNo = this.portNoSet ? this.portNo : DEFAULT_PORT_NO;
+ if(portNo == null)
+ throw new NullPointerException("Property portNo must not be null");
+ U64 rxPackets = this.rxPacketsSet ? this.rxPackets : DEFAULT_RX_PACKETS;
+ if(rxPackets == null)
+ throw new NullPointerException("Property rxPackets must not be null");
+ U64 txPackets = this.txPacketsSet ? this.txPackets : DEFAULT_TX_PACKETS;
+ if(txPackets == null)
+ throw new NullPointerException("Property txPackets must not be null");
+ U64 rxBytes = this.rxBytesSet ? this.rxBytes : DEFAULT_RX_BYTES;
+ if(rxBytes == null)
+ throw new NullPointerException("Property rxBytes must not be null");
+ U64 txBytes = this.txBytesSet ? this.txBytes : DEFAULT_TX_BYTES;
+ if(txBytes == null)
+ throw new NullPointerException("Property txBytes must not be null");
+ U64 rxDropped = this.rxDroppedSet ? this.rxDropped : DEFAULT_RX_DROPPED;
+ if(rxDropped == null)
+ throw new NullPointerException("Property rxDropped must not be null");
+ U64 txDropped = this.txDroppedSet ? this.txDropped : DEFAULT_TX_DROPPED;
+ if(txDropped == null)
+ throw new NullPointerException("Property txDropped must not be null");
+ U64 rxErrors = this.rxErrorsSet ? this.rxErrors : DEFAULT_RX_ERRORS;
+ if(rxErrors == null)
+ throw new NullPointerException("Property rxErrors must not be null");
+ U64 txErrors = this.txErrorsSet ? this.txErrors : DEFAULT_TX_ERRORS;
+ if(txErrors == null)
+ throw new NullPointerException("Property txErrors must not be null");
+ U64 rxFrameErr = this.rxFrameErrSet ? this.rxFrameErr : DEFAULT_RX_FRAME_ERR;
+ if(rxFrameErr == null)
+ throw new NullPointerException("Property rxFrameErr must not be null");
+ U64 rxOverErr = this.rxOverErrSet ? this.rxOverErr : DEFAULT_RX_OVER_ERR;
+ if(rxOverErr == null)
+ throw new NullPointerException("Property rxOverErr must not be null");
+ U64 rxCrcErr = this.rxCrcErrSet ? this.rxCrcErr : DEFAULT_RX_CRC_ERR;
+ if(rxCrcErr == null)
+ throw new NullPointerException("Property rxCrcErr must not be null");
+ U64 collisions = this.collisionsSet ? this.collisions : DEFAULT_COLLISIONS;
+ if(collisions == null)
+ throw new NullPointerException("Property collisions must not be null");
+ long durationSec = this.durationSecSet ? this.durationSec : DEFAULT_DURATION_SEC;
+ long durationNsec = this.durationNsecSet ? this.durationNsec : DEFAULT_DURATION_NSEC;
+
+
+ return new OFPortStatsEntryVer13(
+ portNo,
+ rxPackets,
+ txPackets,
+ rxBytes,
+ txBytes,
+ rxDropped,
+ txDropped,
+ rxErrors,
+ txErrors,
+ rxFrameErr,
+ rxOverErr,
+ rxCrcErr,
+ collisions,
+ durationSec,
+ durationNsec
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFPortStatsEntry> {
+ @Override
+ public OFPortStatsEntry readFrom(ChannelBuffer bb) throws OFParseError {
+ OFPort portNo = OFPort.read4Bytes(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ U64 rxPackets = U64.ofRaw(bb.readLong());
+ U64 txPackets = U64.ofRaw(bb.readLong());
+ U64 rxBytes = U64.ofRaw(bb.readLong());
+ U64 txBytes = U64.ofRaw(bb.readLong());
+ U64 rxDropped = U64.ofRaw(bb.readLong());
+ U64 txDropped = U64.ofRaw(bb.readLong());
+ U64 rxErrors = U64.ofRaw(bb.readLong());
+ U64 txErrors = U64.ofRaw(bb.readLong());
+ U64 rxFrameErr = U64.ofRaw(bb.readLong());
+ U64 rxOverErr = U64.ofRaw(bb.readLong());
+ U64 rxCrcErr = U64.ofRaw(bb.readLong());
+ U64 collisions = U64.ofRaw(bb.readLong());
+ long durationSec = U32.f(bb.readInt());
+ long durationNsec = U32.f(bb.readInt());
+
+ OFPortStatsEntryVer13 portStatsEntryVer13 = new OFPortStatsEntryVer13(
+ portNo,
+ rxPackets,
+ txPackets,
+ rxBytes,
+ txBytes,
+ rxDropped,
+ txDropped,
+ rxErrors,
+ txErrors,
+ rxFrameErr,
+ rxOverErr,
+ rxCrcErr,
+ collisions,
+ durationSec,
+ durationNsec
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", portStatsEntryVer13);
+ return portStatsEntryVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFPortStatsEntryVer13Funnel FUNNEL = new OFPortStatsEntryVer13Funnel();
+ static class OFPortStatsEntryVer13Funnel implements Funnel<OFPortStatsEntryVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFPortStatsEntryVer13 message, PrimitiveSink sink) {
+ message.portNo.putTo(sink);
+ // skip pad (4 bytes)
+ message.rxPackets.putTo(sink);
+ message.txPackets.putTo(sink);
+ message.rxBytes.putTo(sink);
+ message.txBytes.putTo(sink);
+ message.rxDropped.putTo(sink);
+ message.txDropped.putTo(sink);
+ message.rxErrors.putTo(sink);
+ message.txErrors.putTo(sink);
+ message.rxFrameErr.putTo(sink);
+ message.rxOverErr.putTo(sink);
+ message.rxCrcErr.putTo(sink);
+ message.collisions.putTo(sink);
+ sink.putLong(message.durationSec);
+ sink.putLong(message.durationNsec);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFPortStatsEntryVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFPortStatsEntryVer13 message) {
+ message.portNo.write4Bytes(bb);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ bb.writeLong(message.rxPackets.getValue());
+ bb.writeLong(message.txPackets.getValue());
+ bb.writeLong(message.rxBytes.getValue());
+ bb.writeLong(message.txBytes.getValue());
+ bb.writeLong(message.rxDropped.getValue());
+ bb.writeLong(message.txDropped.getValue());
+ bb.writeLong(message.rxErrors.getValue());
+ bb.writeLong(message.txErrors.getValue());
+ bb.writeLong(message.rxFrameErr.getValue());
+ bb.writeLong(message.rxOverErr.getValue());
+ bb.writeLong(message.rxCrcErr.getValue());
+ bb.writeLong(message.collisions.getValue());
+ bb.writeInt(U32.t(message.durationSec));
+ bb.writeInt(U32.t(message.durationNsec));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFPortStatsEntryVer13(");
+ b.append("portNo=").append(portNo);
+ b.append(", ");
+ b.append("rxPackets=").append(rxPackets);
+ b.append(", ");
+ b.append("txPackets=").append(txPackets);
+ b.append(", ");
+ b.append("rxBytes=").append(rxBytes);
+ b.append(", ");
+ b.append("txBytes=").append(txBytes);
+ b.append(", ");
+ b.append("rxDropped=").append(rxDropped);
+ b.append(", ");
+ b.append("txDropped=").append(txDropped);
+ b.append(", ");
+ b.append("rxErrors=").append(rxErrors);
+ b.append(", ");
+ b.append("txErrors=").append(txErrors);
+ b.append(", ");
+ b.append("rxFrameErr=").append(rxFrameErr);
+ b.append(", ");
+ b.append("rxOverErr=").append(rxOverErr);
+ b.append(", ");
+ b.append("rxCrcErr=").append(rxCrcErr);
+ b.append(", ");
+ b.append("collisions=").append(collisions);
+ b.append(", ");
+ b.append("durationSec=").append(durationSec);
+ b.append(", ");
+ b.append("durationNsec=").append(durationNsec);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFPortStatsEntryVer13 other = (OFPortStatsEntryVer13) obj;
+
+ if (portNo == null) {
+ if (other.portNo != null)
+ return false;
+ } else if (!portNo.equals(other.portNo))
+ return false;
+ if (rxPackets == null) {
+ if (other.rxPackets != null)
+ return false;
+ } else if (!rxPackets.equals(other.rxPackets))
+ return false;
+ if (txPackets == null) {
+ if (other.txPackets != null)
+ return false;
+ } else if (!txPackets.equals(other.txPackets))
+ return false;
+ if (rxBytes == null) {
+ if (other.rxBytes != null)
+ return false;
+ } else if (!rxBytes.equals(other.rxBytes))
+ return false;
+ if (txBytes == null) {
+ if (other.txBytes != null)
+ return false;
+ } else if (!txBytes.equals(other.txBytes))
+ return false;
+ if (rxDropped == null) {
+ if (other.rxDropped != null)
+ return false;
+ } else if (!rxDropped.equals(other.rxDropped))
+ return false;
+ if (txDropped == null) {
+ if (other.txDropped != null)
+ return false;
+ } else if (!txDropped.equals(other.txDropped))
+ return false;
+ if (rxErrors == null) {
+ if (other.rxErrors != null)
+ return false;
+ } else if (!rxErrors.equals(other.rxErrors))
+ return false;
+ if (txErrors == null) {
+ if (other.txErrors != null)
+ return false;
+ } else if (!txErrors.equals(other.txErrors))
+ return false;
+ if (rxFrameErr == null) {
+ if (other.rxFrameErr != null)
+ return false;
+ } else if (!rxFrameErr.equals(other.rxFrameErr))
+ return false;
+ if (rxOverErr == null) {
+ if (other.rxOverErr != null)
+ return false;
+ } else if (!rxOverErr.equals(other.rxOverErr))
+ return false;
+ if (rxCrcErr == null) {
+ if (other.rxCrcErr != null)
+ return false;
+ } else if (!rxCrcErr.equals(other.rxCrcErr))
+ return false;
+ if (collisions == null) {
+ if (other.collisions != null)
+ return false;
+ } else if (!collisions.equals(other.collisions))
+ return false;
+ if( durationSec != other.durationSec)
+ return false;
+ if( durationNsec != other.durationNsec)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((portNo == null) ? 0 : portNo.hashCode());
+ result = prime * result + ((rxPackets == null) ? 0 : rxPackets.hashCode());
+ result = prime * result + ((txPackets == null) ? 0 : txPackets.hashCode());
+ result = prime * result + ((rxBytes == null) ? 0 : rxBytes.hashCode());
+ result = prime * result + ((txBytes == null) ? 0 : txBytes.hashCode());
+ result = prime * result + ((rxDropped == null) ? 0 : rxDropped.hashCode());
+ result = prime * result + ((txDropped == null) ? 0 : txDropped.hashCode());
+ result = prime * result + ((rxErrors == null) ? 0 : rxErrors.hashCode());
+ result = prime * result + ((txErrors == null) ? 0 : txErrors.hashCode());
+ result = prime * result + ((rxFrameErr == null) ? 0 : rxFrameErr.hashCode());
+ result = prime * result + ((rxOverErr == null) ? 0 : rxOverErr.hashCode());
+ result = prime * result + ((rxCrcErr == null) ? 0 : rxCrcErr.hashCode());
+ result = prime * result + ((collisions == null) ? 0 : collisions.hashCode());
+ result = prime * (int) (durationSec ^ (durationSec >>> 32));
+ result = prime * (int) (durationNsec ^ (durationNsec >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPortStatsReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPortStatsReplyVer13.java
new file mode 100644
index 0000000..b71da30
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPortStatsReplyVer13.java
@@ -0,0 +1,412 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFPortStatsReplyVer13 implements OFPortStatsReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFPortStatsReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 16;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsReplyFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsReplyFlags>of();
+ private final static List<OFPortStatsEntry> DEFAULT_ENTRIES = ImmutableList.<OFPortStatsEntry>of();
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsReplyFlags> flags;
+ private final List<OFPortStatsEntry> entries;
+//
+ // Immutable default instance
+ final static OFPortStatsReplyVer13 DEFAULT = new OFPortStatsReplyVer13(
+ DEFAULT_XID, DEFAULT_FLAGS, DEFAULT_ENTRIES
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFPortStatsReplyVer13(long xid, Set<OFStatsReplyFlags> flags, List<OFPortStatsEntry> entries) {
+ this.xid = xid;
+ this.flags = flags;
+ this.entries = entries;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.PORT;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public List<OFPortStatsEntry> getEntries() {
+ return entries;
+ }
+
+
+
+ public OFPortStatsReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFPortStatsReply.Builder {
+ final OFPortStatsReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean entriesSet;
+ private List<OFPortStatsEntry> entries;
+
+ BuilderWithParent(OFPortStatsReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFPortStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.PORT;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFPortStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public List<OFPortStatsEntry> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFPortStatsReply.Builder setEntries(List<OFPortStatsEntry> entries) {
+ this.entries = entries;
+ this.entriesSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFPortStatsReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ List<OFPortStatsEntry> entries = this.entriesSet ? this.entries : parentMessage.entries;
+ if(entries == null)
+ throw new NullPointerException("Property entries must not be null");
+
+ //
+ return new OFPortStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ }
+
+ }
+
+ static class Builder implements OFPortStatsReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean entriesSet;
+ private List<OFPortStatsEntry> entries;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFPortStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.PORT;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFPortStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public List<OFPortStatsEntry> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFPortStatsReply.Builder setEntries(List<OFPortStatsEntry> entries) {
+ this.entries = entries;
+ this.entriesSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFPortStatsReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ List<OFPortStatsEntry> entries = this.entriesSet ? this.entries : DEFAULT_ENTRIES;
+ if(entries == null)
+ throw new NullPointerException("Property entries must not be null");
+
+
+ return new OFPortStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFPortStatsReply> {
+ @Override
+ public OFPortStatsReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 19
+ byte type = bb.readByte();
+ if(type != (byte) 0x13)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REPLY(19), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 4
+ short statsType = bb.readShort();
+ if(statsType != (short) 0x4)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.PORT(4), got="+statsType);
+ Set<OFStatsReplyFlags> flags = OFStatsReplyFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ List<OFPortStatsEntry> entries = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFPortStatsEntryVer13.READER);
+
+ OFPortStatsReplyVer13 portStatsReplyVer13 = new OFPortStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", portStatsReplyVer13);
+ return portStatsReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFPortStatsReplyVer13Funnel FUNNEL = new OFPortStatsReplyVer13Funnel();
+ static class OFPortStatsReplyVer13Funnel implements Funnel<OFPortStatsReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFPortStatsReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 19
+ sink.putByte((byte) 0x13);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property statsType = 4
+ sink.putShort((short) 0x4);
+ OFStatsReplyFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ FunnelUtils.putList(message.entries, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFPortStatsReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFPortStatsReplyVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 19
+ bb.writeByte((byte) 0x13);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 4
+ bb.writeShort((short) 0x4);
+ OFStatsReplyFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ ChannelUtils.writeList(bb, message.entries);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFPortStatsReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("entries=").append(entries);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFPortStatsReplyVer13 other = (OFPortStatsReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if (entries == null) {
+ if (other.entries != null)
+ return false;
+ } else if (!entries.equals(other.entries))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * result + ((entries == null) ? 0 : entries.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPortStatsRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPortStatsRequestVer13.java
new file mode 100644
index 0000000..276b8e6
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPortStatsRequestVer13.java
@@ -0,0 +1,410 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFPortStatsRequestVer13 implements OFPortStatsRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFPortStatsRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 24;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsRequestFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsRequestFlags>of();
+ private final static OFPort DEFAULT_PORT_NO = OFPort.ANY;
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsRequestFlags> flags;
+ private final OFPort portNo;
+//
+ // Immutable default instance
+ final static OFPortStatsRequestVer13 DEFAULT = new OFPortStatsRequestVer13(
+ DEFAULT_XID, DEFAULT_FLAGS, DEFAULT_PORT_NO
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFPortStatsRequestVer13(long xid, Set<OFStatsRequestFlags> flags, OFPort portNo) {
+ this.xid = xid;
+ this.flags = flags;
+ this.portNo = portNo;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.PORT;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+
+
+ public OFPortStatsRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFPortStatsRequest.Builder {
+ final OFPortStatsRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+ private boolean portNoSet;
+ private OFPort portNo;
+
+ BuilderWithParent(OFPortStatsRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFPortStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.PORT;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFPortStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public OFPortStatsRequest.Builder setPortNo(OFPort portNo) {
+ this.portNo = portNo;
+ this.portNoSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFPortStatsRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ OFPort portNo = this.portNoSet ? this.portNo : parentMessage.portNo;
+ if(portNo == null)
+ throw new NullPointerException("Property portNo must not be null");
+
+ //
+ return new OFPortStatsRequestVer13(
+ xid,
+ flags,
+ portNo
+ );
+ }
+
+ }
+
+ static class Builder implements OFPortStatsRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+ private boolean portNoSet;
+ private OFPort portNo;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFPortStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.PORT;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFPortStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public OFPortStatsRequest.Builder setPortNo(OFPort portNo) {
+ this.portNo = portNo;
+ this.portNoSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFPortStatsRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ OFPort portNo = this.portNoSet ? this.portNo : DEFAULT_PORT_NO;
+ if(portNo == null)
+ throw new NullPointerException("Property portNo must not be null");
+
+
+ return new OFPortStatsRequestVer13(
+ xid,
+ flags,
+ portNo
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFPortStatsRequest> {
+ @Override
+ public OFPortStatsRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 18
+ byte type = bb.readByte();
+ if(type != (byte) 0x12)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REQUEST(18), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 24)
+ throw new OFParseError("Wrong length: Expected=24(24), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 4
+ short statsType = bb.readShort();
+ if(statsType != (short) 0x4)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.PORT(4), got="+statsType);
+ Set<OFStatsRequestFlags> flags = OFStatsRequestFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ OFPort portNo = OFPort.read4Bytes(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+
+ OFPortStatsRequestVer13 portStatsRequestVer13 = new OFPortStatsRequestVer13(
+ xid,
+ flags,
+ portNo
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", portStatsRequestVer13);
+ return portStatsRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFPortStatsRequestVer13Funnel FUNNEL = new OFPortStatsRequestVer13Funnel();
+ static class OFPortStatsRequestVer13Funnel implements Funnel<OFPortStatsRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFPortStatsRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 18
+ sink.putByte((byte) 0x12);
+ // fixed value property length = 24
+ sink.putShort((short) 0x18);
+ sink.putLong(message.xid);
+ // fixed value property statsType = 4
+ sink.putShort((short) 0x4);
+ OFStatsRequestFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ message.portNo.putTo(sink);
+ // skip pad (4 bytes)
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFPortStatsRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFPortStatsRequestVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 18
+ bb.writeByte((byte) 0x12);
+ // fixed value property length = 24
+ bb.writeShort((short) 0x18);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 4
+ bb.writeShort((short) 0x4);
+ OFStatsRequestFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ message.portNo.write4Bytes(bb);
+ // pad: 4 bytes
+ bb.writeZero(4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFPortStatsRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("portNo=").append(portNo);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFPortStatsRequestVer13 other = (OFPortStatsRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if (portNo == null) {
+ if (other.portNo != null)
+ return false;
+ } else if (!portNo.equals(other.portNo))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * result + ((portNo == null) ? 0 : portNo.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPortStatusVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPortStatusVer13.java
new file mode 100644
index 0000000..a671c49
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFPortStatusVer13.java
@@ -0,0 +1,377 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFPortStatusVer13 implements OFPortStatus {
+ private static final Logger logger = LoggerFactory.getLogger(OFPortStatusVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 80;
+
+ private final static long DEFAULT_XID = 0x0L;
+
+ // OF message fields
+ private final long xid;
+ private final OFPortReason reason;
+ private final OFPortDesc desc;
+//
+
+ // package private constructor - used by readers, builders, and factory
+ OFPortStatusVer13(long xid, OFPortReason reason, OFPortDesc desc) {
+ this.xid = xid;
+ this.reason = reason;
+ this.desc = desc;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.PORT_STATUS;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFPortReason getReason() {
+ return reason;
+ }
+
+ @Override
+ public OFPortDesc getDesc() {
+ return desc;
+ }
+
+
+
+ public OFPortStatus.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFPortStatus.Builder {
+ final OFPortStatusVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean reasonSet;
+ private OFPortReason reason;
+ private boolean descSet;
+ private OFPortDesc desc;
+
+ BuilderWithParent(OFPortStatusVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.PORT_STATUS;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFPortStatus.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFPortReason getReason() {
+ return reason;
+ }
+
+ @Override
+ public OFPortStatus.Builder setReason(OFPortReason reason) {
+ this.reason = reason;
+ this.reasonSet = true;
+ return this;
+ }
+ @Override
+ public OFPortDesc getDesc() {
+ return desc;
+ }
+
+ @Override
+ public OFPortStatus.Builder setDesc(OFPortDesc desc) {
+ this.desc = desc;
+ this.descSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFPortStatus build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ OFPortReason reason = this.reasonSet ? this.reason : parentMessage.reason;
+ if(reason == null)
+ throw new NullPointerException("Property reason must not be null");
+ OFPortDesc desc = this.descSet ? this.desc : parentMessage.desc;
+ if(desc == null)
+ throw new NullPointerException("Property desc must not be null");
+
+ //
+ return new OFPortStatusVer13(
+ xid,
+ reason,
+ desc
+ );
+ }
+
+ }
+
+ static class Builder implements OFPortStatus.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean reasonSet;
+ private OFPortReason reason;
+ private boolean descSet;
+ private OFPortDesc desc;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.PORT_STATUS;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFPortStatus.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFPortReason getReason() {
+ return reason;
+ }
+
+ @Override
+ public OFPortStatus.Builder setReason(OFPortReason reason) {
+ this.reason = reason;
+ this.reasonSet = true;
+ return this;
+ }
+ @Override
+ public OFPortDesc getDesc() {
+ return desc;
+ }
+
+ @Override
+ public OFPortStatus.Builder setDesc(OFPortDesc desc) {
+ this.desc = desc;
+ this.descSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFPortStatus build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ if(!this.reasonSet)
+ throw new IllegalStateException("Property reason doesn't have default value -- must be set");
+ if(reason == null)
+ throw new NullPointerException("Property reason must not be null");
+ if(!this.descSet)
+ throw new IllegalStateException("Property desc doesn't have default value -- must be set");
+ if(desc == null)
+ throw new NullPointerException("Property desc must not be null");
+
+
+ return new OFPortStatusVer13(
+ xid,
+ reason,
+ desc
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFPortStatus> {
+ @Override
+ public OFPortStatus readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 12
+ byte type = bb.readByte();
+ if(type != (byte) 0xc)
+ throw new OFParseError("Wrong type: Expected=OFType.PORT_STATUS(12), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 80)
+ throw new OFParseError("Wrong length: Expected=80(80), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ OFPortReason reason = OFPortReasonSerializerVer13.readFrom(bb);
+ // pad: 7 bytes
+ bb.skipBytes(7);
+ OFPortDesc desc = OFPortDescVer13.READER.readFrom(bb);
+
+ OFPortStatusVer13 portStatusVer13 = new OFPortStatusVer13(
+ xid,
+ reason,
+ desc
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", portStatusVer13);
+ return portStatusVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFPortStatusVer13Funnel FUNNEL = new OFPortStatusVer13Funnel();
+ static class OFPortStatusVer13Funnel implements Funnel<OFPortStatusVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFPortStatusVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 12
+ sink.putByte((byte) 0xc);
+ // fixed value property length = 80
+ sink.putShort((short) 0x50);
+ sink.putLong(message.xid);
+ OFPortReasonSerializerVer13.putTo(message.reason, sink);
+ // skip pad (7 bytes)
+ message.desc.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFPortStatusVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFPortStatusVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 12
+ bb.writeByte((byte) 0xc);
+ // fixed value property length = 80
+ bb.writeShort((short) 0x50);
+ bb.writeInt(U32.t(message.xid));
+ OFPortReasonSerializerVer13.writeTo(bb, message.reason);
+ // pad: 7 bytes
+ bb.writeZero(7);
+ message.desc.writeTo(bb);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFPortStatusVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("reason=").append(reason);
+ b.append(", ");
+ b.append("desc=").append(desc);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFPortStatusVer13 other = (OFPortStatusVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (reason == null) {
+ if (other.reason != null)
+ return false;
+ } else if (!reason.equals(other.reason))
+ return false;
+ if (desc == null) {
+ if (other.desc != null)
+ return false;
+ } else if (!desc.equals(other.desc))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((reason == null) ? 0 : reason.hashCode());
+ result = prime * result + ((desc == null) ? 0 : desc.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFQueueGetConfigReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFQueueGetConfigReplyVer13.java
new file mode 100644
index 0000000..72f9e32
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFQueueGetConfigReplyVer13.java
@@ -0,0 +1,388 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFQueueGetConfigReplyVer13 implements OFQueueGetConfigReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFQueueGetConfigReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 16;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static OFPort DEFAULT_PORT = OFPort.ANY;
+ private final static List<OFPacketQueue> DEFAULT_QUEUES = ImmutableList.<OFPacketQueue>of();
+
+ // OF message fields
+ private final long xid;
+ private final OFPort port;
+ private final List<OFPacketQueue> queues;
+//
+ // Immutable default instance
+ final static OFQueueGetConfigReplyVer13 DEFAULT = new OFQueueGetConfigReplyVer13(
+ DEFAULT_XID, DEFAULT_PORT, DEFAULT_QUEUES
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFQueueGetConfigReplyVer13(long xid, OFPort port, List<OFPacketQueue> queues) {
+ this.xid = xid;
+ this.port = port;
+ this.queues = queues;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.QUEUE_GET_CONFIG_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFPort getPort() {
+ return port;
+ }
+
+ @Override
+ public List<OFPacketQueue> getQueues() {
+ return queues;
+ }
+
+
+
+ public OFQueueGetConfigReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFQueueGetConfigReply.Builder {
+ final OFQueueGetConfigReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean portSet;
+ private OFPort port;
+ private boolean queuesSet;
+ private List<OFPacketQueue> queues;
+
+ BuilderWithParent(OFQueueGetConfigReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.QUEUE_GET_CONFIG_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFQueueGetConfigReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getPort() {
+ return port;
+ }
+
+ @Override
+ public OFQueueGetConfigReply.Builder setPort(OFPort port) {
+ this.port = port;
+ this.portSet = true;
+ return this;
+ }
+ @Override
+ public List<OFPacketQueue> getQueues() {
+ return queues;
+ }
+
+ @Override
+ public OFQueueGetConfigReply.Builder setQueues(List<OFPacketQueue> queues) {
+ this.queues = queues;
+ this.queuesSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFQueueGetConfigReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ OFPort port = this.portSet ? this.port : parentMessage.port;
+ if(port == null)
+ throw new NullPointerException("Property port must not be null");
+ List<OFPacketQueue> queues = this.queuesSet ? this.queues : parentMessage.queues;
+ if(queues == null)
+ throw new NullPointerException("Property queues must not be null");
+
+ //
+ return new OFQueueGetConfigReplyVer13(
+ xid,
+ port,
+ queues
+ );
+ }
+
+ }
+
+ static class Builder implements OFQueueGetConfigReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean portSet;
+ private OFPort port;
+ private boolean queuesSet;
+ private List<OFPacketQueue> queues;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.QUEUE_GET_CONFIG_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFQueueGetConfigReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getPort() {
+ return port;
+ }
+
+ @Override
+ public OFQueueGetConfigReply.Builder setPort(OFPort port) {
+ this.port = port;
+ this.portSet = true;
+ return this;
+ }
+ @Override
+ public List<OFPacketQueue> getQueues() {
+ return queues;
+ }
+
+ @Override
+ public OFQueueGetConfigReply.Builder setQueues(List<OFPacketQueue> queues) {
+ this.queues = queues;
+ this.queuesSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFQueueGetConfigReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ OFPort port = this.portSet ? this.port : DEFAULT_PORT;
+ if(port == null)
+ throw new NullPointerException("Property port must not be null");
+ List<OFPacketQueue> queues = this.queuesSet ? this.queues : DEFAULT_QUEUES;
+ if(queues == null)
+ throw new NullPointerException("Property queues must not be null");
+
+
+ return new OFQueueGetConfigReplyVer13(
+ xid,
+ port,
+ queues
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFQueueGetConfigReply> {
+ @Override
+ public OFQueueGetConfigReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 23
+ byte type = bb.readByte();
+ if(type != (byte) 0x17)
+ throw new OFParseError("Wrong type: Expected=OFType.QUEUE_GET_CONFIG_REPLY(23), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ OFPort port = OFPort.read4Bytes(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ List<OFPacketQueue> queues = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFPacketQueueVer13.READER);
+
+ OFQueueGetConfigReplyVer13 queueGetConfigReplyVer13 = new OFQueueGetConfigReplyVer13(
+ xid,
+ port,
+ queues
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", queueGetConfigReplyVer13);
+ return queueGetConfigReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFQueueGetConfigReplyVer13Funnel FUNNEL = new OFQueueGetConfigReplyVer13Funnel();
+ static class OFQueueGetConfigReplyVer13Funnel implements Funnel<OFQueueGetConfigReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFQueueGetConfigReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 23
+ sink.putByte((byte) 0x17);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ message.port.putTo(sink);
+ // skip pad (4 bytes)
+ FunnelUtils.putList(message.queues, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFQueueGetConfigReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFQueueGetConfigReplyVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 23
+ bb.writeByte((byte) 0x17);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ message.port.write4Bytes(bb);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ ChannelUtils.writeList(bb, message.queues);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFQueueGetConfigReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("port=").append(port);
+ b.append(", ");
+ b.append("queues=").append(queues);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFQueueGetConfigReplyVer13 other = (OFQueueGetConfigReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (port == null) {
+ if (other.port != null)
+ return false;
+ } else if (!port.equals(other.port))
+ return false;
+ if (queues == null) {
+ if (other.queues != null)
+ return false;
+ } else if (!queues.equals(other.queues))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((port == null) ? 0 : port.hashCode());
+ result = prime * result + ((queues == null) ? 0 : queues.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFQueueGetConfigRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFQueueGetConfigRequestVer13.java
new file mode 100644
index 0000000..91613ea
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFQueueGetConfigRequestVer13.java
@@ -0,0 +1,327 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFQueueGetConfigRequestVer13 implements OFQueueGetConfigRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFQueueGetConfigRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 16;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static OFPort DEFAULT_PORT = OFPort.ANY;
+
+ // OF message fields
+ private final long xid;
+ private final OFPort port;
+//
+ // Immutable default instance
+ final static OFQueueGetConfigRequestVer13 DEFAULT = new OFQueueGetConfigRequestVer13(
+ DEFAULT_XID, DEFAULT_PORT
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFQueueGetConfigRequestVer13(long xid, OFPort port) {
+ this.xid = xid;
+ this.port = port;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.QUEUE_GET_CONFIG_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFPort getPort() {
+ return port;
+ }
+
+
+
+ public OFQueueGetConfigRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFQueueGetConfigRequest.Builder {
+ final OFQueueGetConfigRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean portSet;
+ private OFPort port;
+
+ BuilderWithParent(OFQueueGetConfigRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.QUEUE_GET_CONFIG_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFQueueGetConfigRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getPort() {
+ return port;
+ }
+
+ @Override
+ public OFQueueGetConfigRequest.Builder setPort(OFPort port) {
+ this.port = port;
+ this.portSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFQueueGetConfigRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ OFPort port = this.portSet ? this.port : parentMessage.port;
+ if(port == null)
+ throw new NullPointerException("Property port must not be null");
+
+ //
+ return new OFQueueGetConfigRequestVer13(
+ xid,
+ port
+ );
+ }
+
+ }
+
+ static class Builder implements OFQueueGetConfigRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean portSet;
+ private OFPort port;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.QUEUE_GET_CONFIG_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFQueueGetConfigRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getPort() {
+ return port;
+ }
+
+ @Override
+ public OFQueueGetConfigRequest.Builder setPort(OFPort port) {
+ this.port = port;
+ this.portSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFQueueGetConfigRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ OFPort port = this.portSet ? this.port : DEFAULT_PORT;
+ if(port == null)
+ throw new NullPointerException("Property port must not be null");
+
+
+ return new OFQueueGetConfigRequestVer13(
+ xid,
+ port
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFQueueGetConfigRequest> {
+ @Override
+ public OFQueueGetConfigRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 22
+ byte type = bb.readByte();
+ if(type != (byte) 0x16)
+ throw new OFParseError("Wrong type: Expected=OFType.QUEUE_GET_CONFIG_REQUEST(22), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 16)
+ throw new OFParseError("Wrong length: Expected=16(16), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ OFPort port = OFPort.read4Bytes(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+
+ OFQueueGetConfigRequestVer13 queueGetConfigRequestVer13 = new OFQueueGetConfigRequestVer13(
+ xid,
+ port
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", queueGetConfigRequestVer13);
+ return queueGetConfigRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFQueueGetConfigRequestVer13Funnel FUNNEL = new OFQueueGetConfigRequestVer13Funnel();
+ static class OFQueueGetConfigRequestVer13Funnel implements Funnel<OFQueueGetConfigRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFQueueGetConfigRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 22
+ sink.putByte((byte) 0x16);
+ // fixed value property length = 16
+ sink.putShort((short) 0x10);
+ sink.putLong(message.xid);
+ message.port.putTo(sink);
+ // skip pad (4 bytes)
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFQueueGetConfigRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFQueueGetConfigRequestVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 22
+ bb.writeByte((byte) 0x16);
+ // fixed value property length = 16
+ bb.writeShort((short) 0x10);
+ bb.writeInt(U32.t(message.xid));
+ message.port.write4Bytes(bb);
+ // pad: 4 bytes
+ bb.writeZero(4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFQueueGetConfigRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("port=").append(port);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFQueueGetConfigRequestVer13 other = (OFQueueGetConfigRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (port == null) {
+ if (other.port != null)
+ return false;
+ } else if (!port.equals(other.port))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((port == null) ? 0 : port.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFQueueOpFailedCodeSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFQueueOpFailedCodeSerializerVer13.java
new file mode 100644
index 0000000..621e5f4
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFQueueOpFailedCodeSerializerVer13.java
@@ -0,0 +1,79 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFQueueOpFailedCode;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+
+public class OFQueueOpFailedCodeSerializerVer13 {
+
+ public final static short BAD_PORT_VAL = (short) 0x0;
+ public final static short BAD_QUEUE_VAL = (short) 0x1;
+ public final static short EPERM_VAL = (short) 0x2;
+
+ public static OFQueueOpFailedCode readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readShort());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, OFQueueOpFailedCode e) {
+ bb.writeShort(toWireValue(e));
+ }
+
+ public static void putTo(OFQueueOpFailedCode e, PrimitiveSink sink) {
+ sink.putShort(toWireValue(e));
+ }
+
+ public static OFQueueOpFailedCode ofWireValue(short val) {
+ switch(val) {
+ case BAD_PORT_VAL:
+ return OFQueueOpFailedCode.BAD_PORT;
+ case BAD_QUEUE_VAL:
+ return OFQueueOpFailedCode.BAD_QUEUE;
+ case EPERM_VAL:
+ return OFQueueOpFailedCode.EPERM;
+ default:
+ throw new IllegalArgumentException("Illegal wire value for type OFQueueOpFailedCode in version 1.3: " + val);
+ }
+ }
+
+
+ public static short toWireValue(OFQueueOpFailedCode e) {
+ switch(e) {
+ case BAD_PORT:
+ return BAD_PORT_VAL;
+ case BAD_QUEUE:
+ return BAD_QUEUE_VAL;
+ case EPERM:
+ return EPERM_VAL;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFQueueOpFailedCode in version 1.3: " + e);
+ }
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFQueueOpFailedErrorMsgVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFQueueOpFailedErrorMsgVer13.java
new file mode 100644
index 0000000..7d71584
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFQueueOpFailedErrorMsgVer13.java
@@ -0,0 +1,400 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFQueueOpFailedErrorMsgVer13 implements OFQueueOpFailedErrorMsg {
+ private static final Logger logger = LoggerFactory.getLogger(OFQueueOpFailedErrorMsgVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 12;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static OFErrorCauseData DEFAULT_DATA = OFErrorCauseData.NONE;
+
+ // OF message fields
+ private final long xid;
+ private final OFQueueOpFailedCode code;
+ private final OFErrorCauseData data;
+//
+
+ // package private constructor - used by readers, builders, and factory
+ OFQueueOpFailedErrorMsgVer13(long xid, OFQueueOpFailedCode code, OFErrorCauseData data) {
+ this.xid = xid;
+ this.code = code;
+ this.data = data;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ERROR;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFErrorType getErrType() {
+ return OFErrorType.QUEUE_OP_FAILED;
+ }
+
+ @Override
+ public OFQueueOpFailedCode getCode() {
+ return code;
+ }
+
+ @Override
+ public OFErrorCauseData getData() {
+ return data;
+ }
+
+
+
+ public OFQueueOpFailedErrorMsg.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFQueueOpFailedErrorMsg.Builder {
+ final OFQueueOpFailedErrorMsgVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean codeSet;
+ private OFQueueOpFailedCode code;
+ private boolean dataSet;
+ private OFErrorCauseData data;
+
+ BuilderWithParent(OFQueueOpFailedErrorMsgVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ERROR;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFQueueOpFailedErrorMsg.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorType getErrType() {
+ return OFErrorType.QUEUE_OP_FAILED;
+ }
+
+ @Override
+ public OFQueueOpFailedCode getCode() {
+ return code;
+ }
+
+ @Override
+ public OFQueueOpFailedErrorMsg.Builder setCode(OFQueueOpFailedCode code) {
+ this.code = code;
+ this.codeSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorCauseData getData() {
+ return data;
+ }
+
+ @Override
+ public OFQueueOpFailedErrorMsg.Builder setData(OFErrorCauseData data) {
+ this.data = data;
+ this.dataSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFQueueOpFailedErrorMsg build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ OFQueueOpFailedCode code = this.codeSet ? this.code : parentMessage.code;
+ if(code == null)
+ throw new NullPointerException("Property code must not be null");
+ OFErrorCauseData data = this.dataSet ? this.data : parentMessage.data;
+ if(data == null)
+ throw new NullPointerException("Property data must not be null");
+
+ //
+ return new OFQueueOpFailedErrorMsgVer13(
+ xid,
+ code,
+ data
+ );
+ }
+
+ }
+
+ static class Builder implements OFQueueOpFailedErrorMsg.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean codeSet;
+ private OFQueueOpFailedCode code;
+ private boolean dataSet;
+ private OFErrorCauseData data;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ERROR;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFQueueOpFailedErrorMsg.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorType getErrType() {
+ return OFErrorType.QUEUE_OP_FAILED;
+ }
+
+ @Override
+ public OFQueueOpFailedCode getCode() {
+ return code;
+ }
+
+ @Override
+ public OFQueueOpFailedErrorMsg.Builder setCode(OFQueueOpFailedCode code) {
+ this.code = code;
+ this.codeSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorCauseData getData() {
+ return data;
+ }
+
+ @Override
+ public OFQueueOpFailedErrorMsg.Builder setData(OFErrorCauseData data) {
+ this.data = data;
+ this.dataSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFQueueOpFailedErrorMsg build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ if(!this.codeSet)
+ throw new IllegalStateException("Property code doesn't have default value -- must be set");
+ if(code == null)
+ throw new NullPointerException("Property code must not be null");
+ OFErrorCauseData data = this.dataSet ? this.data : DEFAULT_DATA;
+ if(data == null)
+ throw new NullPointerException("Property data must not be null");
+
+
+ return new OFQueueOpFailedErrorMsgVer13(
+ xid,
+ code,
+ data
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFQueueOpFailedErrorMsg> {
+ @Override
+ public OFQueueOpFailedErrorMsg readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 1
+ byte type = bb.readByte();
+ if(type != (byte) 0x1)
+ throw new OFParseError("Wrong type: Expected=OFType.ERROR(1), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property errType == 9
+ short errType = bb.readShort();
+ if(errType != (short) 0x9)
+ throw new OFParseError("Wrong errType: Expected=OFErrorType.QUEUE_OP_FAILED(9), got="+errType);
+ OFQueueOpFailedCode code = OFQueueOpFailedCodeSerializerVer13.readFrom(bb);
+ OFErrorCauseData data = OFErrorCauseData.read(bb, length - (bb.readerIndex() - start), OFVersion.OF_13);
+
+ OFQueueOpFailedErrorMsgVer13 queueOpFailedErrorMsgVer13 = new OFQueueOpFailedErrorMsgVer13(
+ xid,
+ code,
+ data
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", queueOpFailedErrorMsgVer13);
+ return queueOpFailedErrorMsgVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFQueueOpFailedErrorMsgVer13Funnel FUNNEL = new OFQueueOpFailedErrorMsgVer13Funnel();
+ static class OFQueueOpFailedErrorMsgVer13Funnel implements Funnel<OFQueueOpFailedErrorMsgVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFQueueOpFailedErrorMsgVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 1
+ sink.putByte((byte) 0x1);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property errType = 9
+ sink.putShort((short) 0x9);
+ OFQueueOpFailedCodeSerializerVer13.putTo(message.code, sink);
+ message.data.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFQueueOpFailedErrorMsgVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFQueueOpFailedErrorMsgVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 1
+ bb.writeByte((byte) 0x1);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property errType = 9
+ bb.writeShort((short) 0x9);
+ OFQueueOpFailedCodeSerializerVer13.writeTo(bb, message.code);
+ message.data.writeTo(bb);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFQueueOpFailedErrorMsgVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("code=").append(code);
+ b.append(", ");
+ b.append("data=").append(data);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFQueueOpFailedErrorMsgVer13 other = (OFQueueOpFailedErrorMsgVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (code == null) {
+ if (other.code != null)
+ return false;
+ } else if (!code.equals(other.code))
+ return false;
+ if (data == null) {
+ if (other.data != null)
+ return false;
+ } else if (!data.equals(other.data))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((code == null) ? 0 : code.hashCode());
+ result = prime * result + ((data == null) ? 0 : data.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFQueuePropExperimenterVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFQueuePropExperimenterVer13.java
new file mode 100644
index 0000000..2add383
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFQueuePropExperimenterVer13.java
@@ -0,0 +1,59 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_virtual_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.jboss.netty.buffer.ChannelBuffer;
+
+abstract class OFQueuePropExperimenterVer13 {
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 16;
+
+
+ public final static OFQueuePropExperimenterVer13.Reader READER = new Reader();
+
+ static class Reader implements OFMessageReader<OFQueuePropExperimenter> {
+ @Override
+ public OFQueuePropExperimenter readFrom(ChannelBuffer bb) throws OFParseError {
+ if(bb.readableBytes() < MINIMUM_LENGTH)
+ return null;
+ int start = bb.readerIndex();
+ // fixed value property type == 0xffff
+ short type = bb.readShort();
+ if(type != (short) 0xffff)
+ throw new OFParseError("Wrong type: Expected=0xffff(0xffff), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ int experimenter = bb.readInt();
+ bb.readerIndex(start);
+ switch(experimenter) {
+ default:
+ throw new OFParseError("Unknown value for discriminator experimenter of class OFQueuePropExperimenterVer13: " + experimenter);
+ }
+ }
+ }
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFQueuePropMaxRateVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFQueuePropMaxRateVer13.java
new file mode 100644
index 0000000..9f4b824
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFQueuePropMaxRateVer13.java
@@ -0,0 +1,270 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFQueuePropMaxRateVer13 implements OFQueuePropMaxRate {
+ private static final Logger logger = LoggerFactory.getLogger(OFQueuePropMaxRateVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 16;
+
+ private final static int DEFAULT_RATE = 0x0;
+
+ // OF message fields
+ private final int rate;
+//
+ // Immutable default instance
+ final static OFQueuePropMaxRateVer13 DEFAULT = new OFQueuePropMaxRateVer13(
+ DEFAULT_RATE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFQueuePropMaxRateVer13(int rate) {
+ this.rate = rate;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public int getType() {
+ return 0x2;
+ }
+
+ @Override
+ public int getRate() {
+ return rate;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFQueuePropMaxRate.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFQueuePropMaxRate.Builder {
+ final OFQueuePropMaxRateVer13 parentMessage;
+
+ // OF message fields
+ private boolean rateSet;
+ private int rate;
+
+ BuilderWithParent(OFQueuePropMaxRateVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public int getType() {
+ return 0x2;
+ }
+
+ @Override
+ public int getRate() {
+ return rate;
+ }
+
+ @Override
+ public OFQueuePropMaxRate.Builder setRate(int rate) {
+ this.rate = rate;
+ this.rateSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFQueuePropMaxRate build() {
+ int rate = this.rateSet ? this.rate : parentMessage.rate;
+
+ //
+ return new OFQueuePropMaxRateVer13(
+ rate
+ );
+ }
+
+ }
+
+ static class Builder implements OFQueuePropMaxRate.Builder {
+ // OF message fields
+ private boolean rateSet;
+ private int rate;
+
+ @Override
+ public int getType() {
+ return 0x2;
+ }
+
+ @Override
+ public int getRate() {
+ return rate;
+ }
+
+ @Override
+ public OFQueuePropMaxRate.Builder setRate(int rate) {
+ this.rate = rate;
+ this.rateSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFQueuePropMaxRate build() {
+ int rate = this.rateSet ? this.rate : DEFAULT_RATE;
+
+
+ return new OFQueuePropMaxRateVer13(
+ rate
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFQueuePropMaxRate> {
+ @Override
+ public OFQueuePropMaxRate readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 0x2
+ short type = bb.readShort();
+ if(type != (short) 0x2)
+ throw new OFParseError("Wrong type: Expected=0x2(0x2), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 16)
+ throw new OFParseError("Wrong length: Expected=16(16), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ int rate = U16.f(bb.readShort());
+ // pad: 6 bytes
+ bb.skipBytes(6);
+
+ OFQueuePropMaxRateVer13 queuePropMaxRateVer13 = new OFQueuePropMaxRateVer13(
+ rate
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", queuePropMaxRateVer13);
+ return queuePropMaxRateVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFQueuePropMaxRateVer13Funnel FUNNEL = new OFQueuePropMaxRateVer13Funnel();
+ static class OFQueuePropMaxRateVer13Funnel implements Funnel<OFQueuePropMaxRateVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFQueuePropMaxRateVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 0x2
+ sink.putShort((short) 0x2);
+ // fixed value property length = 16
+ sink.putShort((short) 0x10);
+ // skip pad (4 bytes)
+ sink.putInt(message.rate);
+ // skip pad (6 bytes)
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFQueuePropMaxRateVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFQueuePropMaxRateVer13 message) {
+ // fixed value property type = 0x2
+ bb.writeShort((short) 0x2);
+ // fixed value property length = 16
+ bb.writeShort((short) 0x10);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ bb.writeShort(U16.t(message.rate));
+ // pad: 6 bytes
+ bb.writeZero(6);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFQueuePropMaxRateVer13(");
+ b.append("rate=").append(rate);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFQueuePropMaxRateVer13 other = (OFQueuePropMaxRateVer13) obj;
+
+ if( rate != other.rate)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + rate;
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFQueuePropMinRateVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFQueuePropMinRateVer13.java
new file mode 100644
index 0000000..c0730c4
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFQueuePropMinRateVer13.java
@@ -0,0 +1,270 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFQueuePropMinRateVer13 implements OFQueuePropMinRate {
+ private static final Logger logger = LoggerFactory.getLogger(OFQueuePropMinRateVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 16;
+
+ private final static int DEFAULT_RATE = 0x0;
+
+ // OF message fields
+ private final int rate;
+//
+ // Immutable default instance
+ final static OFQueuePropMinRateVer13 DEFAULT = new OFQueuePropMinRateVer13(
+ DEFAULT_RATE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFQueuePropMinRateVer13(int rate) {
+ this.rate = rate;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public int getType() {
+ return 0x1;
+ }
+
+ @Override
+ public int getRate() {
+ return rate;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFQueuePropMinRate.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFQueuePropMinRate.Builder {
+ final OFQueuePropMinRateVer13 parentMessage;
+
+ // OF message fields
+ private boolean rateSet;
+ private int rate;
+
+ BuilderWithParent(OFQueuePropMinRateVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public int getType() {
+ return 0x1;
+ }
+
+ @Override
+ public int getRate() {
+ return rate;
+ }
+
+ @Override
+ public OFQueuePropMinRate.Builder setRate(int rate) {
+ this.rate = rate;
+ this.rateSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFQueuePropMinRate build() {
+ int rate = this.rateSet ? this.rate : parentMessage.rate;
+
+ //
+ return new OFQueuePropMinRateVer13(
+ rate
+ );
+ }
+
+ }
+
+ static class Builder implements OFQueuePropMinRate.Builder {
+ // OF message fields
+ private boolean rateSet;
+ private int rate;
+
+ @Override
+ public int getType() {
+ return 0x1;
+ }
+
+ @Override
+ public int getRate() {
+ return rate;
+ }
+
+ @Override
+ public OFQueuePropMinRate.Builder setRate(int rate) {
+ this.rate = rate;
+ this.rateSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFQueuePropMinRate build() {
+ int rate = this.rateSet ? this.rate : DEFAULT_RATE;
+
+
+ return new OFQueuePropMinRateVer13(
+ rate
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFQueuePropMinRate> {
+ @Override
+ public OFQueuePropMinRate readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 0x1
+ short type = bb.readShort();
+ if(type != (short) 0x1)
+ throw new OFParseError("Wrong type: Expected=0x1(0x1), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 16)
+ throw new OFParseError("Wrong length: Expected=16(16), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ int rate = U16.f(bb.readShort());
+ // pad: 6 bytes
+ bb.skipBytes(6);
+
+ OFQueuePropMinRateVer13 queuePropMinRateVer13 = new OFQueuePropMinRateVer13(
+ rate
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", queuePropMinRateVer13);
+ return queuePropMinRateVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFQueuePropMinRateVer13Funnel FUNNEL = new OFQueuePropMinRateVer13Funnel();
+ static class OFQueuePropMinRateVer13Funnel implements Funnel<OFQueuePropMinRateVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFQueuePropMinRateVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 0x1
+ sink.putShort((short) 0x1);
+ // fixed value property length = 16
+ sink.putShort((short) 0x10);
+ // skip pad (4 bytes)
+ sink.putInt(message.rate);
+ // skip pad (6 bytes)
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFQueuePropMinRateVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFQueuePropMinRateVer13 message) {
+ // fixed value property type = 0x1
+ bb.writeShort((short) 0x1);
+ // fixed value property length = 16
+ bb.writeShort((short) 0x10);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ bb.writeShort(U16.t(message.rate));
+ // pad: 6 bytes
+ bb.writeZero(6);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFQueuePropMinRateVer13(");
+ b.append("rate=").append(rate);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFQueuePropMinRateVer13 other = (OFQueuePropMinRateVer13) obj;
+
+ if( rate != other.rate)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + rate;
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFQueuePropVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFQueuePropVer13.java
new file mode 100644
index 0000000..1d9abc8
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFQueuePropVer13.java
@@ -0,0 +1,59 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_virtual_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.jboss.netty.buffer.ChannelBuffer;
+
+abstract class OFQueuePropVer13 {
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 8;
+
+
+ public final static OFQueuePropVer13.Reader READER = new Reader();
+
+ static class Reader implements OFMessageReader<OFQueueProp> {
+ @Override
+ public OFQueueProp readFrom(ChannelBuffer bb) throws OFParseError {
+ if(bb.readableBytes() < MINIMUM_LENGTH)
+ return null;
+ int start = bb.readerIndex();
+ short type = bb.readShort();
+ bb.readerIndex(start);
+ switch(type) {
+ case (short) 0x1:
+ // discriminator value 0x1=0x1 for class OFQueuePropMinRateVer13
+ return OFQueuePropMinRateVer13.READER.readFrom(bb);
+ case (short) 0xffff:
+ // discriminator value 0xffff=0xffff for class OFQueuePropExperimenterVer13
+ return OFQueuePropExperimenterVer13.READER.readFrom(bb);
+ case (short) 0x2:
+ // discriminator value 0x2=0x2 for class OFQueuePropMaxRateVer13
+ return OFQueuePropMaxRateVer13.READER.readFrom(bb);
+ default:
+ throw new OFParseError("Unknown value for discriminator type of class OFQueuePropVer13: " + type);
+ }
+ }
+ }
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFQueuePropertiesSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFQueuePropertiesSerializerVer13.java
new file mode 100644
index 0000000..b2899a4
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFQueuePropertiesSerializerVer13.java
@@ -0,0 +1,79 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFQueueProperties;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+
+public class OFQueuePropertiesSerializerVer13 {
+
+ public final static short MIN_RATE_VAL = (short) 0x1;
+ public final static short MAX_RATE_VAL = (short) 0x2;
+ public final static short EXPERIMENTER_VAL = (short) 0xffff;
+
+ public static OFQueueProperties readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readShort());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, OFQueueProperties e) {
+ bb.writeShort(toWireValue(e));
+ }
+
+ public static void putTo(OFQueueProperties e, PrimitiveSink sink) {
+ sink.putShort(toWireValue(e));
+ }
+
+ public static OFQueueProperties ofWireValue(short val) {
+ switch(val) {
+ case MIN_RATE_VAL:
+ return OFQueueProperties.MIN_RATE;
+ case MAX_RATE_VAL:
+ return OFQueueProperties.MAX_RATE;
+ case EXPERIMENTER_VAL:
+ return OFQueueProperties.EXPERIMENTER;
+ default:
+ throw new IllegalArgumentException("Illegal wire value for type OFQueueProperties in version 1.3: " + val);
+ }
+ }
+
+
+ public static short toWireValue(OFQueueProperties e) {
+ switch(e) {
+ case MIN_RATE:
+ return MIN_RATE_VAL;
+ case MAX_RATE:
+ return MAX_RATE_VAL;
+ case EXPERIMENTER:
+ return EXPERIMENTER_VAL;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFQueueProperties in version 1.3: " + e);
+ }
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFQueuePropsVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFQueuePropsVer13.java
new file mode 100644
index 0000000..96f1b3e
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFQueuePropsVer13.java
@@ -0,0 +1,60 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_factory_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+
+
+public class OFQueuePropsVer13 implements OFQueueProps {
+ public final static OFQueuePropsVer13 INSTANCE = new OFQueuePropsVer13();
+
+
+
+
+ public OFQueuePropMinRate.Builder buildMinRate() {
+ return new OFQueuePropMinRateVer13.Builder();
+ }
+ public OFQueuePropMinRate minRate(int rate) {
+ return new OFQueuePropMinRateVer13(
+ rate
+ );
+ }
+
+ public OFQueuePropMaxRate.Builder buildMaxRate() {
+ return new OFQueuePropMaxRateVer13.Builder();
+ }
+ public OFQueuePropMaxRate maxRate(int rate) {
+ return new OFQueuePropMaxRateVer13(
+ rate
+ );
+ }
+
+ public OFMessageReader<OFQueueProp> getReader() {
+ return OFQueuePropVer13.READER;
+ }
+
+
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFQueueStatsEntryVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFQueueStatsEntryVer13.java
new file mode 100644
index 0000000..10b9c3a
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFQueueStatsEntryVer13.java
@@ -0,0 +1,532 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFQueueStatsEntryVer13 implements OFQueueStatsEntry {
+ private static final Logger logger = LoggerFactory.getLogger(OFQueueStatsEntryVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 40;
+
+ private final static OFPort DEFAULT_PORT_NO = OFPort.ANY;
+ private final static long DEFAULT_QUEUE_ID = 0x0L;
+ private final static U64 DEFAULT_TX_BYTES = U64.ZERO;
+ private final static U64 DEFAULT_TX_PACKETS = U64.ZERO;
+ private final static U64 DEFAULT_TX_ERRORS = U64.ZERO;
+ private final static long DEFAULT_DURATION_SEC = 0x0L;
+ private final static long DEFAULT_DURATION_NSEC = 0x0L;
+
+ // OF message fields
+ private final OFPort portNo;
+ private final long queueId;
+ private final U64 txBytes;
+ private final U64 txPackets;
+ private final U64 txErrors;
+ private final long durationSec;
+ private final long durationNsec;
+//
+ // Immutable default instance
+ final static OFQueueStatsEntryVer13 DEFAULT = new OFQueueStatsEntryVer13(
+ DEFAULT_PORT_NO, DEFAULT_QUEUE_ID, DEFAULT_TX_BYTES, DEFAULT_TX_PACKETS, DEFAULT_TX_ERRORS, DEFAULT_DURATION_SEC, DEFAULT_DURATION_NSEC
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFQueueStatsEntryVer13(OFPort portNo, long queueId, U64 txBytes, U64 txPackets, U64 txErrors, long durationSec, long durationNsec) {
+ this.portNo = portNo;
+ this.queueId = queueId;
+ this.txBytes = txBytes;
+ this.txPackets = txPackets;
+ this.txErrors = txErrors;
+ this.durationSec = durationSec;
+ this.durationNsec = durationNsec;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public long getQueueId() {
+ return queueId;
+ }
+
+ @Override
+ public U64 getTxBytes() {
+ return txBytes;
+ }
+
+ @Override
+ public U64 getTxPackets() {
+ return txPackets;
+ }
+
+ @Override
+ public U64 getTxErrors() {
+ return txErrors;
+ }
+
+ @Override
+ public long getDurationSec() {
+ return durationSec;
+ }
+
+ @Override
+ public long getDurationNsec() {
+ return durationNsec;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFQueueStatsEntry.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFQueueStatsEntry.Builder {
+ final OFQueueStatsEntryVer13 parentMessage;
+
+ // OF message fields
+ private boolean portNoSet;
+ private OFPort portNo;
+ private boolean queueIdSet;
+ private long queueId;
+ private boolean txBytesSet;
+ private U64 txBytes;
+ private boolean txPacketsSet;
+ private U64 txPackets;
+ private boolean txErrorsSet;
+ private U64 txErrors;
+ private boolean durationSecSet;
+ private long durationSec;
+ private boolean durationNsecSet;
+ private long durationNsec;
+
+ BuilderWithParent(OFQueueStatsEntryVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public OFQueueStatsEntry.Builder setPortNo(OFPort portNo) {
+ this.portNo = portNo;
+ this.portNoSet = true;
+ return this;
+ }
+ @Override
+ public long getQueueId() {
+ return queueId;
+ }
+
+ @Override
+ public OFQueueStatsEntry.Builder setQueueId(long queueId) {
+ this.queueId = queueId;
+ this.queueIdSet = true;
+ return this;
+ }
+ @Override
+ public U64 getTxBytes() {
+ return txBytes;
+ }
+
+ @Override
+ public OFQueueStatsEntry.Builder setTxBytes(U64 txBytes) {
+ this.txBytes = txBytes;
+ this.txBytesSet = true;
+ return this;
+ }
+ @Override
+ public U64 getTxPackets() {
+ return txPackets;
+ }
+
+ @Override
+ public OFQueueStatsEntry.Builder setTxPackets(U64 txPackets) {
+ this.txPackets = txPackets;
+ this.txPacketsSet = true;
+ return this;
+ }
+ @Override
+ public U64 getTxErrors() {
+ return txErrors;
+ }
+
+ @Override
+ public OFQueueStatsEntry.Builder setTxErrors(U64 txErrors) {
+ this.txErrors = txErrors;
+ this.txErrorsSet = true;
+ return this;
+ }
+ @Override
+ public long getDurationSec() {
+ return durationSec;
+ }
+
+ @Override
+ public OFQueueStatsEntry.Builder setDurationSec(long durationSec) {
+ this.durationSec = durationSec;
+ this.durationSecSet = true;
+ return this;
+ }
+ @Override
+ public long getDurationNsec() {
+ return durationNsec;
+ }
+
+ @Override
+ public OFQueueStatsEntry.Builder setDurationNsec(long durationNsec) {
+ this.durationNsec = durationNsec;
+ this.durationNsecSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFQueueStatsEntry build() {
+ OFPort portNo = this.portNoSet ? this.portNo : parentMessage.portNo;
+ if(portNo == null)
+ throw new NullPointerException("Property portNo must not be null");
+ long queueId = this.queueIdSet ? this.queueId : parentMessage.queueId;
+ U64 txBytes = this.txBytesSet ? this.txBytes : parentMessage.txBytes;
+ if(txBytes == null)
+ throw new NullPointerException("Property txBytes must not be null");
+ U64 txPackets = this.txPacketsSet ? this.txPackets : parentMessage.txPackets;
+ if(txPackets == null)
+ throw new NullPointerException("Property txPackets must not be null");
+ U64 txErrors = this.txErrorsSet ? this.txErrors : parentMessage.txErrors;
+ if(txErrors == null)
+ throw new NullPointerException("Property txErrors must not be null");
+ long durationSec = this.durationSecSet ? this.durationSec : parentMessage.durationSec;
+ long durationNsec = this.durationNsecSet ? this.durationNsec : parentMessage.durationNsec;
+
+ //
+ return new OFQueueStatsEntryVer13(
+ portNo,
+ queueId,
+ txBytes,
+ txPackets,
+ txErrors,
+ durationSec,
+ durationNsec
+ );
+ }
+
+ }
+
+ static class Builder implements OFQueueStatsEntry.Builder {
+ // OF message fields
+ private boolean portNoSet;
+ private OFPort portNo;
+ private boolean queueIdSet;
+ private long queueId;
+ private boolean txBytesSet;
+ private U64 txBytes;
+ private boolean txPacketsSet;
+ private U64 txPackets;
+ private boolean txErrorsSet;
+ private U64 txErrors;
+ private boolean durationSecSet;
+ private long durationSec;
+ private boolean durationNsecSet;
+ private long durationNsec;
+
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public OFQueueStatsEntry.Builder setPortNo(OFPort portNo) {
+ this.portNo = portNo;
+ this.portNoSet = true;
+ return this;
+ }
+ @Override
+ public long getQueueId() {
+ return queueId;
+ }
+
+ @Override
+ public OFQueueStatsEntry.Builder setQueueId(long queueId) {
+ this.queueId = queueId;
+ this.queueIdSet = true;
+ return this;
+ }
+ @Override
+ public U64 getTxBytes() {
+ return txBytes;
+ }
+
+ @Override
+ public OFQueueStatsEntry.Builder setTxBytes(U64 txBytes) {
+ this.txBytes = txBytes;
+ this.txBytesSet = true;
+ return this;
+ }
+ @Override
+ public U64 getTxPackets() {
+ return txPackets;
+ }
+
+ @Override
+ public OFQueueStatsEntry.Builder setTxPackets(U64 txPackets) {
+ this.txPackets = txPackets;
+ this.txPacketsSet = true;
+ return this;
+ }
+ @Override
+ public U64 getTxErrors() {
+ return txErrors;
+ }
+
+ @Override
+ public OFQueueStatsEntry.Builder setTxErrors(U64 txErrors) {
+ this.txErrors = txErrors;
+ this.txErrorsSet = true;
+ return this;
+ }
+ @Override
+ public long getDurationSec() {
+ return durationSec;
+ }
+
+ @Override
+ public OFQueueStatsEntry.Builder setDurationSec(long durationSec) {
+ this.durationSec = durationSec;
+ this.durationSecSet = true;
+ return this;
+ }
+ @Override
+ public long getDurationNsec() {
+ return durationNsec;
+ }
+
+ @Override
+ public OFQueueStatsEntry.Builder setDurationNsec(long durationNsec) {
+ this.durationNsec = durationNsec;
+ this.durationNsecSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFQueueStatsEntry build() {
+ OFPort portNo = this.portNoSet ? this.portNo : DEFAULT_PORT_NO;
+ if(portNo == null)
+ throw new NullPointerException("Property portNo must not be null");
+ long queueId = this.queueIdSet ? this.queueId : DEFAULT_QUEUE_ID;
+ U64 txBytes = this.txBytesSet ? this.txBytes : DEFAULT_TX_BYTES;
+ if(txBytes == null)
+ throw new NullPointerException("Property txBytes must not be null");
+ U64 txPackets = this.txPacketsSet ? this.txPackets : DEFAULT_TX_PACKETS;
+ if(txPackets == null)
+ throw new NullPointerException("Property txPackets must not be null");
+ U64 txErrors = this.txErrorsSet ? this.txErrors : DEFAULT_TX_ERRORS;
+ if(txErrors == null)
+ throw new NullPointerException("Property txErrors must not be null");
+ long durationSec = this.durationSecSet ? this.durationSec : DEFAULT_DURATION_SEC;
+ long durationNsec = this.durationNsecSet ? this.durationNsec : DEFAULT_DURATION_NSEC;
+
+
+ return new OFQueueStatsEntryVer13(
+ portNo,
+ queueId,
+ txBytes,
+ txPackets,
+ txErrors,
+ durationSec,
+ durationNsec
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFQueueStatsEntry> {
+ @Override
+ public OFQueueStatsEntry readFrom(ChannelBuffer bb) throws OFParseError {
+ OFPort portNo = OFPort.read4Bytes(bb);
+ long queueId = U32.f(bb.readInt());
+ U64 txBytes = U64.ofRaw(bb.readLong());
+ U64 txPackets = U64.ofRaw(bb.readLong());
+ U64 txErrors = U64.ofRaw(bb.readLong());
+ long durationSec = U32.f(bb.readInt());
+ long durationNsec = U32.f(bb.readInt());
+
+ OFQueueStatsEntryVer13 queueStatsEntryVer13 = new OFQueueStatsEntryVer13(
+ portNo,
+ queueId,
+ txBytes,
+ txPackets,
+ txErrors,
+ durationSec,
+ durationNsec
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", queueStatsEntryVer13);
+ return queueStatsEntryVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFQueueStatsEntryVer13Funnel FUNNEL = new OFQueueStatsEntryVer13Funnel();
+ static class OFQueueStatsEntryVer13Funnel implements Funnel<OFQueueStatsEntryVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFQueueStatsEntryVer13 message, PrimitiveSink sink) {
+ message.portNo.putTo(sink);
+ sink.putLong(message.queueId);
+ message.txBytes.putTo(sink);
+ message.txPackets.putTo(sink);
+ message.txErrors.putTo(sink);
+ sink.putLong(message.durationSec);
+ sink.putLong(message.durationNsec);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFQueueStatsEntryVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFQueueStatsEntryVer13 message) {
+ message.portNo.write4Bytes(bb);
+ bb.writeInt(U32.t(message.queueId));
+ bb.writeLong(message.txBytes.getValue());
+ bb.writeLong(message.txPackets.getValue());
+ bb.writeLong(message.txErrors.getValue());
+ bb.writeInt(U32.t(message.durationSec));
+ bb.writeInt(U32.t(message.durationNsec));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFQueueStatsEntryVer13(");
+ b.append("portNo=").append(portNo);
+ b.append(", ");
+ b.append("queueId=").append(queueId);
+ b.append(", ");
+ b.append("txBytes=").append(txBytes);
+ b.append(", ");
+ b.append("txPackets=").append(txPackets);
+ b.append(", ");
+ b.append("txErrors=").append(txErrors);
+ b.append(", ");
+ b.append("durationSec=").append(durationSec);
+ b.append(", ");
+ b.append("durationNsec=").append(durationNsec);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFQueueStatsEntryVer13 other = (OFQueueStatsEntryVer13) obj;
+
+ if (portNo == null) {
+ if (other.portNo != null)
+ return false;
+ } else if (!portNo.equals(other.portNo))
+ return false;
+ if( queueId != other.queueId)
+ return false;
+ if (txBytes == null) {
+ if (other.txBytes != null)
+ return false;
+ } else if (!txBytes.equals(other.txBytes))
+ return false;
+ if (txPackets == null) {
+ if (other.txPackets != null)
+ return false;
+ } else if (!txPackets.equals(other.txPackets))
+ return false;
+ if (txErrors == null) {
+ if (other.txErrors != null)
+ return false;
+ } else if (!txErrors.equals(other.txErrors))
+ return false;
+ if( durationSec != other.durationSec)
+ return false;
+ if( durationNsec != other.durationNsec)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((portNo == null) ? 0 : portNo.hashCode());
+ result = prime * (int) (queueId ^ (queueId >>> 32));
+ result = prime * result + ((txBytes == null) ? 0 : txBytes.hashCode());
+ result = prime * result + ((txPackets == null) ? 0 : txPackets.hashCode());
+ result = prime * result + ((txErrors == null) ? 0 : txErrors.hashCode());
+ result = prime * (int) (durationSec ^ (durationSec >>> 32));
+ result = prime * (int) (durationNsec ^ (durationNsec >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFQueueStatsReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFQueueStatsReplyVer13.java
new file mode 100644
index 0000000..c9353be
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFQueueStatsReplyVer13.java
@@ -0,0 +1,412 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFQueueStatsReplyVer13 implements OFQueueStatsReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFQueueStatsReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 16;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsReplyFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsReplyFlags>of();
+ private final static List<OFQueueStatsEntry> DEFAULT_ENTRIES = ImmutableList.<OFQueueStatsEntry>of();
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsReplyFlags> flags;
+ private final List<OFQueueStatsEntry> entries;
+//
+ // Immutable default instance
+ final static OFQueueStatsReplyVer13 DEFAULT = new OFQueueStatsReplyVer13(
+ DEFAULT_XID, DEFAULT_FLAGS, DEFAULT_ENTRIES
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFQueueStatsReplyVer13(long xid, Set<OFStatsReplyFlags> flags, List<OFQueueStatsEntry> entries) {
+ this.xid = xid;
+ this.flags = flags;
+ this.entries = entries;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.QUEUE;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public List<OFQueueStatsEntry> getEntries() {
+ return entries;
+ }
+
+
+
+ public OFQueueStatsReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFQueueStatsReply.Builder {
+ final OFQueueStatsReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean entriesSet;
+ private List<OFQueueStatsEntry> entries;
+
+ BuilderWithParent(OFQueueStatsReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFQueueStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.QUEUE;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFQueueStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public List<OFQueueStatsEntry> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFQueueStatsReply.Builder setEntries(List<OFQueueStatsEntry> entries) {
+ this.entries = entries;
+ this.entriesSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFQueueStatsReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ List<OFQueueStatsEntry> entries = this.entriesSet ? this.entries : parentMessage.entries;
+ if(entries == null)
+ throw new NullPointerException("Property entries must not be null");
+
+ //
+ return new OFQueueStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ }
+
+ }
+
+ static class Builder implements OFQueueStatsReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean entriesSet;
+ private List<OFQueueStatsEntry> entries;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFQueueStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.QUEUE;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFQueueStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public List<OFQueueStatsEntry> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFQueueStatsReply.Builder setEntries(List<OFQueueStatsEntry> entries) {
+ this.entries = entries;
+ this.entriesSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFQueueStatsReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ List<OFQueueStatsEntry> entries = this.entriesSet ? this.entries : DEFAULT_ENTRIES;
+ if(entries == null)
+ throw new NullPointerException("Property entries must not be null");
+
+
+ return new OFQueueStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFQueueStatsReply> {
+ @Override
+ public OFQueueStatsReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 19
+ byte type = bb.readByte();
+ if(type != (byte) 0x13)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REPLY(19), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 5
+ short statsType = bb.readShort();
+ if(statsType != (short) 0x5)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.QUEUE(5), got="+statsType);
+ Set<OFStatsReplyFlags> flags = OFStatsReplyFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ List<OFQueueStatsEntry> entries = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFQueueStatsEntryVer13.READER);
+
+ OFQueueStatsReplyVer13 queueStatsReplyVer13 = new OFQueueStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", queueStatsReplyVer13);
+ return queueStatsReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFQueueStatsReplyVer13Funnel FUNNEL = new OFQueueStatsReplyVer13Funnel();
+ static class OFQueueStatsReplyVer13Funnel implements Funnel<OFQueueStatsReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFQueueStatsReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 19
+ sink.putByte((byte) 0x13);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property statsType = 5
+ sink.putShort((short) 0x5);
+ OFStatsReplyFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ FunnelUtils.putList(message.entries, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFQueueStatsReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFQueueStatsReplyVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 19
+ bb.writeByte((byte) 0x13);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 5
+ bb.writeShort((short) 0x5);
+ OFStatsReplyFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ ChannelUtils.writeList(bb, message.entries);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFQueueStatsReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("entries=").append(entries);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFQueueStatsReplyVer13 other = (OFQueueStatsReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if (entries == null) {
+ if (other.entries != null)
+ return false;
+ } else if (!entries.equals(other.entries))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * result + ((entries == null) ? 0 : entries.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFQueueStatsRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFQueueStatsRequestVer13.java
new file mode 100644
index 0000000..c7c6829
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFQueueStatsRequestVer13.java
@@ -0,0 +1,452 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFQueueStatsRequestVer13 implements OFQueueStatsRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFQueueStatsRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 24;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsRequestFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsRequestFlags>of();
+ private final static OFPort DEFAULT_PORT_NO = OFPort.ANY;
+ private final static long DEFAULT_QUEUE_ID = 0x0L;
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsRequestFlags> flags;
+ private final OFPort portNo;
+ private final long queueId;
+//
+ // Immutable default instance
+ final static OFQueueStatsRequestVer13 DEFAULT = new OFQueueStatsRequestVer13(
+ DEFAULT_XID, DEFAULT_FLAGS, DEFAULT_PORT_NO, DEFAULT_QUEUE_ID
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFQueueStatsRequestVer13(long xid, Set<OFStatsRequestFlags> flags, OFPort portNo, long queueId) {
+ this.xid = xid;
+ this.flags = flags;
+ this.portNo = portNo;
+ this.queueId = queueId;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.QUEUE;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public long getQueueId() {
+ return queueId;
+ }
+
+
+
+ public OFQueueStatsRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFQueueStatsRequest.Builder {
+ final OFQueueStatsRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+ private boolean portNoSet;
+ private OFPort portNo;
+ private boolean queueIdSet;
+ private long queueId;
+
+ BuilderWithParent(OFQueueStatsRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFQueueStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.QUEUE;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFQueueStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public OFQueueStatsRequest.Builder setPortNo(OFPort portNo) {
+ this.portNo = portNo;
+ this.portNoSet = true;
+ return this;
+ }
+ @Override
+ public long getQueueId() {
+ return queueId;
+ }
+
+ @Override
+ public OFQueueStatsRequest.Builder setQueueId(long queueId) {
+ this.queueId = queueId;
+ this.queueIdSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFQueueStatsRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ OFPort portNo = this.portNoSet ? this.portNo : parentMessage.portNo;
+ if(portNo == null)
+ throw new NullPointerException("Property portNo must not be null");
+ long queueId = this.queueIdSet ? this.queueId : parentMessage.queueId;
+
+ //
+ return new OFQueueStatsRequestVer13(
+ xid,
+ flags,
+ portNo,
+ queueId
+ );
+ }
+
+ }
+
+ static class Builder implements OFQueueStatsRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+ private boolean portNoSet;
+ private OFPort portNo;
+ private boolean queueIdSet;
+ private long queueId;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFQueueStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.QUEUE;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFQueueStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public OFPort getPortNo() {
+ return portNo;
+ }
+
+ @Override
+ public OFQueueStatsRequest.Builder setPortNo(OFPort portNo) {
+ this.portNo = portNo;
+ this.portNoSet = true;
+ return this;
+ }
+ @Override
+ public long getQueueId() {
+ return queueId;
+ }
+
+ @Override
+ public OFQueueStatsRequest.Builder setQueueId(long queueId) {
+ this.queueId = queueId;
+ this.queueIdSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFQueueStatsRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ OFPort portNo = this.portNoSet ? this.portNo : DEFAULT_PORT_NO;
+ if(portNo == null)
+ throw new NullPointerException("Property portNo must not be null");
+ long queueId = this.queueIdSet ? this.queueId : DEFAULT_QUEUE_ID;
+
+
+ return new OFQueueStatsRequestVer13(
+ xid,
+ flags,
+ portNo,
+ queueId
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFQueueStatsRequest> {
+ @Override
+ public OFQueueStatsRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 18
+ byte type = bb.readByte();
+ if(type != (byte) 0x12)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REQUEST(18), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 24)
+ throw new OFParseError("Wrong length: Expected=24(24), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 5
+ short statsType = bb.readShort();
+ if(statsType != (short) 0x5)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.QUEUE(5), got="+statsType);
+ Set<OFStatsRequestFlags> flags = OFStatsRequestFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ OFPort portNo = OFPort.read4Bytes(bb);
+ long queueId = U32.f(bb.readInt());
+
+ OFQueueStatsRequestVer13 queueStatsRequestVer13 = new OFQueueStatsRequestVer13(
+ xid,
+ flags,
+ portNo,
+ queueId
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", queueStatsRequestVer13);
+ return queueStatsRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFQueueStatsRequestVer13Funnel FUNNEL = new OFQueueStatsRequestVer13Funnel();
+ static class OFQueueStatsRequestVer13Funnel implements Funnel<OFQueueStatsRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFQueueStatsRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 18
+ sink.putByte((byte) 0x12);
+ // fixed value property length = 24
+ sink.putShort((short) 0x18);
+ sink.putLong(message.xid);
+ // fixed value property statsType = 5
+ sink.putShort((short) 0x5);
+ OFStatsRequestFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ message.portNo.putTo(sink);
+ sink.putLong(message.queueId);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFQueueStatsRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFQueueStatsRequestVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 18
+ bb.writeByte((byte) 0x12);
+ // fixed value property length = 24
+ bb.writeShort((short) 0x18);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 5
+ bb.writeShort((short) 0x5);
+ OFStatsRequestFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ message.portNo.write4Bytes(bb);
+ bb.writeInt(U32.t(message.queueId));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFQueueStatsRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("portNo=").append(portNo);
+ b.append(", ");
+ b.append("queueId=").append(queueId);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFQueueStatsRequestVer13 other = (OFQueueStatsRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if (portNo == null) {
+ if (other.portNo != null)
+ return false;
+ } else if (!portNo.equals(other.portNo))
+ return false;
+ if( queueId != other.queueId)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * result + ((portNo == null) ? 0 : portNo.hashCode());
+ result = prime * (int) (queueId ^ (queueId >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFRoleReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFRoleReplyVer13.java
new file mode 100644
index 0000000..a04b292
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFRoleReplyVer13.java
@@ -0,0 +1,377 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFRoleReplyVer13 implements OFRoleReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFRoleReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 24;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static U64 DEFAULT_GENERATION_ID = U64.ZERO;
+
+ // OF message fields
+ private final long xid;
+ private final OFControllerRole role;
+ private final U64 generationId;
+//
+
+ // package private constructor - used by readers, builders, and factory
+ OFRoleReplyVer13(long xid, OFControllerRole role, U64 generationId) {
+ this.xid = xid;
+ this.role = role;
+ this.generationId = generationId;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ROLE_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFControllerRole getRole() {
+ return role;
+ }
+
+ @Override
+ public U64 getGenerationId() {
+ return generationId;
+ }
+
+
+
+ public OFRoleReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFRoleReply.Builder {
+ final OFRoleReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean roleSet;
+ private OFControllerRole role;
+ private boolean generationIdSet;
+ private U64 generationId;
+
+ BuilderWithParent(OFRoleReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ROLE_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFRoleReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFControllerRole getRole() {
+ return role;
+ }
+
+ @Override
+ public OFRoleReply.Builder setRole(OFControllerRole role) {
+ this.role = role;
+ this.roleSet = true;
+ return this;
+ }
+ @Override
+ public U64 getGenerationId() {
+ return generationId;
+ }
+
+ @Override
+ public OFRoleReply.Builder setGenerationId(U64 generationId) {
+ this.generationId = generationId;
+ this.generationIdSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFRoleReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ OFControllerRole role = this.roleSet ? this.role : parentMessage.role;
+ if(role == null)
+ throw new NullPointerException("Property role must not be null");
+ U64 generationId = this.generationIdSet ? this.generationId : parentMessage.generationId;
+ if(generationId == null)
+ throw new NullPointerException("Property generationId must not be null");
+
+ //
+ return new OFRoleReplyVer13(
+ xid,
+ role,
+ generationId
+ );
+ }
+
+ }
+
+ static class Builder implements OFRoleReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean roleSet;
+ private OFControllerRole role;
+ private boolean generationIdSet;
+ private U64 generationId;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ROLE_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFRoleReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFControllerRole getRole() {
+ return role;
+ }
+
+ @Override
+ public OFRoleReply.Builder setRole(OFControllerRole role) {
+ this.role = role;
+ this.roleSet = true;
+ return this;
+ }
+ @Override
+ public U64 getGenerationId() {
+ return generationId;
+ }
+
+ @Override
+ public OFRoleReply.Builder setGenerationId(U64 generationId) {
+ this.generationId = generationId;
+ this.generationIdSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFRoleReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ if(!this.roleSet)
+ throw new IllegalStateException("Property role doesn't have default value -- must be set");
+ if(role == null)
+ throw new NullPointerException("Property role must not be null");
+ U64 generationId = this.generationIdSet ? this.generationId : DEFAULT_GENERATION_ID;
+ if(generationId == null)
+ throw new NullPointerException("Property generationId must not be null");
+
+
+ return new OFRoleReplyVer13(
+ xid,
+ role,
+ generationId
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFRoleReply> {
+ @Override
+ public OFRoleReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 25
+ byte type = bb.readByte();
+ if(type != (byte) 0x19)
+ throw new OFParseError("Wrong type: Expected=OFType.ROLE_REPLY(25), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 24)
+ throw new OFParseError("Wrong length: Expected=24(24), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ OFControllerRole role = OFControllerRoleSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ U64 generationId = U64.ofRaw(bb.readLong());
+
+ OFRoleReplyVer13 roleReplyVer13 = new OFRoleReplyVer13(
+ xid,
+ role,
+ generationId
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", roleReplyVer13);
+ return roleReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFRoleReplyVer13Funnel FUNNEL = new OFRoleReplyVer13Funnel();
+ static class OFRoleReplyVer13Funnel implements Funnel<OFRoleReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFRoleReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 25
+ sink.putByte((byte) 0x19);
+ // fixed value property length = 24
+ sink.putShort((short) 0x18);
+ sink.putLong(message.xid);
+ OFControllerRoleSerializerVer13.putTo(message.role, sink);
+ // skip pad (4 bytes)
+ message.generationId.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFRoleReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFRoleReplyVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 25
+ bb.writeByte((byte) 0x19);
+ // fixed value property length = 24
+ bb.writeShort((short) 0x18);
+ bb.writeInt(U32.t(message.xid));
+ OFControllerRoleSerializerVer13.writeTo(bb, message.role);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ bb.writeLong(message.generationId.getValue());
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFRoleReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("role=").append(role);
+ b.append(", ");
+ b.append("generationId=").append(generationId);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFRoleReplyVer13 other = (OFRoleReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (role == null) {
+ if (other.role != null)
+ return false;
+ } else if (!role.equals(other.role))
+ return false;
+ if (generationId == null) {
+ if (other.generationId != null)
+ return false;
+ } else if (!generationId.equals(other.generationId))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((role == null) ? 0 : role.hashCode());
+ result = prime * result + ((generationId == null) ? 0 : generationId.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFRoleRequestFailedCodeSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFRoleRequestFailedCodeSerializerVer13.java
new file mode 100644
index 0000000..bd07134
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFRoleRequestFailedCodeSerializerVer13.java
@@ -0,0 +1,79 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFRoleRequestFailedCode;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+
+public class OFRoleRequestFailedCodeSerializerVer13 {
+
+ public final static short STALE_VAL = (short) 0x0;
+ public final static short UNSUP_VAL = (short) 0x1;
+ public final static short BAD_ROLE_VAL = (short) 0x2;
+
+ public static OFRoleRequestFailedCode readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readShort());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, OFRoleRequestFailedCode e) {
+ bb.writeShort(toWireValue(e));
+ }
+
+ public static void putTo(OFRoleRequestFailedCode e, PrimitiveSink sink) {
+ sink.putShort(toWireValue(e));
+ }
+
+ public static OFRoleRequestFailedCode ofWireValue(short val) {
+ switch(val) {
+ case STALE_VAL:
+ return OFRoleRequestFailedCode.STALE;
+ case UNSUP_VAL:
+ return OFRoleRequestFailedCode.UNSUP;
+ case BAD_ROLE_VAL:
+ return OFRoleRequestFailedCode.BAD_ROLE;
+ default:
+ throw new IllegalArgumentException("Illegal wire value for type OFRoleRequestFailedCode in version 1.3: " + val);
+ }
+ }
+
+
+ public static short toWireValue(OFRoleRequestFailedCode e) {
+ switch(e) {
+ case STALE:
+ return STALE_VAL;
+ case UNSUP:
+ return UNSUP_VAL;
+ case BAD_ROLE:
+ return BAD_ROLE_VAL;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFRoleRequestFailedCode in version 1.3: " + e);
+ }
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFRoleRequestFailedErrorMsgVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFRoleRequestFailedErrorMsgVer13.java
new file mode 100644
index 0000000..8456374
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFRoleRequestFailedErrorMsgVer13.java
@@ -0,0 +1,400 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFRoleRequestFailedErrorMsgVer13 implements OFRoleRequestFailedErrorMsg {
+ private static final Logger logger = LoggerFactory.getLogger(OFRoleRequestFailedErrorMsgVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 12;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static OFErrorCauseData DEFAULT_DATA = OFErrorCauseData.NONE;
+
+ // OF message fields
+ private final long xid;
+ private final OFRoleRequestFailedCode code;
+ private final OFErrorCauseData data;
+//
+
+ // package private constructor - used by readers, builders, and factory
+ OFRoleRequestFailedErrorMsgVer13(long xid, OFRoleRequestFailedCode code, OFErrorCauseData data) {
+ this.xid = xid;
+ this.code = code;
+ this.data = data;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ERROR;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFErrorType getErrType() {
+ return OFErrorType.ROLE_REQUEST_FAILED;
+ }
+
+ @Override
+ public OFRoleRequestFailedCode getCode() {
+ return code;
+ }
+
+ @Override
+ public OFErrorCauseData getData() {
+ return data;
+ }
+
+
+
+ public OFRoleRequestFailedErrorMsg.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFRoleRequestFailedErrorMsg.Builder {
+ final OFRoleRequestFailedErrorMsgVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean codeSet;
+ private OFRoleRequestFailedCode code;
+ private boolean dataSet;
+ private OFErrorCauseData data;
+
+ BuilderWithParent(OFRoleRequestFailedErrorMsgVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ERROR;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFRoleRequestFailedErrorMsg.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorType getErrType() {
+ return OFErrorType.ROLE_REQUEST_FAILED;
+ }
+
+ @Override
+ public OFRoleRequestFailedCode getCode() {
+ return code;
+ }
+
+ @Override
+ public OFRoleRequestFailedErrorMsg.Builder setCode(OFRoleRequestFailedCode code) {
+ this.code = code;
+ this.codeSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorCauseData getData() {
+ return data;
+ }
+
+ @Override
+ public OFRoleRequestFailedErrorMsg.Builder setData(OFErrorCauseData data) {
+ this.data = data;
+ this.dataSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFRoleRequestFailedErrorMsg build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ OFRoleRequestFailedCode code = this.codeSet ? this.code : parentMessage.code;
+ if(code == null)
+ throw new NullPointerException("Property code must not be null");
+ OFErrorCauseData data = this.dataSet ? this.data : parentMessage.data;
+ if(data == null)
+ throw new NullPointerException("Property data must not be null");
+
+ //
+ return new OFRoleRequestFailedErrorMsgVer13(
+ xid,
+ code,
+ data
+ );
+ }
+
+ }
+
+ static class Builder implements OFRoleRequestFailedErrorMsg.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean codeSet;
+ private OFRoleRequestFailedCode code;
+ private boolean dataSet;
+ private OFErrorCauseData data;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ERROR;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFRoleRequestFailedErrorMsg.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorType getErrType() {
+ return OFErrorType.ROLE_REQUEST_FAILED;
+ }
+
+ @Override
+ public OFRoleRequestFailedCode getCode() {
+ return code;
+ }
+
+ @Override
+ public OFRoleRequestFailedErrorMsg.Builder setCode(OFRoleRequestFailedCode code) {
+ this.code = code;
+ this.codeSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorCauseData getData() {
+ return data;
+ }
+
+ @Override
+ public OFRoleRequestFailedErrorMsg.Builder setData(OFErrorCauseData data) {
+ this.data = data;
+ this.dataSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFRoleRequestFailedErrorMsg build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ if(!this.codeSet)
+ throw new IllegalStateException("Property code doesn't have default value -- must be set");
+ if(code == null)
+ throw new NullPointerException("Property code must not be null");
+ OFErrorCauseData data = this.dataSet ? this.data : DEFAULT_DATA;
+ if(data == null)
+ throw new NullPointerException("Property data must not be null");
+
+
+ return new OFRoleRequestFailedErrorMsgVer13(
+ xid,
+ code,
+ data
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFRoleRequestFailedErrorMsg> {
+ @Override
+ public OFRoleRequestFailedErrorMsg readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 1
+ byte type = bb.readByte();
+ if(type != (byte) 0x1)
+ throw new OFParseError("Wrong type: Expected=OFType.ERROR(1), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property errType == 11
+ short errType = bb.readShort();
+ if(errType != (short) 0xb)
+ throw new OFParseError("Wrong errType: Expected=OFErrorType.ROLE_REQUEST_FAILED(11), got="+errType);
+ OFRoleRequestFailedCode code = OFRoleRequestFailedCodeSerializerVer13.readFrom(bb);
+ OFErrorCauseData data = OFErrorCauseData.read(bb, length - (bb.readerIndex() - start), OFVersion.OF_13);
+
+ OFRoleRequestFailedErrorMsgVer13 roleRequestFailedErrorMsgVer13 = new OFRoleRequestFailedErrorMsgVer13(
+ xid,
+ code,
+ data
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", roleRequestFailedErrorMsgVer13);
+ return roleRequestFailedErrorMsgVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFRoleRequestFailedErrorMsgVer13Funnel FUNNEL = new OFRoleRequestFailedErrorMsgVer13Funnel();
+ static class OFRoleRequestFailedErrorMsgVer13Funnel implements Funnel<OFRoleRequestFailedErrorMsgVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFRoleRequestFailedErrorMsgVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 1
+ sink.putByte((byte) 0x1);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property errType = 11
+ sink.putShort((short) 0xb);
+ OFRoleRequestFailedCodeSerializerVer13.putTo(message.code, sink);
+ message.data.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFRoleRequestFailedErrorMsgVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFRoleRequestFailedErrorMsgVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 1
+ bb.writeByte((byte) 0x1);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property errType = 11
+ bb.writeShort((short) 0xb);
+ OFRoleRequestFailedCodeSerializerVer13.writeTo(bb, message.code);
+ message.data.writeTo(bb);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFRoleRequestFailedErrorMsgVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("code=").append(code);
+ b.append(", ");
+ b.append("data=").append(data);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFRoleRequestFailedErrorMsgVer13 other = (OFRoleRequestFailedErrorMsgVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (code == null) {
+ if (other.code != null)
+ return false;
+ } else if (!code.equals(other.code))
+ return false;
+ if (data == null) {
+ if (other.data != null)
+ return false;
+ } else if (!data.equals(other.data))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((code == null) ? 0 : code.hashCode());
+ result = prime * result + ((data == null) ? 0 : data.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFRoleRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFRoleRequestVer13.java
new file mode 100644
index 0000000..b864496
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFRoleRequestVer13.java
@@ -0,0 +1,377 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFRoleRequestVer13 implements OFRoleRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFRoleRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 24;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static U64 DEFAULT_GENERATION_ID = U64.ZERO;
+
+ // OF message fields
+ private final long xid;
+ private final OFControllerRole role;
+ private final U64 generationId;
+//
+
+ // package private constructor - used by readers, builders, and factory
+ OFRoleRequestVer13(long xid, OFControllerRole role, U64 generationId) {
+ this.xid = xid;
+ this.role = role;
+ this.generationId = generationId;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ROLE_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFControllerRole getRole() {
+ return role;
+ }
+
+ @Override
+ public U64 getGenerationId() {
+ return generationId;
+ }
+
+
+
+ public OFRoleRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFRoleRequest.Builder {
+ final OFRoleRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean roleSet;
+ private OFControllerRole role;
+ private boolean generationIdSet;
+ private U64 generationId;
+
+ BuilderWithParent(OFRoleRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ROLE_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFRoleRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFControllerRole getRole() {
+ return role;
+ }
+
+ @Override
+ public OFRoleRequest.Builder setRole(OFControllerRole role) {
+ this.role = role;
+ this.roleSet = true;
+ return this;
+ }
+ @Override
+ public U64 getGenerationId() {
+ return generationId;
+ }
+
+ @Override
+ public OFRoleRequest.Builder setGenerationId(U64 generationId) {
+ this.generationId = generationId;
+ this.generationIdSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFRoleRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ OFControllerRole role = this.roleSet ? this.role : parentMessage.role;
+ if(role == null)
+ throw new NullPointerException("Property role must not be null");
+ U64 generationId = this.generationIdSet ? this.generationId : parentMessage.generationId;
+ if(generationId == null)
+ throw new NullPointerException("Property generationId must not be null");
+
+ //
+ return new OFRoleRequestVer13(
+ xid,
+ role,
+ generationId
+ );
+ }
+
+ }
+
+ static class Builder implements OFRoleRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean roleSet;
+ private OFControllerRole role;
+ private boolean generationIdSet;
+ private U64 generationId;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ROLE_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFRoleRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFControllerRole getRole() {
+ return role;
+ }
+
+ @Override
+ public OFRoleRequest.Builder setRole(OFControllerRole role) {
+ this.role = role;
+ this.roleSet = true;
+ return this;
+ }
+ @Override
+ public U64 getGenerationId() {
+ return generationId;
+ }
+
+ @Override
+ public OFRoleRequest.Builder setGenerationId(U64 generationId) {
+ this.generationId = generationId;
+ this.generationIdSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFRoleRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ if(!this.roleSet)
+ throw new IllegalStateException("Property role doesn't have default value -- must be set");
+ if(role == null)
+ throw new NullPointerException("Property role must not be null");
+ U64 generationId = this.generationIdSet ? this.generationId : DEFAULT_GENERATION_ID;
+ if(generationId == null)
+ throw new NullPointerException("Property generationId must not be null");
+
+
+ return new OFRoleRequestVer13(
+ xid,
+ role,
+ generationId
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFRoleRequest> {
+ @Override
+ public OFRoleRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 24
+ byte type = bb.readByte();
+ if(type != (byte) 0x18)
+ throw new OFParseError("Wrong type: Expected=OFType.ROLE_REQUEST(24), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 24)
+ throw new OFParseError("Wrong length: Expected=24(24), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ OFControllerRole role = OFControllerRoleSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ U64 generationId = U64.ofRaw(bb.readLong());
+
+ OFRoleRequestVer13 roleRequestVer13 = new OFRoleRequestVer13(
+ xid,
+ role,
+ generationId
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", roleRequestVer13);
+ return roleRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFRoleRequestVer13Funnel FUNNEL = new OFRoleRequestVer13Funnel();
+ static class OFRoleRequestVer13Funnel implements Funnel<OFRoleRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFRoleRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 24
+ sink.putByte((byte) 0x18);
+ // fixed value property length = 24
+ sink.putShort((short) 0x18);
+ sink.putLong(message.xid);
+ OFControllerRoleSerializerVer13.putTo(message.role, sink);
+ // skip pad (4 bytes)
+ message.generationId.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFRoleRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFRoleRequestVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 24
+ bb.writeByte((byte) 0x18);
+ // fixed value property length = 24
+ bb.writeShort((short) 0x18);
+ bb.writeInt(U32.t(message.xid));
+ OFControllerRoleSerializerVer13.writeTo(bb, message.role);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ bb.writeLong(message.generationId.getValue());
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFRoleRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("role=").append(role);
+ b.append(", ");
+ b.append("generationId=").append(generationId);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFRoleRequestVer13 other = (OFRoleRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (role == null) {
+ if (other.role != null)
+ return false;
+ } else if (!role.equals(other.role))
+ return false;
+ if (generationId == null) {
+ if (other.generationId != null)
+ return false;
+ } else if (!generationId.equals(other.generationId))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((role == null) ? 0 : role.hashCode());
+ result = prime * result + ((generationId == null) ? 0 : generationId.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFSetConfigVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFSetConfigVer13.java
new file mode 100644
index 0000000..49a1cb3
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFSetConfigVer13.java
@@ -0,0 +1,370 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import java.util.Set;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import com.google.common.collect.ImmutableSet;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFSetConfigVer13 implements OFSetConfig {
+ private static final Logger logger = LoggerFactory.getLogger(OFSetConfigVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 12;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFConfigFlags> DEFAULT_FLAGS = ImmutableSet.<OFConfigFlags>of();
+ private final static int DEFAULT_MISS_SEND_LEN = 0x0;
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFConfigFlags> flags;
+ private final int missSendLen;
+//
+ // Immutable default instance
+ final static OFSetConfigVer13 DEFAULT = new OFSetConfigVer13(
+ DEFAULT_XID, DEFAULT_FLAGS, DEFAULT_MISS_SEND_LEN
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFSetConfigVer13(long xid, Set<OFConfigFlags> flags, int missSendLen) {
+ this.xid = xid;
+ this.flags = flags;
+ this.missSendLen = missSendLen;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.SET_CONFIG;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public Set<OFConfigFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public int getMissSendLen() {
+ return missSendLen;
+ }
+
+
+
+ public OFSetConfig.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFSetConfig.Builder {
+ final OFSetConfigVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFConfigFlags> flags;
+ private boolean missSendLenSet;
+ private int missSendLen;
+
+ BuilderWithParent(OFSetConfigVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.SET_CONFIG;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFSetConfig.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public Set<OFConfigFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFSetConfig.Builder setFlags(Set<OFConfigFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public int getMissSendLen() {
+ return missSendLen;
+ }
+
+ @Override
+ public OFSetConfig.Builder setMissSendLen(int missSendLen) {
+ this.missSendLen = missSendLen;
+ this.missSendLenSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFSetConfig build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFConfigFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ int missSendLen = this.missSendLenSet ? this.missSendLen : parentMessage.missSendLen;
+
+ //
+ return new OFSetConfigVer13(
+ xid,
+ flags,
+ missSendLen
+ );
+ }
+
+ }
+
+ static class Builder implements OFSetConfig.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFConfigFlags> flags;
+ private boolean missSendLenSet;
+ private int missSendLen;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.SET_CONFIG;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFSetConfig.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public Set<OFConfigFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFSetConfig.Builder setFlags(Set<OFConfigFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public int getMissSendLen() {
+ return missSendLen;
+ }
+
+ @Override
+ public OFSetConfig.Builder setMissSendLen(int missSendLen) {
+ this.missSendLen = missSendLen;
+ this.missSendLenSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFSetConfig build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFConfigFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ int missSendLen = this.missSendLenSet ? this.missSendLen : DEFAULT_MISS_SEND_LEN;
+
+
+ return new OFSetConfigVer13(
+ xid,
+ flags,
+ missSendLen
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFSetConfig> {
+ @Override
+ public OFSetConfig readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 9
+ byte type = bb.readByte();
+ if(type != (byte) 0x9)
+ throw new OFParseError("Wrong type: Expected=OFType.SET_CONFIG(9), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 12)
+ throw new OFParseError("Wrong length: Expected=12(12), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ Set<OFConfigFlags> flags = OFConfigFlagsSerializerVer13.readFrom(bb);
+ int missSendLen = U16.f(bb.readShort());
+
+ OFSetConfigVer13 setConfigVer13 = new OFSetConfigVer13(
+ xid,
+ flags,
+ missSendLen
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", setConfigVer13);
+ return setConfigVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFSetConfigVer13Funnel FUNNEL = new OFSetConfigVer13Funnel();
+ static class OFSetConfigVer13Funnel implements Funnel<OFSetConfigVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFSetConfigVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 9
+ sink.putByte((byte) 0x9);
+ // fixed value property length = 12
+ sink.putShort((short) 0xc);
+ sink.putLong(message.xid);
+ OFConfigFlagsSerializerVer13.putTo(message.flags, sink);
+ sink.putInt(message.missSendLen);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFSetConfigVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFSetConfigVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 9
+ bb.writeByte((byte) 0x9);
+ // fixed value property length = 12
+ bb.writeShort((short) 0xc);
+ bb.writeInt(U32.t(message.xid));
+ OFConfigFlagsSerializerVer13.writeTo(bb, message.flags);
+ bb.writeShort(U16.t(message.missSendLen));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFSetConfigVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("missSendLen=").append(missSendLen);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFSetConfigVer13 other = (OFSetConfigVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if( missSendLen != other.missSendLen)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * result + missSendLen;
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFStatsReplyFlagsSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFStatsReplyFlagsSerializerVer13.java
new file mode 100644
index 0000000..d4b5972
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFStatsReplyFlagsSerializerVer13.java
@@ -0,0 +1,78 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_set_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFStatsReplyFlags;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import java.util.EnumSet;
+import java.util.Collections;
+
+
+public class OFStatsReplyFlagsSerializerVer13 {
+
+ public final static short REPLY_MORE_VAL = (short) 0x1;
+
+ public static Set<OFStatsReplyFlags> readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readShort());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, Set<OFStatsReplyFlags> set) {
+ bb.writeShort(toWireValue(set));
+ }
+
+ public static void putTo(Set<OFStatsReplyFlags> set, PrimitiveSink sink) {
+ sink.putShort(toWireValue(set));
+ }
+
+
+ public static Set<OFStatsReplyFlags> ofWireValue(short val) {
+ EnumSet<OFStatsReplyFlags> set = EnumSet.noneOf(OFStatsReplyFlags.class);
+
+ if((val & REPLY_MORE_VAL) != 0)
+ set.add(OFStatsReplyFlags.REPLY_MORE);
+ return Collections.unmodifiableSet(set);
+ }
+
+ public static short toWireValue(Set<OFStatsReplyFlags> set) {
+ short wireValue = 0;
+
+ for(OFStatsReplyFlags e: set) {
+ switch(e) {
+ case REPLY_MORE:
+ wireValue |= REPLY_MORE_VAL;
+ break;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFStatsReplyFlags in version 1.3: " + e);
+ }
+ }
+ return wireValue;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFStatsReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFStatsReplyVer13.java
new file mode 100644
index 0000000..89368bd
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFStatsReplyVer13.java
@@ -0,0 +1,107 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_virtual_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.jboss.netty.buffer.ChannelBuffer;
+
+abstract class OFStatsReplyVer13 {
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 16;
+
+
+ public final static OFStatsReplyVer13.Reader READER = new Reader();
+
+ static class Reader implements OFMessageReader<OFStatsReply> {
+ @Override
+ public OFStatsReply readFrom(ChannelBuffer bb) throws OFParseError {
+ if(bb.readableBytes() < MINIMUM_LENGTH)
+ return null;
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 19
+ byte type = bb.readByte();
+ if(type != (byte) 0x13)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REPLY(19), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ U32.f(bb.readInt());
+ short statsType = bb.readShort();
+ bb.readerIndex(start);
+ switch(statsType) {
+ case (short) 0x2:
+ // discriminator value OFStatsType.AGGREGATE=2 for class OFAggregateStatsReplyVer13
+ return OFAggregateStatsReplyVer13.READER.readFrom(bb);
+ case (short) 0xffff:
+ // discriminator value OFStatsType.EXPERIMENTER=65535 for class OFExperimenterStatsReplyVer13
+ return OFExperimenterStatsReplyVer13.READER.readFrom(bb);
+ case (short) 0x0:
+ // discriminator value OFStatsType.DESC=0 for class OFDescStatsReplyVer13
+ return OFDescStatsReplyVer13.READER.readFrom(bb);
+ case (short) 0x1:
+ // discriminator value OFStatsType.FLOW=1 for class OFFlowStatsReplyVer13
+ return OFFlowStatsReplyVer13.READER.readFrom(bb);
+ case (short) 0x4:
+ // discriminator value OFStatsType.PORT=4 for class OFPortStatsReplyVer13
+ return OFPortStatsReplyVer13.READER.readFrom(bb);
+ case (short) 0x5:
+ // discriminator value OFStatsType.QUEUE=5 for class OFQueueStatsReplyVer13
+ return OFQueueStatsReplyVer13.READER.readFrom(bb);
+ case (short) 0x3:
+ // discriminator value OFStatsType.TABLE=3 for class OFTableStatsReplyVer13
+ return OFTableStatsReplyVer13.READER.readFrom(bb);
+ case (short) 0x7:
+ // discriminator value OFStatsType.GROUP_DESC=7 for class OFGroupDescStatsReplyVer13
+ return OFGroupDescStatsReplyVer13.READER.readFrom(bb);
+ case (short) 0x6:
+ // discriminator value OFStatsType.GROUP=6 for class OFGroupStatsReplyVer13
+ return OFGroupStatsReplyVer13.READER.readFrom(bb);
+ case (short) 0x8:
+ // discriminator value OFStatsType.GROUP_FEATURES=8 for class OFGroupFeaturesStatsReplyVer13
+ return OFGroupFeaturesStatsReplyVer13.READER.readFrom(bb);
+ case (short) 0xa:
+ // discriminator value OFStatsType.METER_CONFIG=10 for class OFMeterConfigStatsReplyVer13
+ return OFMeterConfigStatsReplyVer13.READER.readFrom(bb);
+ case (short) 0xb:
+ // discriminator value OFStatsType.METER_FEATURES=11 for class OFMeterFeaturesStatsReplyVer13
+ return OFMeterFeaturesStatsReplyVer13.READER.readFrom(bb);
+ case (short) 0x9:
+ // discriminator value OFStatsType.METER=9 for class OFMeterStatsReplyVer13
+ return OFMeterStatsReplyVer13.READER.readFrom(bb);
+ case (short) 0xd:
+ // discriminator value OFStatsType.PORT_DESC=13 for class OFPortDescStatsReplyVer13
+ return OFPortDescStatsReplyVer13.READER.readFrom(bb);
+ case (short) 0xc:
+ // discriminator value OFStatsType.TABLE_FEATURES=12 for class OFTableFeaturesStatsReplyVer13
+ return OFTableFeaturesStatsReplyVer13.READER.readFrom(bb);
+ default:
+ throw new OFParseError("Unknown value for discriminator statsType of class OFStatsReplyVer13: " + statsType);
+ }
+ }
+ }
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFStatsRequestFlagsSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFStatsRequestFlagsSerializerVer13.java
new file mode 100644
index 0000000..a00082f
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFStatsRequestFlagsSerializerVer13.java
@@ -0,0 +1,78 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_set_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFStatsRequestFlags;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import java.util.EnumSet;
+import java.util.Collections;
+
+
+public class OFStatsRequestFlagsSerializerVer13 {
+
+ public final static short REQ_MORE_VAL = (short) 0x1;
+
+ public static Set<OFStatsRequestFlags> readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readShort());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, Set<OFStatsRequestFlags> set) {
+ bb.writeShort(toWireValue(set));
+ }
+
+ public static void putTo(Set<OFStatsRequestFlags> set, PrimitiveSink sink) {
+ sink.putShort(toWireValue(set));
+ }
+
+
+ public static Set<OFStatsRequestFlags> ofWireValue(short val) {
+ EnumSet<OFStatsRequestFlags> set = EnumSet.noneOf(OFStatsRequestFlags.class);
+
+ if((val & REQ_MORE_VAL) != 0)
+ set.add(OFStatsRequestFlags.REQ_MORE);
+ return Collections.unmodifiableSet(set);
+ }
+
+ public static short toWireValue(Set<OFStatsRequestFlags> set) {
+ short wireValue = 0;
+
+ for(OFStatsRequestFlags e: set) {
+ switch(e) {
+ case REQ_MORE:
+ wireValue |= REQ_MORE_VAL;
+ break;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFStatsRequestFlags in version 1.3: " + e);
+ }
+ }
+ return wireValue;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFStatsRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFStatsRequestVer13.java
new file mode 100644
index 0000000..e532526
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFStatsRequestVer13.java
@@ -0,0 +1,107 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_virtual_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.jboss.netty.buffer.ChannelBuffer;
+
+abstract class OFStatsRequestVer13 {
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 16;
+
+
+ public final static OFStatsRequestVer13.Reader READER = new Reader();
+
+ static class Reader implements OFMessageReader<OFStatsRequest<?>> {
+ @Override
+ public OFStatsRequest<?> readFrom(ChannelBuffer bb) throws OFParseError {
+ if(bb.readableBytes() < MINIMUM_LENGTH)
+ return null;
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 18
+ byte type = bb.readByte();
+ if(type != (byte) 0x12)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REQUEST(18), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ U32.f(bb.readInt());
+ short statsType = bb.readShort();
+ bb.readerIndex(start);
+ switch(statsType) {
+ case (short) 0x2:
+ // discriminator value OFStatsType.AGGREGATE=2 for class OFAggregateStatsRequestVer13
+ return OFAggregateStatsRequestVer13.READER.readFrom(bb);
+ case (short) 0xffff:
+ // discriminator value OFStatsType.EXPERIMENTER=65535 for class OFExperimenterStatsRequestVer13
+ return OFExperimenterStatsRequestVer13.READER.readFrom(bb);
+ case (short) 0x0:
+ // discriminator value OFStatsType.DESC=0 for class OFDescStatsRequestVer13
+ return OFDescStatsRequestVer13.READER.readFrom(bb);
+ case (short) 0x1:
+ // discriminator value OFStatsType.FLOW=1 for class OFFlowStatsRequestVer13
+ return OFFlowStatsRequestVer13.READER.readFrom(bb);
+ case (short) 0x4:
+ // discriminator value OFStatsType.PORT=4 for class OFPortStatsRequestVer13
+ return OFPortStatsRequestVer13.READER.readFrom(bb);
+ case (short) 0x5:
+ // discriminator value OFStatsType.QUEUE=5 for class OFQueueStatsRequestVer13
+ return OFQueueStatsRequestVer13.READER.readFrom(bb);
+ case (short) 0x3:
+ // discriminator value OFStatsType.TABLE=3 for class OFTableStatsRequestVer13
+ return OFTableStatsRequestVer13.READER.readFrom(bb);
+ case (short) 0x7:
+ // discriminator value OFStatsType.GROUP_DESC=7 for class OFGroupDescStatsRequestVer13
+ return OFGroupDescStatsRequestVer13.READER.readFrom(bb);
+ case (short) 0x6:
+ // discriminator value OFStatsType.GROUP=6 for class OFGroupStatsRequestVer13
+ return OFGroupStatsRequestVer13.READER.readFrom(bb);
+ case (short) 0x8:
+ // discriminator value OFStatsType.GROUP_FEATURES=8 for class OFGroupFeaturesStatsRequestVer13
+ return OFGroupFeaturesStatsRequestVer13.READER.readFrom(bb);
+ case (short) 0xa:
+ // discriminator value OFStatsType.METER_CONFIG=10 for class OFMeterConfigStatsRequestVer13
+ return OFMeterConfigStatsRequestVer13.READER.readFrom(bb);
+ case (short) 0xb:
+ // discriminator value OFStatsType.METER_FEATURES=11 for class OFMeterFeaturesStatsRequestVer13
+ return OFMeterFeaturesStatsRequestVer13.READER.readFrom(bb);
+ case (short) 0x9:
+ // discriminator value OFStatsType.METER=9 for class OFMeterStatsRequestVer13
+ return OFMeterStatsRequestVer13.READER.readFrom(bb);
+ case (short) 0xd:
+ // discriminator value OFStatsType.PORT_DESC=13 for class OFPortDescStatsRequestVer13
+ return OFPortDescStatsRequestVer13.READER.readFrom(bb);
+ case (short) 0xc:
+ // discriminator value OFStatsType.TABLE_FEATURES=12 for class OFTableFeaturesStatsRequestVer13
+ return OFTableFeaturesStatsRequestVer13.READER.readFrom(bb);
+ default:
+ throw new OFParseError("Unknown value for discriminator statsType of class OFStatsRequestVer13: " + statsType);
+ }
+ }
+ }
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFStatsTypeSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFStatsTypeSerializerVer13.java
new file mode 100644
index 0000000..d979ecd
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFStatsTypeSerializerVer13.java
@@ -0,0 +1,139 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFStatsType;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+
+public class OFStatsTypeSerializerVer13 {
+
+ public final static short DESC_VAL = (short) 0x0;
+ public final static short FLOW_VAL = (short) 0x1;
+ public final static short AGGREGATE_VAL = (short) 0x2;
+ public final static short TABLE_VAL = (short) 0x3;
+ public final static short PORT_VAL = (short) 0x4;
+ public final static short QUEUE_VAL = (short) 0x5;
+ public final static short GROUP_VAL = (short) 0x6;
+ public final static short GROUP_DESC_VAL = (short) 0x7;
+ public final static short GROUP_FEATURES_VAL = (short) 0x8;
+ public final static short METER_VAL = (short) 0x9;
+ public final static short METER_CONFIG_VAL = (short) 0xa;
+ public final static short METER_FEATURES_VAL = (short) 0xb;
+ public final static short TABLE_FEATURES_VAL = (short) 0xc;
+ public final static short PORT_DESC_VAL = (short) 0xd;
+ public final static short EXPERIMENTER_VAL = (short) 0xffff;
+
+ public static OFStatsType readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readShort());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, OFStatsType e) {
+ bb.writeShort(toWireValue(e));
+ }
+
+ public static void putTo(OFStatsType e, PrimitiveSink sink) {
+ sink.putShort(toWireValue(e));
+ }
+
+ public static OFStatsType ofWireValue(short val) {
+ switch(val) {
+ case DESC_VAL:
+ return OFStatsType.DESC;
+ case FLOW_VAL:
+ return OFStatsType.FLOW;
+ case AGGREGATE_VAL:
+ return OFStatsType.AGGREGATE;
+ case TABLE_VAL:
+ return OFStatsType.TABLE;
+ case PORT_VAL:
+ return OFStatsType.PORT;
+ case QUEUE_VAL:
+ return OFStatsType.QUEUE;
+ case GROUP_VAL:
+ return OFStatsType.GROUP;
+ case GROUP_DESC_VAL:
+ return OFStatsType.GROUP_DESC;
+ case GROUP_FEATURES_VAL:
+ return OFStatsType.GROUP_FEATURES;
+ case METER_VAL:
+ return OFStatsType.METER;
+ case METER_CONFIG_VAL:
+ return OFStatsType.METER_CONFIG;
+ case METER_FEATURES_VAL:
+ return OFStatsType.METER_FEATURES;
+ case TABLE_FEATURES_VAL:
+ return OFStatsType.TABLE_FEATURES;
+ case PORT_DESC_VAL:
+ return OFStatsType.PORT_DESC;
+ case EXPERIMENTER_VAL:
+ return OFStatsType.EXPERIMENTER;
+ default:
+ throw new IllegalArgumentException("Illegal wire value for type OFStatsType in version 1.3: " + val);
+ }
+ }
+
+
+ public static short toWireValue(OFStatsType e) {
+ switch(e) {
+ case DESC:
+ return DESC_VAL;
+ case FLOW:
+ return FLOW_VAL;
+ case AGGREGATE:
+ return AGGREGATE_VAL;
+ case TABLE:
+ return TABLE_VAL;
+ case PORT:
+ return PORT_VAL;
+ case QUEUE:
+ return QUEUE_VAL;
+ case GROUP:
+ return GROUP_VAL;
+ case GROUP_DESC:
+ return GROUP_DESC_VAL;
+ case GROUP_FEATURES:
+ return GROUP_FEATURES_VAL;
+ case METER:
+ return METER_VAL;
+ case METER_CONFIG:
+ return METER_CONFIG_VAL;
+ case METER_FEATURES:
+ return METER_FEATURES_VAL;
+ case TABLE_FEATURES:
+ return TABLE_FEATURES_VAL;
+ case PORT_DESC:
+ return PORT_DESC_VAL;
+ case EXPERIMENTER:
+ return EXPERIMENTER_VAL;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFStatsType in version 1.3: " + e);
+ }
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFSwitchConfigFailedCodeSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFSwitchConfigFailedCodeSerializerVer13.java
new file mode 100644
index 0000000..efd303a
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFSwitchConfigFailedCodeSerializerVer13.java
@@ -0,0 +1,79 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFSwitchConfigFailedCode;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+
+public class OFSwitchConfigFailedCodeSerializerVer13 {
+
+ public final static short BAD_FLAGS_VAL = (short) 0x0;
+ public final static short BAD_LEN_VAL = (short) 0x1;
+ public final static short EPERM_VAL = (short) 0x2;
+
+ public static OFSwitchConfigFailedCode readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readShort());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, OFSwitchConfigFailedCode e) {
+ bb.writeShort(toWireValue(e));
+ }
+
+ public static void putTo(OFSwitchConfigFailedCode e, PrimitiveSink sink) {
+ sink.putShort(toWireValue(e));
+ }
+
+ public static OFSwitchConfigFailedCode ofWireValue(short val) {
+ switch(val) {
+ case BAD_FLAGS_VAL:
+ return OFSwitchConfigFailedCode.BAD_FLAGS;
+ case BAD_LEN_VAL:
+ return OFSwitchConfigFailedCode.BAD_LEN;
+ case EPERM_VAL:
+ return OFSwitchConfigFailedCode.EPERM;
+ default:
+ throw new IllegalArgumentException("Illegal wire value for type OFSwitchConfigFailedCode in version 1.3: " + val);
+ }
+ }
+
+
+ public static short toWireValue(OFSwitchConfigFailedCode e) {
+ switch(e) {
+ case BAD_FLAGS:
+ return BAD_FLAGS_VAL;
+ case BAD_LEN:
+ return BAD_LEN_VAL;
+ case EPERM:
+ return EPERM_VAL;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFSwitchConfigFailedCode in version 1.3: " + e);
+ }
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFSwitchConfigFailedErrorMsgVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFSwitchConfigFailedErrorMsgVer13.java
new file mode 100644
index 0000000..6c065d1
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFSwitchConfigFailedErrorMsgVer13.java
@@ -0,0 +1,400 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFSwitchConfigFailedErrorMsgVer13 implements OFSwitchConfigFailedErrorMsg {
+ private static final Logger logger = LoggerFactory.getLogger(OFSwitchConfigFailedErrorMsgVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 12;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static OFErrorCauseData DEFAULT_DATA = OFErrorCauseData.NONE;
+
+ // OF message fields
+ private final long xid;
+ private final OFSwitchConfigFailedCode code;
+ private final OFErrorCauseData data;
+//
+
+ // package private constructor - used by readers, builders, and factory
+ OFSwitchConfigFailedErrorMsgVer13(long xid, OFSwitchConfigFailedCode code, OFErrorCauseData data) {
+ this.xid = xid;
+ this.code = code;
+ this.data = data;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ERROR;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFErrorType getErrType() {
+ return OFErrorType.SWITCH_CONFIG_FAILED;
+ }
+
+ @Override
+ public OFSwitchConfigFailedCode getCode() {
+ return code;
+ }
+
+ @Override
+ public OFErrorCauseData getData() {
+ return data;
+ }
+
+
+
+ public OFSwitchConfigFailedErrorMsg.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFSwitchConfigFailedErrorMsg.Builder {
+ final OFSwitchConfigFailedErrorMsgVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean codeSet;
+ private OFSwitchConfigFailedCode code;
+ private boolean dataSet;
+ private OFErrorCauseData data;
+
+ BuilderWithParent(OFSwitchConfigFailedErrorMsgVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ERROR;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFSwitchConfigFailedErrorMsg.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorType getErrType() {
+ return OFErrorType.SWITCH_CONFIG_FAILED;
+ }
+
+ @Override
+ public OFSwitchConfigFailedCode getCode() {
+ return code;
+ }
+
+ @Override
+ public OFSwitchConfigFailedErrorMsg.Builder setCode(OFSwitchConfigFailedCode code) {
+ this.code = code;
+ this.codeSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorCauseData getData() {
+ return data;
+ }
+
+ @Override
+ public OFSwitchConfigFailedErrorMsg.Builder setData(OFErrorCauseData data) {
+ this.data = data;
+ this.dataSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFSwitchConfigFailedErrorMsg build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ OFSwitchConfigFailedCode code = this.codeSet ? this.code : parentMessage.code;
+ if(code == null)
+ throw new NullPointerException("Property code must not be null");
+ OFErrorCauseData data = this.dataSet ? this.data : parentMessage.data;
+ if(data == null)
+ throw new NullPointerException("Property data must not be null");
+
+ //
+ return new OFSwitchConfigFailedErrorMsgVer13(
+ xid,
+ code,
+ data
+ );
+ }
+
+ }
+
+ static class Builder implements OFSwitchConfigFailedErrorMsg.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean codeSet;
+ private OFSwitchConfigFailedCode code;
+ private boolean dataSet;
+ private OFErrorCauseData data;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ERROR;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFSwitchConfigFailedErrorMsg.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorType getErrType() {
+ return OFErrorType.SWITCH_CONFIG_FAILED;
+ }
+
+ @Override
+ public OFSwitchConfigFailedCode getCode() {
+ return code;
+ }
+
+ @Override
+ public OFSwitchConfigFailedErrorMsg.Builder setCode(OFSwitchConfigFailedCode code) {
+ this.code = code;
+ this.codeSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorCauseData getData() {
+ return data;
+ }
+
+ @Override
+ public OFSwitchConfigFailedErrorMsg.Builder setData(OFErrorCauseData data) {
+ this.data = data;
+ this.dataSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFSwitchConfigFailedErrorMsg build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ if(!this.codeSet)
+ throw new IllegalStateException("Property code doesn't have default value -- must be set");
+ if(code == null)
+ throw new NullPointerException("Property code must not be null");
+ OFErrorCauseData data = this.dataSet ? this.data : DEFAULT_DATA;
+ if(data == null)
+ throw new NullPointerException("Property data must not be null");
+
+
+ return new OFSwitchConfigFailedErrorMsgVer13(
+ xid,
+ code,
+ data
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFSwitchConfigFailedErrorMsg> {
+ @Override
+ public OFSwitchConfigFailedErrorMsg readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 1
+ byte type = bb.readByte();
+ if(type != (byte) 0x1)
+ throw new OFParseError("Wrong type: Expected=OFType.ERROR(1), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property errType == 10
+ short errType = bb.readShort();
+ if(errType != (short) 0xa)
+ throw new OFParseError("Wrong errType: Expected=OFErrorType.SWITCH_CONFIG_FAILED(10), got="+errType);
+ OFSwitchConfigFailedCode code = OFSwitchConfigFailedCodeSerializerVer13.readFrom(bb);
+ OFErrorCauseData data = OFErrorCauseData.read(bb, length - (bb.readerIndex() - start), OFVersion.OF_13);
+
+ OFSwitchConfigFailedErrorMsgVer13 switchConfigFailedErrorMsgVer13 = new OFSwitchConfigFailedErrorMsgVer13(
+ xid,
+ code,
+ data
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", switchConfigFailedErrorMsgVer13);
+ return switchConfigFailedErrorMsgVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFSwitchConfigFailedErrorMsgVer13Funnel FUNNEL = new OFSwitchConfigFailedErrorMsgVer13Funnel();
+ static class OFSwitchConfigFailedErrorMsgVer13Funnel implements Funnel<OFSwitchConfigFailedErrorMsgVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFSwitchConfigFailedErrorMsgVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 1
+ sink.putByte((byte) 0x1);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property errType = 10
+ sink.putShort((short) 0xa);
+ OFSwitchConfigFailedCodeSerializerVer13.putTo(message.code, sink);
+ message.data.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFSwitchConfigFailedErrorMsgVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFSwitchConfigFailedErrorMsgVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 1
+ bb.writeByte((byte) 0x1);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property errType = 10
+ bb.writeShort((short) 0xa);
+ OFSwitchConfigFailedCodeSerializerVer13.writeTo(bb, message.code);
+ message.data.writeTo(bb);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFSwitchConfigFailedErrorMsgVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("code=").append(code);
+ b.append(", ");
+ b.append("data=").append(data);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFSwitchConfigFailedErrorMsgVer13 other = (OFSwitchConfigFailedErrorMsgVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (code == null) {
+ if (other.code != null)
+ return false;
+ } else if (!code.equals(other.code))
+ return false;
+ if (data == null) {
+ if (other.data != null)
+ return false;
+ } else if (!data.equals(other.data))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((code == null) ? 0 : code.hashCode());
+ result = prime * result + ((data == null) ? 0 : data.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableConfigSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableConfigSerializerVer13.java
new file mode 100644
index 0000000..3e47912
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableConfigSerializerVer13.java
@@ -0,0 +1,78 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_set_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFTableConfig;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import java.util.EnumSet;
+import java.util.Collections;
+
+
+public class OFTableConfigSerializerVer13 {
+
+ public final static int DEPRECATED_MASK_VAL = 0x3;
+
+ public static Set<OFTableConfig> readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readInt());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, Set<OFTableConfig> set) {
+ bb.writeInt(toWireValue(set));
+ }
+
+ public static void putTo(Set<OFTableConfig> set, PrimitiveSink sink) {
+ sink.putInt(toWireValue(set));
+ }
+
+
+ public static Set<OFTableConfig> ofWireValue(int val) {
+ EnumSet<OFTableConfig> set = EnumSet.noneOf(OFTableConfig.class);
+
+ if((val & DEPRECATED_MASK_VAL) != 0)
+ set.add(OFTableConfig.DEPRECATED_MASK);
+ return Collections.unmodifiableSet(set);
+ }
+
+ public static int toWireValue(Set<OFTableConfig> set) {
+ int wireValue = 0;
+
+ for(OFTableConfig e: set) {
+ switch(e) {
+ case DEPRECATED_MASK:
+ wireValue |= DEPRECATED_MASK_VAL;
+ break;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFTableConfig in version 1.3: " + e);
+ }
+ }
+ return wireValue;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropApplyActionsMissVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropApplyActionsMissVer13.java
new file mode 100644
index 0000000..5fd08ec
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropApplyActionsMissVer13.java
@@ -0,0 +1,274 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFTableFeaturePropApplyActionsMissVer13 implements OFTableFeaturePropApplyActionsMiss {
+ private static final Logger logger = LoggerFactory.getLogger(OFTableFeaturePropApplyActionsMissVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 4;
+
+ private final static List<OFActionId> DEFAULT_ACTION_IDS = ImmutableList.<OFActionId>of();
+
+ // OF message fields
+ private final List<OFActionId> actionIds;
+//
+ // Immutable default instance
+ final static OFTableFeaturePropApplyActionsMissVer13 DEFAULT = new OFTableFeaturePropApplyActionsMissVer13(
+ DEFAULT_ACTION_IDS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFTableFeaturePropApplyActionsMissVer13(List<OFActionId> actionIds) {
+ this.actionIds = actionIds;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public int getType() {
+ return 0x7;
+ }
+
+ @Override
+ public List<OFActionId> getActionIds() {
+ return actionIds;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFTableFeaturePropApplyActionsMiss.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFTableFeaturePropApplyActionsMiss.Builder {
+ final OFTableFeaturePropApplyActionsMissVer13 parentMessage;
+
+ // OF message fields
+ private boolean actionIdsSet;
+ private List<OFActionId> actionIds;
+
+ BuilderWithParent(OFTableFeaturePropApplyActionsMissVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public int getType() {
+ return 0x7;
+ }
+
+ @Override
+ public List<OFActionId> getActionIds() {
+ return actionIds;
+ }
+
+ @Override
+ public OFTableFeaturePropApplyActionsMiss.Builder setActionIds(List<OFActionId> actionIds) {
+ this.actionIds = actionIds;
+ this.actionIdsSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFTableFeaturePropApplyActionsMiss build() {
+ List<OFActionId> actionIds = this.actionIdsSet ? this.actionIds : parentMessage.actionIds;
+ if(actionIds == null)
+ throw new NullPointerException("Property actionIds must not be null");
+
+ //
+ return new OFTableFeaturePropApplyActionsMissVer13(
+ actionIds
+ );
+ }
+
+ }
+
+ static class Builder implements OFTableFeaturePropApplyActionsMiss.Builder {
+ // OF message fields
+ private boolean actionIdsSet;
+ private List<OFActionId> actionIds;
+
+ @Override
+ public int getType() {
+ return 0x7;
+ }
+
+ @Override
+ public List<OFActionId> getActionIds() {
+ return actionIds;
+ }
+
+ @Override
+ public OFTableFeaturePropApplyActionsMiss.Builder setActionIds(List<OFActionId> actionIds) {
+ this.actionIds = actionIds;
+ this.actionIdsSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFTableFeaturePropApplyActionsMiss build() {
+ List<OFActionId> actionIds = this.actionIdsSet ? this.actionIds : DEFAULT_ACTION_IDS;
+ if(actionIds == null)
+ throw new NullPointerException("Property actionIds must not be null");
+
+
+ return new OFTableFeaturePropApplyActionsMissVer13(
+ actionIds
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFTableFeaturePropApplyActionsMiss> {
+ @Override
+ public OFTableFeaturePropApplyActionsMiss readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 0x7
+ short type = bb.readShort();
+ if(type != (short) 0x7)
+ throw new OFParseError("Wrong type: Expected=0x7(0x7), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ List<OFActionId> actionIds = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFActionIdVer13.READER);
+
+ OFTableFeaturePropApplyActionsMissVer13 tableFeaturePropApplyActionsMissVer13 = new OFTableFeaturePropApplyActionsMissVer13(
+ actionIds
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", tableFeaturePropApplyActionsMissVer13);
+ return tableFeaturePropApplyActionsMissVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFTableFeaturePropApplyActionsMissVer13Funnel FUNNEL = new OFTableFeaturePropApplyActionsMissVer13Funnel();
+ static class OFTableFeaturePropApplyActionsMissVer13Funnel implements Funnel<OFTableFeaturePropApplyActionsMissVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFTableFeaturePropApplyActionsMissVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 0x7
+ sink.putShort((short) 0x7);
+ // FIXME: skip funnel of length
+ FunnelUtils.putList(message.actionIds, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFTableFeaturePropApplyActionsMissVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFTableFeaturePropApplyActionsMissVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property type = 0x7
+ bb.writeShort((short) 0x7);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ ChannelUtils.writeList(bb, message.actionIds);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFTableFeaturePropApplyActionsMissVer13(");
+ b.append("actionIds=").append(actionIds);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFTableFeaturePropApplyActionsMissVer13 other = (OFTableFeaturePropApplyActionsMissVer13) obj;
+
+ if (actionIds == null) {
+ if (other.actionIds != null)
+ return false;
+ } else if (!actionIds.equals(other.actionIds))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((actionIds == null) ? 0 : actionIds.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropApplyActionsVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropApplyActionsVer13.java
new file mode 100644
index 0000000..a2f9c46
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropApplyActionsVer13.java
@@ -0,0 +1,274 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFTableFeaturePropApplyActionsVer13 implements OFTableFeaturePropApplyActions {
+ private static final Logger logger = LoggerFactory.getLogger(OFTableFeaturePropApplyActionsVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 4;
+
+ private final static List<OFActionId> DEFAULT_ACTION_IDS = ImmutableList.<OFActionId>of();
+
+ // OF message fields
+ private final List<OFActionId> actionIds;
+//
+ // Immutable default instance
+ final static OFTableFeaturePropApplyActionsVer13 DEFAULT = new OFTableFeaturePropApplyActionsVer13(
+ DEFAULT_ACTION_IDS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFTableFeaturePropApplyActionsVer13(List<OFActionId> actionIds) {
+ this.actionIds = actionIds;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public int getType() {
+ return 0x6;
+ }
+
+ @Override
+ public List<OFActionId> getActionIds() {
+ return actionIds;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFTableFeaturePropApplyActions.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFTableFeaturePropApplyActions.Builder {
+ final OFTableFeaturePropApplyActionsVer13 parentMessage;
+
+ // OF message fields
+ private boolean actionIdsSet;
+ private List<OFActionId> actionIds;
+
+ BuilderWithParent(OFTableFeaturePropApplyActionsVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public int getType() {
+ return 0x6;
+ }
+
+ @Override
+ public List<OFActionId> getActionIds() {
+ return actionIds;
+ }
+
+ @Override
+ public OFTableFeaturePropApplyActions.Builder setActionIds(List<OFActionId> actionIds) {
+ this.actionIds = actionIds;
+ this.actionIdsSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFTableFeaturePropApplyActions build() {
+ List<OFActionId> actionIds = this.actionIdsSet ? this.actionIds : parentMessage.actionIds;
+ if(actionIds == null)
+ throw new NullPointerException("Property actionIds must not be null");
+
+ //
+ return new OFTableFeaturePropApplyActionsVer13(
+ actionIds
+ );
+ }
+
+ }
+
+ static class Builder implements OFTableFeaturePropApplyActions.Builder {
+ // OF message fields
+ private boolean actionIdsSet;
+ private List<OFActionId> actionIds;
+
+ @Override
+ public int getType() {
+ return 0x6;
+ }
+
+ @Override
+ public List<OFActionId> getActionIds() {
+ return actionIds;
+ }
+
+ @Override
+ public OFTableFeaturePropApplyActions.Builder setActionIds(List<OFActionId> actionIds) {
+ this.actionIds = actionIds;
+ this.actionIdsSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFTableFeaturePropApplyActions build() {
+ List<OFActionId> actionIds = this.actionIdsSet ? this.actionIds : DEFAULT_ACTION_IDS;
+ if(actionIds == null)
+ throw new NullPointerException("Property actionIds must not be null");
+
+
+ return new OFTableFeaturePropApplyActionsVer13(
+ actionIds
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFTableFeaturePropApplyActions> {
+ @Override
+ public OFTableFeaturePropApplyActions readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 0x6
+ short type = bb.readShort();
+ if(type != (short) 0x6)
+ throw new OFParseError("Wrong type: Expected=0x6(0x6), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ List<OFActionId> actionIds = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFActionIdVer13.READER);
+
+ OFTableFeaturePropApplyActionsVer13 tableFeaturePropApplyActionsVer13 = new OFTableFeaturePropApplyActionsVer13(
+ actionIds
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", tableFeaturePropApplyActionsVer13);
+ return tableFeaturePropApplyActionsVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFTableFeaturePropApplyActionsVer13Funnel FUNNEL = new OFTableFeaturePropApplyActionsVer13Funnel();
+ static class OFTableFeaturePropApplyActionsVer13Funnel implements Funnel<OFTableFeaturePropApplyActionsVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFTableFeaturePropApplyActionsVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 0x6
+ sink.putShort((short) 0x6);
+ // FIXME: skip funnel of length
+ FunnelUtils.putList(message.actionIds, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFTableFeaturePropApplyActionsVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFTableFeaturePropApplyActionsVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property type = 0x6
+ bb.writeShort((short) 0x6);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ ChannelUtils.writeList(bb, message.actionIds);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFTableFeaturePropApplyActionsVer13(");
+ b.append("actionIds=").append(actionIds);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFTableFeaturePropApplyActionsVer13 other = (OFTableFeaturePropApplyActionsVer13) obj;
+
+ if (actionIds == null) {
+ if (other.actionIds != null)
+ return false;
+ } else if (!actionIds.equals(other.actionIds))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((actionIds == null) ? 0 : actionIds.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropApplySetfieldMissVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropApplySetfieldMissVer13.java
new file mode 100644
index 0000000..6ca4d56
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropApplySetfieldMissVer13.java
@@ -0,0 +1,274 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import java.util.Set;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFTableFeaturePropApplySetfieldMissVer13 implements OFTableFeaturePropApplySetfieldMiss {
+ private static final Logger logger = LoggerFactory.getLogger(OFTableFeaturePropApplySetfieldMissVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 4;
+
+ private final static List<U32> DEFAULT_OXM_IDS = ImmutableList.<U32>of();
+
+ // OF message fields
+ private final List<U32> oxmIds;
+//
+ // Immutable default instance
+ final static OFTableFeaturePropApplySetfieldMissVer13 DEFAULT = new OFTableFeaturePropApplySetfieldMissVer13(
+ DEFAULT_OXM_IDS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFTableFeaturePropApplySetfieldMissVer13(List<U32> oxmIds) {
+ this.oxmIds = oxmIds;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public int getType() {
+ return 0xf;
+ }
+
+ @Override
+ public List<U32> getOxmIds() {
+ return oxmIds;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFTableFeaturePropApplySetfieldMiss.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFTableFeaturePropApplySetfieldMiss.Builder {
+ final OFTableFeaturePropApplySetfieldMissVer13 parentMessage;
+
+ // OF message fields
+ private boolean oxmIdsSet;
+ private List<U32> oxmIds;
+
+ BuilderWithParent(OFTableFeaturePropApplySetfieldMissVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public int getType() {
+ return 0xf;
+ }
+
+ @Override
+ public List<U32> getOxmIds() {
+ return oxmIds;
+ }
+
+ @Override
+ public OFTableFeaturePropApplySetfieldMiss.Builder setOxmIds(List<U32> oxmIds) {
+ this.oxmIds = oxmIds;
+ this.oxmIdsSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFTableFeaturePropApplySetfieldMiss build() {
+ List<U32> oxmIds = this.oxmIdsSet ? this.oxmIds : parentMessage.oxmIds;
+ if(oxmIds == null)
+ throw new NullPointerException("Property oxmIds must not be null");
+
+ //
+ return new OFTableFeaturePropApplySetfieldMissVer13(
+ oxmIds
+ );
+ }
+
+ }
+
+ static class Builder implements OFTableFeaturePropApplySetfieldMiss.Builder {
+ // OF message fields
+ private boolean oxmIdsSet;
+ private List<U32> oxmIds;
+
+ @Override
+ public int getType() {
+ return 0xf;
+ }
+
+ @Override
+ public List<U32> getOxmIds() {
+ return oxmIds;
+ }
+
+ @Override
+ public OFTableFeaturePropApplySetfieldMiss.Builder setOxmIds(List<U32> oxmIds) {
+ this.oxmIds = oxmIds;
+ this.oxmIdsSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFTableFeaturePropApplySetfieldMiss build() {
+ List<U32> oxmIds = this.oxmIdsSet ? this.oxmIds : DEFAULT_OXM_IDS;
+ if(oxmIds == null)
+ throw new NullPointerException("Property oxmIds must not be null");
+
+
+ return new OFTableFeaturePropApplySetfieldMissVer13(
+ oxmIds
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFTableFeaturePropApplySetfieldMiss> {
+ @Override
+ public OFTableFeaturePropApplySetfieldMiss readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 0xf
+ short type = bb.readShort();
+ if(type != (short) 0xf)
+ throw new OFParseError("Wrong type: Expected=0xf(0xf), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ List<U32> oxmIds = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), U32.READER);
+
+ OFTableFeaturePropApplySetfieldMissVer13 tableFeaturePropApplySetfieldMissVer13 = new OFTableFeaturePropApplySetfieldMissVer13(
+ oxmIds
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", tableFeaturePropApplySetfieldMissVer13);
+ return tableFeaturePropApplySetfieldMissVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFTableFeaturePropApplySetfieldMissVer13Funnel FUNNEL = new OFTableFeaturePropApplySetfieldMissVer13Funnel();
+ static class OFTableFeaturePropApplySetfieldMissVer13Funnel implements Funnel<OFTableFeaturePropApplySetfieldMissVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFTableFeaturePropApplySetfieldMissVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 0xf
+ sink.putShort((short) 0xf);
+ // FIXME: skip funnel of length
+ FunnelUtils.putList(message.oxmIds, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFTableFeaturePropApplySetfieldMissVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFTableFeaturePropApplySetfieldMissVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property type = 0xf
+ bb.writeShort((short) 0xf);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ ChannelUtils.writeList(bb, message.oxmIds);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFTableFeaturePropApplySetfieldMissVer13(");
+ b.append("oxmIds=").append(oxmIds);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFTableFeaturePropApplySetfieldMissVer13 other = (OFTableFeaturePropApplySetfieldMissVer13) obj;
+
+ if (oxmIds == null) {
+ if (other.oxmIds != null)
+ return false;
+ } else if (!oxmIds.equals(other.oxmIds))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((oxmIds == null) ? 0 : oxmIds.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropApplySetfieldVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropApplySetfieldVer13.java
new file mode 100644
index 0000000..b0b49dc
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropApplySetfieldVer13.java
@@ -0,0 +1,274 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import java.util.Set;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFTableFeaturePropApplySetfieldVer13 implements OFTableFeaturePropApplySetfield {
+ private static final Logger logger = LoggerFactory.getLogger(OFTableFeaturePropApplySetfieldVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 4;
+
+ private final static List<U32> DEFAULT_OXM_IDS = ImmutableList.<U32>of();
+
+ // OF message fields
+ private final List<U32> oxmIds;
+//
+ // Immutable default instance
+ final static OFTableFeaturePropApplySetfieldVer13 DEFAULT = new OFTableFeaturePropApplySetfieldVer13(
+ DEFAULT_OXM_IDS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFTableFeaturePropApplySetfieldVer13(List<U32> oxmIds) {
+ this.oxmIds = oxmIds;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public int getType() {
+ return 0xe;
+ }
+
+ @Override
+ public List<U32> getOxmIds() {
+ return oxmIds;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFTableFeaturePropApplySetfield.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFTableFeaturePropApplySetfield.Builder {
+ final OFTableFeaturePropApplySetfieldVer13 parentMessage;
+
+ // OF message fields
+ private boolean oxmIdsSet;
+ private List<U32> oxmIds;
+
+ BuilderWithParent(OFTableFeaturePropApplySetfieldVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public int getType() {
+ return 0xe;
+ }
+
+ @Override
+ public List<U32> getOxmIds() {
+ return oxmIds;
+ }
+
+ @Override
+ public OFTableFeaturePropApplySetfield.Builder setOxmIds(List<U32> oxmIds) {
+ this.oxmIds = oxmIds;
+ this.oxmIdsSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFTableFeaturePropApplySetfield build() {
+ List<U32> oxmIds = this.oxmIdsSet ? this.oxmIds : parentMessage.oxmIds;
+ if(oxmIds == null)
+ throw new NullPointerException("Property oxmIds must not be null");
+
+ //
+ return new OFTableFeaturePropApplySetfieldVer13(
+ oxmIds
+ );
+ }
+
+ }
+
+ static class Builder implements OFTableFeaturePropApplySetfield.Builder {
+ // OF message fields
+ private boolean oxmIdsSet;
+ private List<U32> oxmIds;
+
+ @Override
+ public int getType() {
+ return 0xe;
+ }
+
+ @Override
+ public List<U32> getOxmIds() {
+ return oxmIds;
+ }
+
+ @Override
+ public OFTableFeaturePropApplySetfield.Builder setOxmIds(List<U32> oxmIds) {
+ this.oxmIds = oxmIds;
+ this.oxmIdsSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFTableFeaturePropApplySetfield build() {
+ List<U32> oxmIds = this.oxmIdsSet ? this.oxmIds : DEFAULT_OXM_IDS;
+ if(oxmIds == null)
+ throw new NullPointerException("Property oxmIds must not be null");
+
+
+ return new OFTableFeaturePropApplySetfieldVer13(
+ oxmIds
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFTableFeaturePropApplySetfield> {
+ @Override
+ public OFTableFeaturePropApplySetfield readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 0xe
+ short type = bb.readShort();
+ if(type != (short) 0xe)
+ throw new OFParseError("Wrong type: Expected=0xe(0xe), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ List<U32> oxmIds = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), U32.READER);
+
+ OFTableFeaturePropApplySetfieldVer13 tableFeaturePropApplySetfieldVer13 = new OFTableFeaturePropApplySetfieldVer13(
+ oxmIds
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", tableFeaturePropApplySetfieldVer13);
+ return tableFeaturePropApplySetfieldVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFTableFeaturePropApplySetfieldVer13Funnel FUNNEL = new OFTableFeaturePropApplySetfieldVer13Funnel();
+ static class OFTableFeaturePropApplySetfieldVer13Funnel implements Funnel<OFTableFeaturePropApplySetfieldVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFTableFeaturePropApplySetfieldVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 0xe
+ sink.putShort((short) 0xe);
+ // FIXME: skip funnel of length
+ FunnelUtils.putList(message.oxmIds, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFTableFeaturePropApplySetfieldVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFTableFeaturePropApplySetfieldVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property type = 0xe
+ bb.writeShort((short) 0xe);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ ChannelUtils.writeList(bb, message.oxmIds);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFTableFeaturePropApplySetfieldVer13(");
+ b.append("oxmIds=").append(oxmIds);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFTableFeaturePropApplySetfieldVer13 other = (OFTableFeaturePropApplySetfieldVer13) obj;
+
+ if (oxmIds == null) {
+ if (other.oxmIds != null)
+ return false;
+ } else if (!oxmIds.equals(other.oxmIds))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((oxmIds == null) ? 0 : oxmIds.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropExperimenterMissVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropExperimenterMissVer13.java
new file mode 100644
index 0000000..e5685cc
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropExperimenterMissVer13.java
@@ -0,0 +1,364 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+import java.util.Arrays;
+
+class OFTableFeaturePropExperimenterMissVer13 implements OFTableFeaturePropExperimenterMiss {
+ private static final Logger logger = LoggerFactory.getLogger(OFTableFeaturePropExperimenterMissVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 12;
+
+ private final static long DEFAULT_EXPERIMENTER = 0x0L;
+ private final static long DEFAULT_SUBTYPE = 0x0L;
+ private final static byte[] DEFAULT_EXPERIMENTER_DATA = new byte[0];
+
+ // OF message fields
+ private final long experimenter;
+ private final long subtype;
+ private final byte[] experimenterData;
+//
+ // Immutable default instance
+ final static OFTableFeaturePropExperimenterMissVer13 DEFAULT = new OFTableFeaturePropExperimenterMissVer13(
+ DEFAULT_EXPERIMENTER, DEFAULT_SUBTYPE, DEFAULT_EXPERIMENTER_DATA
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFTableFeaturePropExperimenterMissVer13(long experimenter, long subtype, byte[] experimenterData) {
+ this.experimenter = experimenter;
+ this.subtype = subtype;
+ this.experimenterData = experimenterData;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public int getType() {
+ return 0xffff;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return experimenter;
+ }
+
+ @Override
+ public long getSubtype() {
+ return subtype;
+ }
+
+ @Override
+ public byte[] getExperimenterData() {
+ return experimenterData;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFTableFeaturePropExperimenterMiss.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFTableFeaturePropExperimenterMiss.Builder {
+ final OFTableFeaturePropExperimenterMissVer13 parentMessage;
+
+ // OF message fields
+ private boolean experimenterSet;
+ private long experimenter;
+ private boolean subtypeSet;
+ private long subtype;
+ private boolean experimenterDataSet;
+ private byte[] experimenterData;
+
+ BuilderWithParent(OFTableFeaturePropExperimenterMissVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public int getType() {
+ return 0xffff;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return experimenter;
+ }
+
+ @Override
+ public OFTableFeaturePropExperimenterMiss.Builder setExperimenter(long experimenter) {
+ this.experimenter = experimenter;
+ this.experimenterSet = true;
+ return this;
+ }
+ @Override
+ public long getSubtype() {
+ return subtype;
+ }
+
+ @Override
+ public OFTableFeaturePropExperimenterMiss.Builder setSubtype(long subtype) {
+ this.subtype = subtype;
+ this.subtypeSet = true;
+ return this;
+ }
+ @Override
+ public byte[] getExperimenterData() {
+ return experimenterData;
+ }
+
+ @Override
+ public OFTableFeaturePropExperimenterMiss.Builder setExperimenterData(byte[] experimenterData) {
+ this.experimenterData = experimenterData;
+ this.experimenterDataSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFTableFeaturePropExperimenterMiss build() {
+ long experimenter = this.experimenterSet ? this.experimenter : parentMessage.experimenter;
+ long subtype = this.subtypeSet ? this.subtype : parentMessage.subtype;
+ byte[] experimenterData = this.experimenterDataSet ? this.experimenterData : parentMessage.experimenterData;
+ if(experimenterData == null)
+ throw new NullPointerException("Property experimenterData must not be null");
+
+ //
+ return new OFTableFeaturePropExperimenterMissVer13(
+ experimenter,
+ subtype,
+ experimenterData
+ );
+ }
+
+ }
+
+ static class Builder implements OFTableFeaturePropExperimenterMiss.Builder {
+ // OF message fields
+ private boolean experimenterSet;
+ private long experimenter;
+ private boolean subtypeSet;
+ private long subtype;
+ private boolean experimenterDataSet;
+ private byte[] experimenterData;
+
+ @Override
+ public int getType() {
+ return 0xffff;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return experimenter;
+ }
+
+ @Override
+ public OFTableFeaturePropExperimenterMiss.Builder setExperimenter(long experimenter) {
+ this.experimenter = experimenter;
+ this.experimenterSet = true;
+ return this;
+ }
+ @Override
+ public long getSubtype() {
+ return subtype;
+ }
+
+ @Override
+ public OFTableFeaturePropExperimenterMiss.Builder setSubtype(long subtype) {
+ this.subtype = subtype;
+ this.subtypeSet = true;
+ return this;
+ }
+ @Override
+ public byte[] getExperimenterData() {
+ return experimenterData;
+ }
+
+ @Override
+ public OFTableFeaturePropExperimenterMiss.Builder setExperimenterData(byte[] experimenterData) {
+ this.experimenterData = experimenterData;
+ this.experimenterDataSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFTableFeaturePropExperimenterMiss build() {
+ long experimenter = this.experimenterSet ? this.experimenter : DEFAULT_EXPERIMENTER;
+ long subtype = this.subtypeSet ? this.subtype : DEFAULT_SUBTYPE;
+ byte[] experimenterData = this.experimenterDataSet ? this.experimenterData : DEFAULT_EXPERIMENTER_DATA;
+ if(experimenterData == null)
+ throw new NullPointerException("Property experimenterData must not be null");
+
+
+ return new OFTableFeaturePropExperimenterMissVer13(
+ experimenter,
+ subtype,
+ experimenterData
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFTableFeaturePropExperimenterMiss> {
+ @Override
+ public OFTableFeaturePropExperimenterMiss readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 0xffff
+ short type = bb.readShort();
+ if(type != (short) 0xffff)
+ throw new OFParseError("Wrong type: Expected=0xffff(0xffff), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long experimenter = U32.f(bb.readInt());
+ long subtype = U32.f(bb.readInt());
+ byte[] experimenterData = ChannelUtils.readBytes(bb, length - (bb.readerIndex() - start));
+
+ OFTableFeaturePropExperimenterMissVer13 tableFeaturePropExperimenterMissVer13 = new OFTableFeaturePropExperimenterMissVer13(
+ experimenter,
+ subtype,
+ experimenterData
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", tableFeaturePropExperimenterMissVer13);
+ return tableFeaturePropExperimenterMissVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFTableFeaturePropExperimenterMissVer13Funnel FUNNEL = new OFTableFeaturePropExperimenterMissVer13Funnel();
+ static class OFTableFeaturePropExperimenterMissVer13Funnel implements Funnel<OFTableFeaturePropExperimenterMissVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFTableFeaturePropExperimenterMissVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 0xffff
+ sink.putShort((short) 0xffff);
+ // FIXME: skip funnel of length
+ sink.putLong(message.experimenter);
+ sink.putLong(message.subtype);
+ sink.putBytes(message.experimenterData);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFTableFeaturePropExperimenterMissVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFTableFeaturePropExperimenterMissVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property type = 0xffff
+ bb.writeShort((short) 0xffff);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.experimenter));
+ bb.writeInt(U32.t(message.subtype));
+ bb.writeBytes(message.experimenterData);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFTableFeaturePropExperimenterMissVer13(");
+ b.append("experimenter=").append(experimenter);
+ b.append(", ");
+ b.append("subtype=").append(subtype);
+ b.append(", ");
+ b.append("experimenterData=").append(Arrays.toString(experimenterData));
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFTableFeaturePropExperimenterMissVer13 other = (OFTableFeaturePropExperimenterMissVer13) obj;
+
+ if( experimenter != other.experimenter)
+ return false;
+ if( subtype != other.subtype)
+ return false;
+ if (!Arrays.equals(experimenterData, other.experimenterData))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (experimenter ^ (experimenter >>> 32));
+ result = prime * (int) (subtype ^ (subtype >>> 32));
+ result = prime * result + Arrays.hashCode(experimenterData);
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropExperimenterVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropExperimenterVer13.java
new file mode 100644
index 0000000..056b550
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropExperimenterVer13.java
@@ -0,0 +1,364 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+import java.util.Arrays;
+
+class OFTableFeaturePropExperimenterVer13 implements OFTableFeaturePropExperimenter {
+ private static final Logger logger = LoggerFactory.getLogger(OFTableFeaturePropExperimenterVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 12;
+
+ private final static long DEFAULT_EXPERIMENTER = 0x0L;
+ private final static long DEFAULT_SUBTYPE = 0x0L;
+ private final static byte[] DEFAULT_EXPERIMENTER_DATA = new byte[0];
+
+ // OF message fields
+ private final long experimenter;
+ private final long subtype;
+ private final byte[] experimenterData;
+//
+ // Immutable default instance
+ final static OFTableFeaturePropExperimenterVer13 DEFAULT = new OFTableFeaturePropExperimenterVer13(
+ DEFAULT_EXPERIMENTER, DEFAULT_SUBTYPE, DEFAULT_EXPERIMENTER_DATA
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFTableFeaturePropExperimenterVer13(long experimenter, long subtype, byte[] experimenterData) {
+ this.experimenter = experimenter;
+ this.subtype = subtype;
+ this.experimenterData = experimenterData;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public int getType() {
+ return 0xfffe;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return experimenter;
+ }
+
+ @Override
+ public long getSubtype() {
+ return subtype;
+ }
+
+ @Override
+ public byte[] getExperimenterData() {
+ return experimenterData;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFTableFeaturePropExperimenter.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFTableFeaturePropExperimenter.Builder {
+ final OFTableFeaturePropExperimenterVer13 parentMessage;
+
+ // OF message fields
+ private boolean experimenterSet;
+ private long experimenter;
+ private boolean subtypeSet;
+ private long subtype;
+ private boolean experimenterDataSet;
+ private byte[] experimenterData;
+
+ BuilderWithParent(OFTableFeaturePropExperimenterVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public int getType() {
+ return 0xfffe;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return experimenter;
+ }
+
+ @Override
+ public OFTableFeaturePropExperimenter.Builder setExperimenter(long experimenter) {
+ this.experimenter = experimenter;
+ this.experimenterSet = true;
+ return this;
+ }
+ @Override
+ public long getSubtype() {
+ return subtype;
+ }
+
+ @Override
+ public OFTableFeaturePropExperimenter.Builder setSubtype(long subtype) {
+ this.subtype = subtype;
+ this.subtypeSet = true;
+ return this;
+ }
+ @Override
+ public byte[] getExperimenterData() {
+ return experimenterData;
+ }
+
+ @Override
+ public OFTableFeaturePropExperimenter.Builder setExperimenterData(byte[] experimenterData) {
+ this.experimenterData = experimenterData;
+ this.experimenterDataSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFTableFeaturePropExperimenter build() {
+ long experimenter = this.experimenterSet ? this.experimenter : parentMessage.experimenter;
+ long subtype = this.subtypeSet ? this.subtype : parentMessage.subtype;
+ byte[] experimenterData = this.experimenterDataSet ? this.experimenterData : parentMessage.experimenterData;
+ if(experimenterData == null)
+ throw new NullPointerException("Property experimenterData must not be null");
+
+ //
+ return new OFTableFeaturePropExperimenterVer13(
+ experimenter,
+ subtype,
+ experimenterData
+ );
+ }
+
+ }
+
+ static class Builder implements OFTableFeaturePropExperimenter.Builder {
+ // OF message fields
+ private boolean experimenterSet;
+ private long experimenter;
+ private boolean subtypeSet;
+ private long subtype;
+ private boolean experimenterDataSet;
+ private byte[] experimenterData;
+
+ @Override
+ public int getType() {
+ return 0xfffe;
+ }
+
+ @Override
+ public long getExperimenter() {
+ return experimenter;
+ }
+
+ @Override
+ public OFTableFeaturePropExperimenter.Builder setExperimenter(long experimenter) {
+ this.experimenter = experimenter;
+ this.experimenterSet = true;
+ return this;
+ }
+ @Override
+ public long getSubtype() {
+ return subtype;
+ }
+
+ @Override
+ public OFTableFeaturePropExperimenter.Builder setSubtype(long subtype) {
+ this.subtype = subtype;
+ this.subtypeSet = true;
+ return this;
+ }
+ @Override
+ public byte[] getExperimenterData() {
+ return experimenterData;
+ }
+
+ @Override
+ public OFTableFeaturePropExperimenter.Builder setExperimenterData(byte[] experimenterData) {
+ this.experimenterData = experimenterData;
+ this.experimenterDataSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFTableFeaturePropExperimenter build() {
+ long experimenter = this.experimenterSet ? this.experimenter : DEFAULT_EXPERIMENTER;
+ long subtype = this.subtypeSet ? this.subtype : DEFAULT_SUBTYPE;
+ byte[] experimenterData = this.experimenterDataSet ? this.experimenterData : DEFAULT_EXPERIMENTER_DATA;
+ if(experimenterData == null)
+ throw new NullPointerException("Property experimenterData must not be null");
+
+
+ return new OFTableFeaturePropExperimenterVer13(
+ experimenter,
+ subtype,
+ experimenterData
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFTableFeaturePropExperimenter> {
+ @Override
+ public OFTableFeaturePropExperimenter readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 0xfffe
+ short type = bb.readShort();
+ if(type != (short) 0xfffe)
+ throw new OFParseError("Wrong type: Expected=0xfffe(0xfffe), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long experimenter = U32.f(bb.readInt());
+ long subtype = U32.f(bb.readInt());
+ byte[] experimenterData = ChannelUtils.readBytes(bb, length - (bb.readerIndex() - start));
+
+ OFTableFeaturePropExperimenterVer13 tableFeaturePropExperimenterVer13 = new OFTableFeaturePropExperimenterVer13(
+ experimenter,
+ subtype,
+ experimenterData
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", tableFeaturePropExperimenterVer13);
+ return tableFeaturePropExperimenterVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFTableFeaturePropExperimenterVer13Funnel FUNNEL = new OFTableFeaturePropExperimenterVer13Funnel();
+ static class OFTableFeaturePropExperimenterVer13Funnel implements Funnel<OFTableFeaturePropExperimenterVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFTableFeaturePropExperimenterVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 0xfffe
+ sink.putShort((short) 0xfffe);
+ // FIXME: skip funnel of length
+ sink.putLong(message.experimenter);
+ sink.putLong(message.subtype);
+ sink.putBytes(message.experimenterData);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFTableFeaturePropExperimenterVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFTableFeaturePropExperimenterVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property type = 0xfffe
+ bb.writeShort((short) 0xfffe);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.experimenter));
+ bb.writeInt(U32.t(message.subtype));
+ bb.writeBytes(message.experimenterData);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFTableFeaturePropExperimenterVer13(");
+ b.append("experimenter=").append(experimenter);
+ b.append(", ");
+ b.append("subtype=").append(subtype);
+ b.append(", ");
+ b.append("experimenterData=").append(Arrays.toString(experimenterData));
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFTableFeaturePropExperimenterVer13 other = (OFTableFeaturePropExperimenterVer13) obj;
+
+ if( experimenter != other.experimenter)
+ return false;
+ if( subtype != other.subtype)
+ return false;
+ if (!Arrays.equals(experimenterData, other.experimenterData))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (experimenter ^ (experimenter >>> 32));
+ result = prime * (int) (subtype ^ (subtype >>> 32));
+ result = prime * result + Arrays.hashCode(experimenterData);
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropInstructionsMissVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropInstructionsMissVer13.java
new file mode 100644
index 0000000..a7785e2
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropInstructionsMissVer13.java
@@ -0,0 +1,274 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFTableFeaturePropInstructionsMissVer13 implements OFTableFeaturePropInstructionsMiss {
+ private static final Logger logger = LoggerFactory.getLogger(OFTableFeaturePropInstructionsMissVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 4;
+
+ private final static List<OFInstructionId> DEFAULT_INSTRUCTION_IDS = ImmutableList.<OFInstructionId>of();
+
+ // OF message fields
+ private final List<OFInstructionId> instructionIds;
+//
+ // Immutable default instance
+ final static OFTableFeaturePropInstructionsMissVer13 DEFAULT = new OFTableFeaturePropInstructionsMissVer13(
+ DEFAULT_INSTRUCTION_IDS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFTableFeaturePropInstructionsMissVer13(List<OFInstructionId> instructionIds) {
+ this.instructionIds = instructionIds;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public int getType() {
+ return 0x1;
+ }
+
+ @Override
+ public List<OFInstructionId> getInstructionIds() {
+ return instructionIds;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFTableFeaturePropInstructionsMiss.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFTableFeaturePropInstructionsMiss.Builder {
+ final OFTableFeaturePropInstructionsMissVer13 parentMessage;
+
+ // OF message fields
+ private boolean instructionIdsSet;
+ private List<OFInstructionId> instructionIds;
+
+ BuilderWithParent(OFTableFeaturePropInstructionsMissVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public int getType() {
+ return 0x1;
+ }
+
+ @Override
+ public List<OFInstructionId> getInstructionIds() {
+ return instructionIds;
+ }
+
+ @Override
+ public OFTableFeaturePropInstructionsMiss.Builder setInstructionIds(List<OFInstructionId> instructionIds) {
+ this.instructionIds = instructionIds;
+ this.instructionIdsSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFTableFeaturePropInstructionsMiss build() {
+ List<OFInstructionId> instructionIds = this.instructionIdsSet ? this.instructionIds : parentMessage.instructionIds;
+ if(instructionIds == null)
+ throw new NullPointerException("Property instructionIds must not be null");
+
+ //
+ return new OFTableFeaturePropInstructionsMissVer13(
+ instructionIds
+ );
+ }
+
+ }
+
+ static class Builder implements OFTableFeaturePropInstructionsMiss.Builder {
+ // OF message fields
+ private boolean instructionIdsSet;
+ private List<OFInstructionId> instructionIds;
+
+ @Override
+ public int getType() {
+ return 0x1;
+ }
+
+ @Override
+ public List<OFInstructionId> getInstructionIds() {
+ return instructionIds;
+ }
+
+ @Override
+ public OFTableFeaturePropInstructionsMiss.Builder setInstructionIds(List<OFInstructionId> instructionIds) {
+ this.instructionIds = instructionIds;
+ this.instructionIdsSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFTableFeaturePropInstructionsMiss build() {
+ List<OFInstructionId> instructionIds = this.instructionIdsSet ? this.instructionIds : DEFAULT_INSTRUCTION_IDS;
+ if(instructionIds == null)
+ throw new NullPointerException("Property instructionIds must not be null");
+
+
+ return new OFTableFeaturePropInstructionsMissVer13(
+ instructionIds
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFTableFeaturePropInstructionsMiss> {
+ @Override
+ public OFTableFeaturePropInstructionsMiss readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 0x1
+ short type = bb.readShort();
+ if(type != (short) 0x1)
+ throw new OFParseError("Wrong type: Expected=0x1(0x1), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ List<OFInstructionId> instructionIds = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFInstructionIdVer13.READER);
+
+ OFTableFeaturePropInstructionsMissVer13 tableFeaturePropInstructionsMissVer13 = new OFTableFeaturePropInstructionsMissVer13(
+ instructionIds
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", tableFeaturePropInstructionsMissVer13);
+ return tableFeaturePropInstructionsMissVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFTableFeaturePropInstructionsMissVer13Funnel FUNNEL = new OFTableFeaturePropInstructionsMissVer13Funnel();
+ static class OFTableFeaturePropInstructionsMissVer13Funnel implements Funnel<OFTableFeaturePropInstructionsMissVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFTableFeaturePropInstructionsMissVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 0x1
+ sink.putShort((short) 0x1);
+ // FIXME: skip funnel of length
+ FunnelUtils.putList(message.instructionIds, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFTableFeaturePropInstructionsMissVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFTableFeaturePropInstructionsMissVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property type = 0x1
+ bb.writeShort((short) 0x1);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ ChannelUtils.writeList(bb, message.instructionIds);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFTableFeaturePropInstructionsMissVer13(");
+ b.append("instructionIds=").append(instructionIds);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFTableFeaturePropInstructionsMissVer13 other = (OFTableFeaturePropInstructionsMissVer13) obj;
+
+ if (instructionIds == null) {
+ if (other.instructionIds != null)
+ return false;
+ } else if (!instructionIds.equals(other.instructionIds))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((instructionIds == null) ? 0 : instructionIds.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropInstructionsVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropInstructionsVer13.java
new file mode 100644
index 0000000..829f553
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropInstructionsVer13.java
@@ -0,0 +1,274 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFTableFeaturePropInstructionsVer13 implements OFTableFeaturePropInstructions {
+ private static final Logger logger = LoggerFactory.getLogger(OFTableFeaturePropInstructionsVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 4;
+
+ private final static List<OFInstructionId> DEFAULT_INSTRUCTION_IDS = ImmutableList.<OFInstructionId>of();
+
+ // OF message fields
+ private final List<OFInstructionId> instructionIds;
+//
+ // Immutable default instance
+ final static OFTableFeaturePropInstructionsVer13 DEFAULT = new OFTableFeaturePropInstructionsVer13(
+ DEFAULT_INSTRUCTION_IDS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFTableFeaturePropInstructionsVer13(List<OFInstructionId> instructionIds) {
+ this.instructionIds = instructionIds;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public int getType() {
+ return 0x0;
+ }
+
+ @Override
+ public List<OFInstructionId> getInstructionIds() {
+ return instructionIds;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFTableFeaturePropInstructions.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFTableFeaturePropInstructions.Builder {
+ final OFTableFeaturePropInstructionsVer13 parentMessage;
+
+ // OF message fields
+ private boolean instructionIdsSet;
+ private List<OFInstructionId> instructionIds;
+
+ BuilderWithParent(OFTableFeaturePropInstructionsVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public int getType() {
+ return 0x0;
+ }
+
+ @Override
+ public List<OFInstructionId> getInstructionIds() {
+ return instructionIds;
+ }
+
+ @Override
+ public OFTableFeaturePropInstructions.Builder setInstructionIds(List<OFInstructionId> instructionIds) {
+ this.instructionIds = instructionIds;
+ this.instructionIdsSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFTableFeaturePropInstructions build() {
+ List<OFInstructionId> instructionIds = this.instructionIdsSet ? this.instructionIds : parentMessage.instructionIds;
+ if(instructionIds == null)
+ throw new NullPointerException("Property instructionIds must not be null");
+
+ //
+ return new OFTableFeaturePropInstructionsVer13(
+ instructionIds
+ );
+ }
+
+ }
+
+ static class Builder implements OFTableFeaturePropInstructions.Builder {
+ // OF message fields
+ private boolean instructionIdsSet;
+ private List<OFInstructionId> instructionIds;
+
+ @Override
+ public int getType() {
+ return 0x0;
+ }
+
+ @Override
+ public List<OFInstructionId> getInstructionIds() {
+ return instructionIds;
+ }
+
+ @Override
+ public OFTableFeaturePropInstructions.Builder setInstructionIds(List<OFInstructionId> instructionIds) {
+ this.instructionIds = instructionIds;
+ this.instructionIdsSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFTableFeaturePropInstructions build() {
+ List<OFInstructionId> instructionIds = this.instructionIdsSet ? this.instructionIds : DEFAULT_INSTRUCTION_IDS;
+ if(instructionIds == null)
+ throw new NullPointerException("Property instructionIds must not be null");
+
+
+ return new OFTableFeaturePropInstructionsVer13(
+ instructionIds
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFTableFeaturePropInstructions> {
+ @Override
+ public OFTableFeaturePropInstructions readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 0x0
+ short type = bb.readShort();
+ if(type != (short) 0x0)
+ throw new OFParseError("Wrong type: Expected=0x0(0x0), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ List<OFInstructionId> instructionIds = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFInstructionIdVer13.READER);
+
+ OFTableFeaturePropInstructionsVer13 tableFeaturePropInstructionsVer13 = new OFTableFeaturePropInstructionsVer13(
+ instructionIds
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", tableFeaturePropInstructionsVer13);
+ return tableFeaturePropInstructionsVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFTableFeaturePropInstructionsVer13Funnel FUNNEL = new OFTableFeaturePropInstructionsVer13Funnel();
+ static class OFTableFeaturePropInstructionsVer13Funnel implements Funnel<OFTableFeaturePropInstructionsVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFTableFeaturePropInstructionsVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 0x0
+ sink.putShort((short) 0x0);
+ // FIXME: skip funnel of length
+ FunnelUtils.putList(message.instructionIds, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFTableFeaturePropInstructionsVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFTableFeaturePropInstructionsVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property type = 0x0
+ bb.writeShort((short) 0x0);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ ChannelUtils.writeList(bb, message.instructionIds);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFTableFeaturePropInstructionsVer13(");
+ b.append("instructionIds=").append(instructionIds);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFTableFeaturePropInstructionsVer13 other = (OFTableFeaturePropInstructionsVer13) obj;
+
+ if (instructionIds == null) {
+ if (other.instructionIds != null)
+ return false;
+ } else if (!instructionIds.equals(other.instructionIds))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((instructionIds == null) ? 0 : instructionIds.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropMatchVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropMatchVer13.java
new file mode 100644
index 0000000..ab2cbe8
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropMatchVer13.java
@@ -0,0 +1,274 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFTableFeaturePropMatchVer13 implements OFTableFeaturePropMatch {
+ private static final Logger logger = LoggerFactory.getLogger(OFTableFeaturePropMatchVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 4;
+
+ private final static List<U32> DEFAULT_OXM_IDS = ImmutableList.<U32>of();
+
+ // OF message fields
+ private final List<U32> oxmIds;
+//
+ // Immutable default instance
+ final static OFTableFeaturePropMatchVer13 DEFAULT = new OFTableFeaturePropMatchVer13(
+ DEFAULT_OXM_IDS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFTableFeaturePropMatchVer13(List<U32> oxmIds) {
+ this.oxmIds = oxmIds;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public int getType() {
+ return 0x8;
+ }
+
+ @Override
+ public List<U32> getOxmIds() {
+ return oxmIds;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFTableFeaturePropMatch.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFTableFeaturePropMatch.Builder {
+ final OFTableFeaturePropMatchVer13 parentMessage;
+
+ // OF message fields
+ private boolean oxmIdsSet;
+ private List<U32> oxmIds;
+
+ BuilderWithParent(OFTableFeaturePropMatchVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public int getType() {
+ return 0x8;
+ }
+
+ @Override
+ public List<U32> getOxmIds() {
+ return oxmIds;
+ }
+
+ @Override
+ public OFTableFeaturePropMatch.Builder setOxmIds(List<U32> oxmIds) {
+ this.oxmIds = oxmIds;
+ this.oxmIdsSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFTableFeaturePropMatch build() {
+ List<U32> oxmIds = this.oxmIdsSet ? this.oxmIds : parentMessage.oxmIds;
+ if(oxmIds == null)
+ throw new NullPointerException("Property oxmIds must not be null");
+
+ //
+ return new OFTableFeaturePropMatchVer13(
+ oxmIds
+ );
+ }
+
+ }
+
+ static class Builder implements OFTableFeaturePropMatch.Builder {
+ // OF message fields
+ private boolean oxmIdsSet;
+ private List<U32> oxmIds;
+
+ @Override
+ public int getType() {
+ return 0x8;
+ }
+
+ @Override
+ public List<U32> getOxmIds() {
+ return oxmIds;
+ }
+
+ @Override
+ public OFTableFeaturePropMatch.Builder setOxmIds(List<U32> oxmIds) {
+ this.oxmIds = oxmIds;
+ this.oxmIdsSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFTableFeaturePropMatch build() {
+ List<U32> oxmIds = this.oxmIdsSet ? this.oxmIds : DEFAULT_OXM_IDS;
+ if(oxmIds == null)
+ throw new NullPointerException("Property oxmIds must not be null");
+
+
+ return new OFTableFeaturePropMatchVer13(
+ oxmIds
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFTableFeaturePropMatch> {
+ @Override
+ public OFTableFeaturePropMatch readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 0x8
+ short type = bb.readShort();
+ if(type != (short) 0x8)
+ throw new OFParseError("Wrong type: Expected=0x8(0x8), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ List<U32> oxmIds = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), U32.READER);
+
+ OFTableFeaturePropMatchVer13 tableFeaturePropMatchVer13 = new OFTableFeaturePropMatchVer13(
+ oxmIds
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", tableFeaturePropMatchVer13);
+ return tableFeaturePropMatchVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFTableFeaturePropMatchVer13Funnel FUNNEL = new OFTableFeaturePropMatchVer13Funnel();
+ static class OFTableFeaturePropMatchVer13Funnel implements Funnel<OFTableFeaturePropMatchVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFTableFeaturePropMatchVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 0x8
+ sink.putShort((short) 0x8);
+ // FIXME: skip funnel of length
+ FunnelUtils.putList(message.oxmIds, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFTableFeaturePropMatchVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFTableFeaturePropMatchVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property type = 0x8
+ bb.writeShort((short) 0x8);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ ChannelUtils.writeList(bb, message.oxmIds);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFTableFeaturePropMatchVer13(");
+ b.append("oxmIds=").append(oxmIds);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFTableFeaturePropMatchVer13 other = (OFTableFeaturePropMatchVer13) obj;
+
+ if (oxmIds == null) {
+ if (other.oxmIds != null)
+ return false;
+ } else if (!oxmIds.equals(other.oxmIds))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((oxmIds == null) ? 0 : oxmIds.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropNextTablesMissVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropNextTablesMissVer13.java
new file mode 100644
index 0000000..150bd06
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropNextTablesMissVer13.java
@@ -0,0 +1,274 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFTableFeaturePropNextTablesMissVer13 implements OFTableFeaturePropNextTablesMiss {
+ private static final Logger logger = LoggerFactory.getLogger(OFTableFeaturePropNextTablesMissVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 4;
+
+ private final static List<U8> DEFAULT_NEXT_TABLE_IDS = ImmutableList.<U8>of();
+
+ // OF message fields
+ private final List<U8> nextTableIds;
+//
+ // Immutable default instance
+ final static OFTableFeaturePropNextTablesMissVer13 DEFAULT = new OFTableFeaturePropNextTablesMissVer13(
+ DEFAULT_NEXT_TABLE_IDS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFTableFeaturePropNextTablesMissVer13(List<U8> nextTableIds) {
+ this.nextTableIds = nextTableIds;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public int getType() {
+ return 0x3;
+ }
+
+ @Override
+ public List<U8> getNextTableIds() {
+ return nextTableIds;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFTableFeaturePropNextTablesMiss.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFTableFeaturePropNextTablesMiss.Builder {
+ final OFTableFeaturePropNextTablesMissVer13 parentMessage;
+
+ // OF message fields
+ private boolean nextTableIdsSet;
+ private List<U8> nextTableIds;
+
+ BuilderWithParent(OFTableFeaturePropNextTablesMissVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public int getType() {
+ return 0x3;
+ }
+
+ @Override
+ public List<U8> getNextTableIds() {
+ return nextTableIds;
+ }
+
+ @Override
+ public OFTableFeaturePropNextTablesMiss.Builder setNextTableIds(List<U8> nextTableIds) {
+ this.nextTableIds = nextTableIds;
+ this.nextTableIdsSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFTableFeaturePropNextTablesMiss build() {
+ List<U8> nextTableIds = this.nextTableIdsSet ? this.nextTableIds : parentMessage.nextTableIds;
+ if(nextTableIds == null)
+ throw new NullPointerException("Property nextTableIds must not be null");
+
+ //
+ return new OFTableFeaturePropNextTablesMissVer13(
+ nextTableIds
+ );
+ }
+
+ }
+
+ static class Builder implements OFTableFeaturePropNextTablesMiss.Builder {
+ // OF message fields
+ private boolean nextTableIdsSet;
+ private List<U8> nextTableIds;
+
+ @Override
+ public int getType() {
+ return 0x3;
+ }
+
+ @Override
+ public List<U8> getNextTableIds() {
+ return nextTableIds;
+ }
+
+ @Override
+ public OFTableFeaturePropNextTablesMiss.Builder setNextTableIds(List<U8> nextTableIds) {
+ this.nextTableIds = nextTableIds;
+ this.nextTableIdsSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFTableFeaturePropNextTablesMiss build() {
+ List<U8> nextTableIds = this.nextTableIdsSet ? this.nextTableIds : DEFAULT_NEXT_TABLE_IDS;
+ if(nextTableIds == null)
+ throw new NullPointerException("Property nextTableIds must not be null");
+
+
+ return new OFTableFeaturePropNextTablesMissVer13(
+ nextTableIds
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFTableFeaturePropNextTablesMiss> {
+ @Override
+ public OFTableFeaturePropNextTablesMiss readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 0x3
+ short type = bb.readShort();
+ if(type != (short) 0x3)
+ throw new OFParseError("Wrong type: Expected=0x3(0x3), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ List<U8> nextTableIds = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), U8.READER);
+
+ OFTableFeaturePropNextTablesMissVer13 tableFeaturePropNextTablesMissVer13 = new OFTableFeaturePropNextTablesMissVer13(
+ nextTableIds
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", tableFeaturePropNextTablesMissVer13);
+ return tableFeaturePropNextTablesMissVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFTableFeaturePropNextTablesMissVer13Funnel FUNNEL = new OFTableFeaturePropNextTablesMissVer13Funnel();
+ static class OFTableFeaturePropNextTablesMissVer13Funnel implements Funnel<OFTableFeaturePropNextTablesMissVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFTableFeaturePropNextTablesMissVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 0x3
+ sink.putShort((short) 0x3);
+ // FIXME: skip funnel of length
+ FunnelUtils.putList(message.nextTableIds, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFTableFeaturePropNextTablesMissVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFTableFeaturePropNextTablesMissVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property type = 0x3
+ bb.writeShort((short) 0x3);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ ChannelUtils.writeList(bb, message.nextTableIds);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFTableFeaturePropNextTablesMissVer13(");
+ b.append("nextTableIds=").append(nextTableIds);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFTableFeaturePropNextTablesMissVer13 other = (OFTableFeaturePropNextTablesMissVer13) obj;
+
+ if (nextTableIds == null) {
+ if (other.nextTableIds != null)
+ return false;
+ } else if (!nextTableIds.equals(other.nextTableIds))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((nextTableIds == null) ? 0 : nextTableIds.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropNextTablesVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropNextTablesVer13.java
new file mode 100644
index 0000000..6bb6d93
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropNextTablesVer13.java
@@ -0,0 +1,274 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFTableFeaturePropNextTablesVer13 implements OFTableFeaturePropNextTables {
+ private static final Logger logger = LoggerFactory.getLogger(OFTableFeaturePropNextTablesVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 4;
+
+ private final static List<U8> DEFAULT_NEXT_TABLE_IDS = ImmutableList.<U8>of();
+
+ // OF message fields
+ private final List<U8> nextTableIds;
+//
+ // Immutable default instance
+ final static OFTableFeaturePropNextTablesVer13 DEFAULT = new OFTableFeaturePropNextTablesVer13(
+ DEFAULT_NEXT_TABLE_IDS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFTableFeaturePropNextTablesVer13(List<U8> nextTableIds) {
+ this.nextTableIds = nextTableIds;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public int getType() {
+ return 0x2;
+ }
+
+ @Override
+ public List<U8> getNextTableIds() {
+ return nextTableIds;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFTableFeaturePropNextTables.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFTableFeaturePropNextTables.Builder {
+ final OFTableFeaturePropNextTablesVer13 parentMessage;
+
+ // OF message fields
+ private boolean nextTableIdsSet;
+ private List<U8> nextTableIds;
+
+ BuilderWithParent(OFTableFeaturePropNextTablesVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public int getType() {
+ return 0x2;
+ }
+
+ @Override
+ public List<U8> getNextTableIds() {
+ return nextTableIds;
+ }
+
+ @Override
+ public OFTableFeaturePropNextTables.Builder setNextTableIds(List<U8> nextTableIds) {
+ this.nextTableIds = nextTableIds;
+ this.nextTableIdsSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFTableFeaturePropNextTables build() {
+ List<U8> nextTableIds = this.nextTableIdsSet ? this.nextTableIds : parentMessage.nextTableIds;
+ if(nextTableIds == null)
+ throw new NullPointerException("Property nextTableIds must not be null");
+
+ //
+ return new OFTableFeaturePropNextTablesVer13(
+ nextTableIds
+ );
+ }
+
+ }
+
+ static class Builder implements OFTableFeaturePropNextTables.Builder {
+ // OF message fields
+ private boolean nextTableIdsSet;
+ private List<U8> nextTableIds;
+
+ @Override
+ public int getType() {
+ return 0x2;
+ }
+
+ @Override
+ public List<U8> getNextTableIds() {
+ return nextTableIds;
+ }
+
+ @Override
+ public OFTableFeaturePropNextTables.Builder setNextTableIds(List<U8> nextTableIds) {
+ this.nextTableIds = nextTableIds;
+ this.nextTableIdsSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFTableFeaturePropNextTables build() {
+ List<U8> nextTableIds = this.nextTableIdsSet ? this.nextTableIds : DEFAULT_NEXT_TABLE_IDS;
+ if(nextTableIds == null)
+ throw new NullPointerException("Property nextTableIds must not be null");
+
+
+ return new OFTableFeaturePropNextTablesVer13(
+ nextTableIds
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFTableFeaturePropNextTables> {
+ @Override
+ public OFTableFeaturePropNextTables readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 0x2
+ short type = bb.readShort();
+ if(type != (short) 0x2)
+ throw new OFParseError("Wrong type: Expected=0x2(0x2), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ List<U8> nextTableIds = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), U8.READER);
+
+ OFTableFeaturePropNextTablesVer13 tableFeaturePropNextTablesVer13 = new OFTableFeaturePropNextTablesVer13(
+ nextTableIds
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", tableFeaturePropNextTablesVer13);
+ return tableFeaturePropNextTablesVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFTableFeaturePropNextTablesVer13Funnel FUNNEL = new OFTableFeaturePropNextTablesVer13Funnel();
+ static class OFTableFeaturePropNextTablesVer13Funnel implements Funnel<OFTableFeaturePropNextTablesVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFTableFeaturePropNextTablesVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 0x2
+ sink.putShort((short) 0x2);
+ // FIXME: skip funnel of length
+ FunnelUtils.putList(message.nextTableIds, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFTableFeaturePropNextTablesVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFTableFeaturePropNextTablesVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property type = 0x2
+ bb.writeShort((short) 0x2);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ ChannelUtils.writeList(bb, message.nextTableIds);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFTableFeaturePropNextTablesVer13(");
+ b.append("nextTableIds=").append(nextTableIds);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFTableFeaturePropNextTablesVer13 other = (OFTableFeaturePropNextTablesVer13) obj;
+
+ if (nextTableIds == null) {
+ if (other.nextTableIds != null)
+ return false;
+ } else if (!nextTableIds.equals(other.nextTableIds))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((nextTableIds == null) ? 0 : nextTableIds.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropTypeSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropTypeSerializerVer13.java
new file mode 100644
index 0000000..a3524f5
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropTypeSerializerVer13.java
@@ -0,0 +1,144 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFTableFeaturePropType;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+
+public class OFTableFeaturePropTypeSerializerVer13 {
+
+ public final static short INSTRUCTIONS_VAL = (short) 0x0;
+ public final static short INSTRUCTIONS_MISS_VAL = (short) 0x1;
+ public final static short NEXT_TABLES_VAL = (short) 0x2;
+ public final static short NEXT_TABLES_MISS_VAL = (short) 0x3;
+ public final static short WRITE_ACTIONS_VAL = (short) 0x4;
+ public final static short WRITE_ACTIONS_MISS_VAL = (short) 0x5;
+ public final static short APPLY_ACTIONS_VAL = (short) 0x6;
+ public final static short APPLY_ACTIONS_MISS_VAL = (short) 0x7;
+ public final static short MATCH_VAL = (short) 0x8;
+ public final static short WILDCARDS_VAL = (short) 0xa;
+ public final static short WRITE_SETFIELD_VAL = (short) 0xc;
+ public final static short WRITE_SETFIELD_MISS_VAL = (short) 0xd;
+ public final static short APPLY_SETFIELD_VAL = (short) 0xe;
+ public final static short APPLY_SETFIELD_MISS_VAL = (short) 0xf;
+ public final static short EXPERIMENTER_VAL = (short) 0xfffe;
+ public final static short EXPERIMENTER_MISS_VAL = (short) 0xffff;
+
+ public static OFTableFeaturePropType readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readShort());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, OFTableFeaturePropType e) {
+ bb.writeShort(toWireValue(e));
+ }
+
+ public static void putTo(OFTableFeaturePropType e, PrimitiveSink sink) {
+ sink.putShort(toWireValue(e));
+ }
+
+ public static OFTableFeaturePropType ofWireValue(short val) {
+ switch(val) {
+ case INSTRUCTIONS_VAL:
+ return OFTableFeaturePropType.INSTRUCTIONS;
+ case INSTRUCTIONS_MISS_VAL:
+ return OFTableFeaturePropType.INSTRUCTIONS_MISS;
+ case NEXT_TABLES_VAL:
+ return OFTableFeaturePropType.NEXT_TABLES;
+ case NEXT_TABLES_MISS_VAL:
+ return OFTableFeaturePropType.NEXT_TABLES_MISS;
+ case WRITE_ACTIONS_VAL:
+ return OFTableFeaturePropType.WRITE_ACTIONS;
+ case WRITE_ACTIONS_MISS_VAL:
+ return OFTableFeaturePropType.WRITE_ACTIONS_MISS;
+ case APPLY_ACTIONS_VAL:
+ return OFTableFeaturePropType.APPLY_ACTIONS;
+ case APPLY_ACTIONS_MISS_VAL:
+ return OFTableFeaturePropType.APPLY_ACTIONS_MISS;
+ case MATCH_VAL:
+ return OFTableFeaturePropType.MATCH;
+ case WILDCARDS_VAL:
+ return OFTableFeaturePropType.WILDCARDS;
+ case WRITE_SETFIELD_VAL:
+ return OFTableFeaturePropType.WRITE_SETFIELD;
+ case WRITE_SETFIELD_MISS_VAL:
+ return OFTableFeaturePropType.WRITE_SETFIELD_MISS;
+ case APPLY_SETFIELD_VAL:
+ return OFTableFeaturePropType.APPLY_SETFIELD;
+ case APPLY_SETFIELD_MISS_VAL:
+ return OFTableFeaturePropType.APPLY_SETFIELD_MISS;
+ case EXPERIMENTER_VAL:
+ return OFTableFeaturePropType.EXPERIMENTER;
+ case EXPERIMENTER_MISS_VAL:
+ return OFTableFeaturePropType.EXPERIMENTER_MISS;
+ default:
+ throw new IllegalArgumentException("Illegal wire value for type OFTableFeaturePropType in version 1.3: " + val);
+ }
+ }
+
+
+ public static short toWireValue(OFTableFeaturePropType e) {
+ switch(e) {
+ case INSTRUCTIONS:
+ return INSTRUCTIONS_VAL;
+ case INSTRUCTIONS_MISS:
+ return INSTRUCTIONS_MISS_VAL;
+ case NEXT_TABLES:
+ return NEXT_TABLES_VAL;
+ case NEXT_TABLES_MISS:
+ return NEXT_TABLES_MISS_VAL;
+ case WRITE_ACTIONS:
+ return WRITE_ACTIONS_VAL;
+ case WRITE_ACTIONS_MISS:
+ return WRITE_ACTIONS_MISS_VAL;
+ case APPLY_ACTIONS:
+ return APPLY_ACTIONS_VAL;
+ case APPLY_ACTIONS_MISS:
+ return APPLY_ACTIONS_MISS_VAL;
+ case MATCH:
+ return MATCH_VAL;
+ case WILDCARDS:
+ return WILDCARDS_VAL;
+ case WRITE_SETFIELD:
+ return WRITE_SETFIELD_VAL;
+ case WRITE_SETFIELD_MISS:
+ return WRITE_SETFIELD_MISS_VAL;
+ case APPLY_SETFIELD:
+ return APPLY_SETFIELD_VAL;
+ case APPLY_SETFIELD_MISS:
+ return APPLY_SETFIELD_MISS_VAL;
+ case EXPERIMENTER:
+ return EXPERIMENTER_VAL;
+ case EXPERIMENTER_MISS:
+ return EXPERIMENTER_MISS_VAL;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFTableFeaturePropType in version 1.3: " + e);
+ }
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropVer13.java
new file mode 100644
index 0000000..833639b
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropVer13.java
@@ -0,0 +1,99 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_virtual_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.jboss.netty.buffer.ChannelBuffer;
+import java.util.Set;
+
+abstract class OFTableFeaturePropVer13 {
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 4;
+
+
+ public final static OFTableFeaturePropVer13.Reader READER = new Reader();
+
+ static class Reader implements OFMessageReader<OFTableFeatureProp> {
+ @Override
+ public OFTableFeatureProp readFrom(ChannelBuffer bb) throws OFParseError {
+ if(bb.readableBytes() < MINIMUM_LENGTH)
+ return null;
+ int start = bb.readerIndex();
+ short type = bb.readShort();
+ bb.readerIndex(start);
+ switch(type) {
+ case (short) 0x6:
+ // discriminator value 0x6=0x6 for class OFTableFeaturePropApplyActionsVer13
+ return OFTableFeaturePropApplyActionsVer13.READER.readFrom(bb);
+ case (short) 0x7:
+ // discriminator value 0x7=0x7 for class OFTableFeaturePropApplyActionsMissVer13
+ return OFTableFeaturePropApplyActionsMissVer13.READER.readFrom(bb);
+ case (short) 0xe:
+ // discriminator value 0xe=0xe for class OFTableFeaturePropApplySetfieldVer13
+ return OFTableFeaturePropApplySetfieldVer13.READER.readFrom(bb);
+ case (short) 0xf:
+ // discriminator value 0xf=0xf for class OFTableFeaturePropApplySetfieldMissVer13
+ return OFTableFeaturePropApplySetfieldMissVer13.READER.readFrom(bb);
+ case (short) 0xfffe:
+ // discriminator value 0xfffe=0xfffe for class OFTableFeaturePropExperimenterVer13
+ return OFTableFeaturePropExperimenterVer13.READER.readFrom(bb);
+ case (short) 0xffff:
+ // discriminator value 0xffff=0xffff for class OFTableFeaturePropExperimenterMissVer13
+ return OFTableFeaturePropExperimenterMissVer13.READER.readFrom(bb);
+ case (short) 0x0:
+ // discriminator value 0x0=0x0 for class OFTableFeaturePropInstructionsVer13
+ return OFTableFeaturePropInstructionsVer13.READER.readFrom(bb);
+ case (short) 0x1:
+ // discriminator value 0x1=0x1 for class OFTableFeaturePropInstructionsMissVer13
+ return OFTableFeaturePropInstructionsMissVer13.READER.readFrom(bb);
+ case (short) 0x8:
+ // discriminator value 0x8=0x8 for class OFTableFeaturePropMatchVer13
+ return OFTableFeaturePropMatchVer13.READER.readFrom(bb);
+ case (short) 0x2:
+ // discriminator value 0x2=0x2 for class OFTableFeaturePropNextTablesVer13
+ return OFTableFeaturePropNextTablesVer13.READER.readFrom(bb);
+ case (short) 0x3:
+ // discriminator value 0x3=0x3 for class OFTableFeaturePropNextTablesMissVer13
+ return OFTableFeaturePropNextTablesMissVer13.READER.readFrom(bb);
+ case (short) 0xa:
+ // discriminator value 0xa=0xa for class OFTableFeaturePropWildcardsVer13
+ return OFTableFeaturePropWildcardsVer13.READER.readFrom(bb);
+ case (short) 0x4:
+ // discriminator value 0x4=0x4 for class OFTableFeaturePropWriteActionsVer13
+ return OFTableFeaturePropWriteActionsVer13.READER.readFrom(bb);
+ case (short) 0x5:
+ // discriminator value 0x5=0x5 for class OFTableFeaturePropWriteActionsMissVer13
+ return OFTableFeaturePropWriteActionsMissVer13.READER.readFrom(bb);
+ case (short) 0xc:
+ // discriminator value 0xc=0xc for class OFTableFeaturePropWriteSetfieldVer13
+ return OFTableFeaturePropWriteSetfieldVer13.READER.readFrom(bb);
+ case (short) 0xd:
+ // discriminator value 0xd=0xd for class OFTableFeaturePropWriteSetfieldMissVer13
+ return OFTableFeaturePropWriteSetfieldMissVer13.READER.readFrom(bb);
+ default:
+ throw new OFParseError("Unknown value for discriminator type of class OFTableFeaturePropVer13: " + type);
+ }
+ }
+ }
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropWildcardsVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropWildcardsVer13.java
new file mode 100644
index 0000000..66db46d
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropWildcardsVer13.java
@@ -0,0 +1,274 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFTableFeaturePropWildcardsVer13 implements OFTableFeaturePropWildcards {
+ private static final Logger logger = LoggerFactory.getLogger(OFTableFeaturePropWildcardsVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 4;
+
+ private final static List<U32> DEFAULT_OXM_IDS = ImmutableList.<U32>of();
+
+ // OF message fields
+ private final List<U32> oxmIds;
+//
+ // Immutable default instance
+ final static OFTableFeaturePropWildcardsVer13 DEFAULT = new OFTableFeaturePropWildcardsVer13(
+ DEFAULT_OXM_IDS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFTableFeaturePropWildcardsVer13(List<U32> oxmIds) {
+ this.oxmIds = oxmIds;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public int getType() {
+ return 0xa;
+ }
+
+ @Override
+ public List<U32> getOxmIds() {
+ return oxmIds;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFTableFeaturePropWildcards.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFTableFeaturePropWildcards.Builder {
+ final OFTableFeaturePropWildcardsVer13 parentMessage;
+
+ // OF message fields
+ private boolean oxmIdsSet;
+ private List<U32> oxmIds;
+
+ BuilderWithParent(OFTableFeaturePropWildcardsVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public int getType() {
+ return 0xa;
+ }
+
+ @Override
+ public List<U32> getOxmIds() {
+ return oxmIds;
+ }
+
+ @Override
+ public OFTableFeaturePropWildcards.Builder setOxmIds(List<U32> oxmIds) {
+ this.oxmIds = oxmIds;
+ this.oxmIdsSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFTableFeaturePropWildcards build() {
+ List<U32> oxmIds = this.oxmIdsSet ? this.oxmIds : parentMessage.oxmIds;
+ if(oxmIds == null)
+ throw new NullPointerException("Property oxmIds must not be null");
+
+ //
+ return new OFTableFeaturePropWildcardsVer13(
+ oxmIds
+ );
+ }
+
+ }
+
+ static class Builder implements OFTableFeaturePropWildcards.Builder {
+ // OF message fields
+ private boolean oxmIdsSet;
+ private List<U32> oxmIds;
+
+ @Override
+ public int getType() {
+ return 0xa;
+ }
+
+ @Override
+ public List<U32> getOxmIds() {
+ return oxmIds;
+ }
+
+ @Override
+ public OFTableFeaturePropWildcards.Builder setOxmIds(List<U32> oxmIds) {
+ this.oxmIds = oxmIds;
+ this.oxmIdsSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFTableFeaturePropWildcards build() {
+ List<U32> oxmIds = this.oxmIdsSet ? this.oxmIds : DEFAULT_OXM_IDS;
+ if(oxmIds == null)
+ throw new NullPointerException("Property oxmIds must not be null");
+
+
+ return new OFTableFeaturePropWildcardsVer13(
+ oxmIds
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFTableFeaturePropWildcards> {
+ @Override
+ public OFTableFeaturePropWildcards readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 0xa
+ short type = bb.readShort();
+ if(type != (short) 0xa)
+ throw new OFParseError("Wrong type: Expected=0xa(0xa), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ List<U32> oxmIds = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), U32.READER);
+
+ OFTableFeaturePropWildcardsVer13 tableFeaturePropWildcardsVer13 = new OFTableFeaturePropWildcardsVer13(
+ oxmIds
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", tableFeaturePropWildcardsVer13);
+ return tableFeaturePropWildcardsVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFTableFeaturePropWildcardsVer13Funnel FUNNEL = new OFTableFeaturePropWildcardsVer13Funnel();
+ static class OFTableFeaturePropWildcardsVer13Funnel implements Funnel<OFTableFeaturePropWildcardsVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFTableFeaturePropWildcardsVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 0xa
+ sink.putShort((short) 0xa);
+ // FIXME: skip funnel of length
+ FunnelUtils.putList(message.oxmIds, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFTableFeaturePropWildcardsVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFTableFeaturePropWildcardsVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property type = 0xa
+ bb.writeShort((short) 0xa);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ ChannelUtils.writeList(bb, message.oxmIds);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFTableFeaturePropWildcardsVer13(");
+ b.append("oxmIds=").append(oxmIds);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFTableFeaturePropWildcardsVer13 other = (OFTableFeaturePropWildcardsVer13) obj;
+
+ if (oxmIds == null) {
+ if (other.oxmIds != null)
+ return false;
+ } else if (!oxmIds.equals(other.oxmIds))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((oxmIds == null) ? 0 : oxmIds.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropWriteActionsMissVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropWriteActionsMissVer13.java
new file mode 100644
index 0000000..ce905bc
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropWriteActionsMissVer13.java
@@ -0,0 +1,274 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFTableFeaturePropWriteActionsMissVer13 implements OFTableFeaturePropWriteActionsMiss {
+ private static final Logger logger = LoggerFactory.getLogger(OFTableFeaturePropWriteActionsMissVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 4;
+
+ private final static List<OFActionId> DEFAULT_ACTION_IDS = ImmutableList.<OFActionId>of();
+
+ // OF message fields
+ private final List<OFActionId> actionIds;
+//
+ // Immutable default instance
+ final static OFTableFeaturePropWriteActionsMissVer13 DEFAULT = new OFTableFeaturePropWriteActionsMissVer13(
+ DEFAULT_ACTION_IDS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFTableFeaturePropWriteActionsMissVer13(List<OFActionId> actionIds) {
+ this.actionIds = actionIds;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public int getType() {
+ return 0x5;
+ }
+
+ @Override
+ public List<OFActionId> getActionIds() {
+ return actionIds;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFTableFeaturePropWriteActionsMiss.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFTableFeaturePropWriteActionsMiss.Builder {
+ final OFTableFeaturePropWriteActionsMissVer13 parentMessage;
+
+ // OF message fields
+ private boolean actionIdsSet;
+ private List<OFActionId> actionIds;
+
+ BuilderWithParent(OFTableFeaturePropWriteActionsMissVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public int getType() {
+ return 0x5;
+ }
+
+ @Override
+ public List<OFActionId> getActionIds() {
+ return actionIds;
+ }
+
+ @Override
+ public OFTableFeaturePropWriteActionsMiss.Builder setActionIds(List<OFActionId> actionIds) {
+ this.actionIds = actionIds;
+ this.actionIdsSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFTableFeaturePropWriteActionsMiss build() {
+ List<OFActionId> actionIds = this.actionIdsSet ? this.actionIds : parentMessage.actionIds;
+ if(actionIds == null)
+ throw new NullPointerException("Property actionIds must not be null");
+
+ //
+ return new OFTableFeaturePropWriteActionsMissVer13(
+ actionIds
+ );
+ }
+
+ }
+
+ static class Builder implements OFTableFeaturePropWriteActionsMiss.Builder {
+ // OF message fields
+ private boolean actionIdsSet;
+ private List<OFActionId> actionIds;
+
+ @Override
+ public int getType() {
+ return 0x5;
+ }
+
+ @Override
+ public List<OFActionId> getActionIds() {
+ return actionIds;
+ }
+
+ @Override
+ public OFTableFeaturePropWriteActionsMiss.Builder setActionIds(List<OFActionId> actionIds) {
+ this.actionIds = actionIds;
+ this.actionIdsSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFTableFeaturePropWriteActionsMiss build() {
+ List<OFActionId> actionIds = this.actionIdsSet ? this.actionIds : DEFAULT_ACTION_IDS;
+ if(actionIds == null)
+ throw new NullPointerException("Property actionIds must not be null");
+
+
+ return new OFTableFeaturePropWriteActionsMissVer13(
+ actionIds
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFTableFeaturePropWriteActionsMiss> {
+ @Override
+ public OFTableFeaturePropWriteActionsMiss readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 0x5
+ short type = bb.readShort();
+ if(type != (short) 0x5)
+ throw new OFParseError("Wrong type: Expected=0x5(0x5), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ List<OFActionId> actionIds = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFActionIdVer13.READER);
+
+ OFTableFeaturePropWriteActionsMissVer13 tableFeaturePropWriteActionsMissVer13 = new OFTableFeaturePropWriteActionsMissVer13(
+ actionIds
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", tableFeaturePropWriteActionsMissVer13);
+ return tableFeaturePropWriteActionsMissVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFTableFeaturePropWriteActionsMissVer13Funnel FUNNEL = new OFTableFeaturePropWriteActionsMissVer13Funnel();
+ static class OFTableFeaturePropWriteActionsMissVer13Funnel implements Funnel<OFTableFeaturePropWriteActionsMissVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFTableFeaturePropWriteActionsMissVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 0x5
+ sink.putShort((short) 0x5);
+ // FIXME: skip funnel of length
+ FunnelUtils.putList(message.actionIds, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFTableFeaturePropWriteActionsMissVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFTableFeaturePropWriteActionsMissVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property type = 0x5
+ bb.writeShort((short) 0x5);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ ChannelUtils.writeList(bb, message.actionIds);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFTableFeaturePropWriteActionsMissVer13(");
+ b.append("actionIds=").append(actionIds);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFTableFeaturePropWriteActionsMissVer13 other = (OFTableFeaturePropWriteActionsMissVer13) obj;
+
+ if (actionIds == null) {
+ if (other.actionIds != null)
+ return false;
+ } else if (!actionIds.equals(other.actionIds))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((actionIds == null) ? 0 : actionIds.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropWriteActionsVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropWriteActionsVer13.java
new file mode 100644
index 0000000..54a2130
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropWriteActionsVer13.java
@@ -0,0 +1,274 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFTableFeaturePropWriteActionsVer13 implements OFTableFeaturePropWriteActions {
+ private static final Logger logger = LoggerFactory.getLogger(OFTableFeaturePropWriteActionsVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 4;
+
+ private final static List<OFActionId> DEFAULT_ACTION_IDS = ImmutableList.<OFActionId>of();
+
+ // OF message fields
+ private final List<OFActionId> actionIds;
+//
+ // Immutable default instance
+ final static OFTableFeaturePropWriteActionsVer13 DEFAULT = new OFTableFeaturePropWriteActionsVer13(
+ DEFAULT_ACTION_IDS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFTableFeaturePropWriteActionsVer13(List<OFActionId> actionIds) {
+ this.actionIds = actionIds;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public int getType() {
+ return 0x4;
+ }
+
+ @Override
+ public List<OFActionId> getActionIds() {
+ return actionIds;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFTableFeaturePropWriteActions.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFTableFeaturePropWriteActions.Builder {
+ final OFTableFeaturePropWriteActionsVer13 parentMessage;
+
+ // OF message fields
+ private boolean actionIdsSet;
+ private List<OFActionId> actionIds;
+
+ BuilderWithParent(OFTableFeaturePropWriteActionsVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public int getType() {
+ return 0x4;
+ }
+
+ @Override
+ public List<OFActionId> getActionIds() {
+ return actionIds;
+ }
+
+ @Override
+ public OFTableFeaturePropWriteActions.Builder setActionIds(List<OFActionId> actionIds) {
+ this.actionIds = actionIds;
+ this.actionIdsSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFTableFeaturePropWriteActions build() {
+ List<OFActionId> actionIds = this.actionIdsSet ? this.actionIds : parentMessage.actionIds;
+ if(actionIds == null)
+ throw new NullPointerException("Property actionIds must not be null");
+
+ //
+ return new OFTableFeaturePropWriteActionsVer13(
+ actionIds
+ );
+ }
+
+ }
+
+ static class Builder implements OFTableFeaturePropWriteActions.Builder {
+ // OF message fields
+ private boolean actionIdsSet;
+ private List<OFActionId> actionIds;
+
+ @Override
+ public int getType() {
+ return 0x4;
+ }
+
+ @Override
+ public List<OFActionId> getActionIds() {
+ return actionIds;
+ }
+
+ @Override
+ public OFTableFeaturePropWriteActions.Builder setActionIds(List<OFActionId> actionIds) {
+ this.actionIds = actionIds;
+ this.actionIdsSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFTableFeaturePropWriteActions build() {
+ List<OFActionId> actionIds = this.actionIdsSet ? this.actionIds : DEFAULT_ACTION_IDS;
+ if(actionIds == null)
+ throw new NullPointerException("Property actionIds must not be null");
+
+
+ return new OFTableFeaturePropWriteActionsVer13(
+ actionIds
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFTableFeaturePropWriteActions> {
+ @Override
+ public OFTableFeaturePropWriteActions readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 0x4
+ short type = bb.readShort();
+ if(type != (short) 0x4)
+ throw new OFParseError("Wrong type: Expected=0x4(0x4), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ List<OFActionId> actionIds = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFActionIdVer13.READER);
+
+ OFTableFeaturePropWriteActionsVer13 tableFeaturePropWriteActionsVer13 = new OFTableFeaturePropWriteActionsVer13(
+ actionIds
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", tableFeaturePropWriteActionsVer13);
+ return tableFeaturePropWriteActionsVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFTableFeaturePropWriteActionsVer13Funnel FUNNEL = new OFTableFeaturePropWriteActionsVer13Funnel();
+ static class OFTableFeaturePropWriteActionsVer13Funnel implements Funnel<OFTableFeaturePropWriteActionsVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFTableFeaturePropWriteActionsVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 0x4
+ sink.putShort((short) 0x4);
+ // FIXME: skip funnel of length
+ FunnelUtils.putList(message.actionIds, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFTableFeaturePropWriteActionsVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFTableFeaturePropWriteActionsVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property type = 0x4
+ bb.writeShort((short) 0x4);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ ChannelUtils.writeList(bb, message.actionIds);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFTableFeaturePropWriteActionsVer13(");
+ b.append("actionIds=").append(actionIds);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFTableFeaturePropWriteActionsVer13 other = (OFTableFeaturePropWriteActionsVer13) obj;
+
+ if (actionIds == null) {
+ if (other.actionIds != null)
+ return false;
+ } else if (!actionIds.equals(other.actionIds))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((actionIds == null) ? 0 : actionIds.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropWriteSetfieldMissVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropWriteSetfieldMissVer13.java
new file mode 100644
index 0000000..6c87079
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropWriteSetfieldMissVer13.java
@@ -0,0 +1,274 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import java.util.Set;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFTableFeaturePropWriteSetfieldMissVer13 implements OFTableFeaturePropWriteSetfieldMiss {
+ private static final Logger logger = LoggerFactory.getLogger(OFTableFeaturePropWriteSetfieldMissVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 4;
+
+ private final static List<U32> DEFAULT_OXM_IDS = ImmutableList.<U32>of();
+
+ // OF message fields
+ private final List<U32> oxmIds;
+//
+ // Immutable default instance
+ final static OFTableFeaturePropWriteSetfieldMissVer13 DEFAULT = new OFTableFeaturePropWriteSetfieldMissVer13(
+ DEFAULT_OXM_IDS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFTableFeaturePropWriteSetfieldMissVer13(List<U32> oxmIds) {
+ this.oxmIds = oxmIds;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public int getType() {
+ return 0xd;
+ }
+
+ @Override
+ public List<U32> getOxmIds() {
+ return oxmIds;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFTableFeaturePropWriteSetfieldMiss.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFTableFeaturePropWriteSetfieldMiss.Builder {
+ final OFTableFeaturePropWriteSetfieldMissVer13 parentMessage;
+
+ // OF message fields
+ private boolean oxmIdsSet;
+ private List<U32> oxmIds;
+
+ BuilderWithParent(OFTableFeaturePropWriteSetfieldMissVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public int getType() {
+ return 0xd;
+ }
+
+ @Override
+ public List<U32> getOxmIds() {
+ return oxmIds;
+ }
+
+ @Override
+ public OFTableFeaturePropWriteSetfieldMiss.Builder setOxmIds(List<U32> oxmIds) {
+ this.oxmIds = oxmIds;
+ this.oxmIdsSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFTableFeaturePropWriteSetfieldMiss build() {
+ List<U32> oxmIds = this.oxmIdsSet ? this.oxmIds : parentMessage.oxmIds;
+ if(oxmIds == null)
+ throw new NullPointerException("Property oxmIds must not be null");
+
+ //
+ return new OFTableFeaturePropWriteSetfieldMissVer13(
+ oxmIds
+ );
+ }
+
+ }
+
+ static class Builder implements OFTableFeaturePropWriteSetfieldMiss.Builder {
+ // OF message fields
+ private boolean oxmIdsSet;
+ private List<U32> oxmIds;
+
+ @Override
+ public int getType() {
+ return 0xd;
+ }
+
+ @Override
+ public List<U32> getOxmIds() {
+ return oxmIds;
+ }
+
+ @Override
+ public OFTableFeaturePropWriteSetfieldMiss.Builder setOxmIds(List<U32> oxmIds) {
+ this.oxmIds = oxmIds;
+ this.oxmIdsSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFTableFeaturePropWriteSetfieldMiss build() {
+ List<U32> oxmIds = this.oxmIdsSet ? this.oxmIds : DEFAULT_OXM_IDS;
+ if(oxmIds == null)
+ throw new NullPointerException("Property oxmIds must not be null");
+
+
+ return new OFTableFeaturePropWriteSetfieldMissVer13(
+ oxmIds
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFTableFeaturePropWriteSetfieldMiss> {
+ @Override
+ public OFTableFeaturePropWriteSetfieldMiss readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 0xd
+ short type = bb.readShort();
+ if(type != (short) 0xd)
+ throw new OFParseError("Wrong type: Expected=0xd(0xd), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ List<U32> oxmIds = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), U32.READER);
+
+ OFTableFeaturePropWriteSetfieldMissVer13 tableFeaturePropWriteSetfieldMissVer13 = new OFTableFeaturePropWriteSetfieldMissVer13(
+ oxmIds
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", tableFeaturePropWriteSetfieldMissVer13);
+ return tableFeaturePropWriteSetfieldMissVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFTableFeaturePropWriteSetfieldMissVer13Funnel FUNNEL = new OFTableFeaturePropWriteSetfieldMissVer13Funnel();
+ static class OFTableFeaturePropWriteSetfieldMissVer13Funnel implements Funnel<OFTableFeaturePropWriteSetfieldMissVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFTableFeaturePropWriteSetfieldMissVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 0xd
+ sink.putShort((short) 0xd);
+ // FIXME: skip funnel of length
+ FunnelUtils.putList(message.oxmIds, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFTableFeaturePropWriteSetfieldMissVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFTableFeaturePropWriteSetfieldMissVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property type = 0xd
+ bb.writeShort((short) 0xd);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ ChannelUtils.writeList(bb, message.oxmIds);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFTableFeaturePropWriteSetfieldMissVer13(");
+ b.append("oxmIds=").append(oxmIds);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFTableFeaturePropWriteSetfieldMissVer13 other = (OFTableFeaturePropWriteSetfieldMissVer13) obj;
+
+ if (oxmIds == null) {
+ if (other.oxmIds != null)
+ return false;
+ } else if (!oxmIds.equals(other.oxmIds))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((oxmIds == null) ? 0 : oxmIds.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropWriteSetfieldVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropWriteSetfieldVer13.java
new file mode 100644
index 0000000..4990b30
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturePropWriteSetfieldVer13.java
@@ -0,0 +1,274 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import java.util.Set;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFTableFeaturePropWriteSetfieldVer13 implements OFTableFeaturePropWriteSetfield {
+ private static final Logger logger = LoggerFactory.getLogger(OFTableFeaturePropWriteSetfieldVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 4;
+
+ private final static List<U32> DEFAULT_OXM_IDS = ImmutableList.<U32>of();
+
+ // OF message fields
+ private final List<U32> oxmIds;
+//
+ // Immutable default instance
+ final static OFTableFeaturePropWriteSetfieldVer13 DEFAULT = new OFTableFeaturePropWriteSetfieldVer13(
+ DEFAULT_OXM_IDS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFTableFeaturePropWriteSetfieldVer13(List<U32> oxmIds) {
+ this.oxmIds = oxmIds;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public int getType() {
+ return 0xc;
+ }
+
+ @Override
+ public List<U32> getOxmIds() {
+ return oxmIds;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFTableFeaturePropWriteSetfield.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFTableFeaturePropWriteSetfield.Builder {
+ final OFTableFeaturePropWriteSetfieldVer13 parentMessage;
+
+ // OF message fields
+ private boolean oxmIdsSet;
+ private List<U32> oxmIds;
+
+ BuilderWithParent(OFTableFeaturePropWriteSetfieldVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public int getType() {
+ return 0xc;
+ }
+
+ @Override
+ public List<U32> getOxmIds() {
+ return oxmIds;
+ }
+
+ @Override
+ public OFTableFeaturePropWriteSetfield.Builder setOxmIds(List<U32> oxmIds) {
+ this.oxmIds = oxmIds;
+ this.oxmIdsSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFTableFeaturePropWriteSetfield build() {
+ List<U32> oxmIds = this.oxmIdsSet ? this.oxmIds : parentMessage.oxmIds;
+ if(oxmIds == null)
+ throw new NullPointerException("Property oxmIds must not be null");
+
+ //
+ return new OFTableFeaturePropWriteSetfieldVer13(
+ oxmIds
+ );
+ }
+
+ }
+
+ static class Builder implements OFTableFeaturePropWriteSetfield.Builder {
+ // OF message fields
+ private boolean oxmIdsSet;
+ private List<U32> oxmIds;
+
+ @Override
+ public int getType() {
+ return 0xc;
+ }
+
+ @Override
+ public List<U32> getOxmIds() {
+ return oxmIds;
+ }
+
+ @Override
+ public OFTableFeaturePropWriteSetfield.Builder setOxmIds(List<U32> oxmIds) {
+ this.oxmIds = oxmIds;
+ this.oxmIdsSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFTableFeaturePropWriteSetfield build() {
+ List<U32> oxmIds = this.oxmIdsSet ? this.oxmIds : DEFAULT_OXM_IDS;
+ if(oxmIds == null)
+ throw new NullPointerException("Property oxmIds must not be null");
+
+
+ return new OFTableFeaturePropWriteSetfieldVer13(
+ oxmIds
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFTableFeaturePropWriteSetfield> {
+ @Override
+ public OFTableFeaturePropWriteSetfield readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property type == 0xc
+ short type = bb.readShort();
+ if(type != (short) 0xc)
+ throw new OFParseError("Wrong type: Expected=0xc(0xc), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ List<U32> oxmIds = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), U32.READER);
+
+ OFTableFeaturePropWriteSetfieldVer13 tableFeaturePropWriteSetfieldVer13 = new OFTableFeaturePropWriteSetfieldVer13(
+ oxmIds
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", tableFeaturePropWriteSetfieldVer13);
+ return tableFeaturePropWriteSetfieldVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFTableFeaturePropWriteSetfieldVer13Funnel FUNNEL = new OFTableFeaturePropWriteSetfieldVer13Funnel();
+ static class OFTableFeaturePropWriteSetfieldVer13Funnel implements Funnel<OFTableFeaturePropWriteSetfieldVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFTableFeaturePropWriteSetfieldVer13 message, PrimitiveSink sink) {
+ // fixed value property type = 0xc
+ sink.putShort((short) 0xc);
+ // FIXME: skip funnel of length
+ FunnelUtils.putList(message.oxmIds, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFTableFeaturePropWriteSetfieldVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFTableFeaturePropWriteSetfieldVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property type = 0xc
+ bb.writeShort((short) 0xc);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ ChannelUtils.writeList(bb, message.oxmIds);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFTableFeaturePropWriteSetfieldVer13(");
+ b.append("oxmIds=").append(oxmIds);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFTableFeaturePropWriteSetfieldVer13 other = (OFTableFeaturePropWriteSetfieldVer13) obj;
+
+ if (oxmIds == null) {
+ if (other.oxmIds != null)
+ return false;
+ } else if (!oxmIds.equals(other.oxmIds))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((oxmIds == null) ? 0 : oxmIds.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturesFailedCodeSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturesFailedCodeSerializerVer13.java
new file mode 100644
index 0000000..8026d95
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturesFailedCodeSerializerVer13.java
@@ -0,0 +1,94 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFTableFeaturesFailedCode;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+
+public class OFTableFeaturesFailedCodeSerializerVer13 {
+
+ public final static short BAD_TABLE_VAL = (short) 0x0;
+ public final static short BAD_METADATA_VAL = (short) 0x1;
+ public final static short BAD_TYPE_VAL = (short) 0x2;
+ public final static short BAD_LEN_VAL = (short) 0x3;
+ public final static short BAD_ARGUMENT_VAL = (short) 0x4;
+ public final static short EPERM_VAL = (short) 0x5;
+
+ public static OFTableFeaturesFailedCode readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readShort());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, OFTableFeaturesFailedCode e) {
+ bb.writeShort(toWireValue(e));
+ }
+
+ public static void putTo(OFTableFeaturesFailedCode e, PrimitiveSink sink) {
+ sink.putShort(toWireValue(e));
+ }
+
+ public static OFTableFeaturesFailedCode ofWireValue(short val) {
+ switch(val) {
+ case BAD_TABLE_VAL:
+ return OFTableFeaturesFailedCode.BAD_TABLE;
+ case BAD_METADATA_VAL:
+ return OFTableFeaturesFailedCode.BAD_METADATA;
+ case BAD_TYPE_VAL:
+ return OFTableFeaturesFailedCode.BAD_TYPE;
+ case BAD_LEN_VAL:
+ return OFTableFeaturesFailedCode.BAD_LEN;
+ case BAD_ARGUMENT_VAL:
+ return OFTableFeaturesFailedCode.BAD_ARGUMENT;
+ case EPERM_VAL:
+ return OFTableFeaturesFailedCode.EPERM;
+ default:
+ throw new IllegalArgumentException("Illegal wire value for type OFTableFeaturesFailedCode in version 1.3: " + val);
+ }
+ }
+
+
+ public static short toWireValue(OFTableFeaturesFailedCode e) {
+ switch(e) {
+ case BAD_TABLE:
+ return BAD_TABLE_VAL;
+ case BAD_METADATA:
+ return BAD_METADATA_VAL;
+ case BAD_TYPE:
+ return BAD_TYPE_VAL;
+ case BAD_LEN:
+ return BAD_LEN_VAL;
+ case BAD_ARGUMENT:
+ return BAD_ARGUMENT_VAL;
+ case EPERM:
+ return EPERM_VAL;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFTableFeaturesFailedCode in version 1.3: " + e);
+ }
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturesFailedErrorMsgVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturesFailedErrorMsgVer13.java
new file mode 100644
index 0000000..27d3ba9
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturesFailedErrorMsgVer13.java
@@ -0,0 +1,400 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFTableFeaturesFailedErrorMsgVer13 implements OFTableFeaturesFailedErrorMsg {
+ private static final Logger logger = LoggerFactory.getLogger(OFTableFeaturesFailedErrorMsgVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 12;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static OFErrorCauseData DEFAULT_DATA = OFErrorCauseData.NONE;
+
+ // OF message fields
+ private final long xid;
+ private final OFTableFeaturesFailedCode code;
+ private final OFErrorCauseData data;
+//
+
+ // package private constructor - used by readers, builders, and factory
+ OFTableFeaturesFailedErrorMsgVer13(long xid, OFTableFeaturesFailedCode code, OFErrorCauseData data) {
+ this.xid = xid;
+ this.code = code;
+ this.data = data;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ERROR;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFErrorType getErrType() {
+ return OFErrorType.TABLE_FEATURES_FAILED;
+ }
+
+ @Override
+ public OFTableFeaturesFailedCode getCode() {
+ return code;
+ }
+
+ @Override
+ public OFErrorCauseData getData() {
+ return data;
+ }
+
+
+
+ public OFTableFeaturesFailedErrorMsg.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFTableFeaturesFailedErrorMsg.Builder {
+ final OFTableFeaturesFailedErrorMsgVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean codeSet;
+ private OFTableFeaturesFailedCode code;
+ private boolean dataSet;
+ private OFErrorCauseData data;
+
+ BuilderWithParent(OFTableFeaturesFailedErrorMsgVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ERROR;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFTableFeaturesFailedErrorMsg.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorType getErrType() {
+ return OFErrorType.TABLE_FEATURES_FAILED;
+ }
+
+ @Override
+ public OFTableFeaturesFailedCode getCode() {
+ return code;
+ }
+
+ @Override
+ public OFTableFeaturesFailedErrorMsg.Builder setCode(OFTableFeaturesFailedCode code) {
+ this.code = code;
+ this.codeSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorCauseData getData() {
+ return data;
+ }
+
+ @Override
+ public OFTableFeaturesFailedErrorMsg.Builder setData(OFErrorCauseData data) {
+ this.data = data;
+ this.dataSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFTableFeaturesFailedErrorMsg build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ OFTableFeaturesFailedCode code = this.codeSet ? this.code : parentMessage.code;
+ if(code == null)
+ throw new NullPointerException("Property code must not be null");
+ OFErrorCauseData data = this.dataSet ? this.data : parentMessage.data;
+ if(data == null)
+ throw new NullPointerException("Property data must not be null");
+
+ //
+ return new OFTableFeaturesFailedErrorMsgVer13(
+ xid,
+ code,
+ data
+ );
+ }
+
+ }
+
+ static class Builder implements OFTableFeaturesFailedErrorMsg.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean codeSet;
+ private OFTableFeaturesFailedCode code;
+ private boolean dataSet;
+ private OFErrorCauseData data;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ERROR;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFTableFeaturesFailedErrorMsg.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorType getErrType() {
+ return OFErrorType.TABLE_FEATURES_FAILED;
+ }
+
+ @Override
+ public OFTableFeaturesFailedCode getCode() {
+ return code;
+ }
+
+ @Override
+ public OFTableFeaturesFailedErrorMsg.Builder setCode(OFTableFeaturesFailedCode code) {
+ this.code = code;
+ this.codeSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorCauseData getData() {
+ return data;
+ }
+
+ @Override
+ public OFTableFeaturesFailedErrorMsg.Builder setData(OFErrorCauseData data) {
+ this.data = data;
+ this.dataSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFTableFeaturesFailedErrorMsg build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ if(!this.codeSet)
+ throw new IllegalStateException("Property code doesn't have default value -- must be set");
+ if(code == null)
+ throw new NullPointerException("Property code must not be null");
+ OFErrorCauseData data = this.dataSet ? this.data : DEFAULT_DATA;
+ if(data == null)
+ throw new NullPointerException("Property data must not be null");
+
+
+ return new OFTableFeaturesFailedErrorMsgVer13(
+ xid,
+ code,
+ data
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFTableFeaturesFailedErrorMsg> {
+ @Override
+ public OFTableFeaturesFailedErrorMsg readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 1
+ byte type = bb.readByte();
+ if(type != (byte) 0x1)
+ throw new OFParseError("Wrong type: Expected=OFType.ERROR(1), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property errType == 13
+ short errType = bb.readShort();
+ if(errType != (short) 0xd)
+ throw new OFParseError("Wrong errType: Expected=OFErrorType.TABLE_FEATURES_FAILED(13), got="+errType);
+ OFTableFeaturesFailedCode code = OFTableFeaturesFailedCodeSerializerVer13.readFrom(bb);
+ OFErrorCauseData data = OFErrorCauseData.read(bb, length - (bb.readerIndex() - start), OFVersion.OF_13);
+
+ OFTableFeaturesFailedErrorMsgVer13 tableFeaturesFailedErrorMsgVer13 = new OFTableFeaturesFailedErrorMsgVer13(
+ xid,
+ code,
+ data
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", tableFeaturesFailedErrorMsgVer13);
+ return tableFeaturesFailedErrorMsgVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFTableFeaturesFailedErrorMsgVer13Funnel FUNNEL = new OFTableFeaturesFailedErrorMsgVer13Funnel();
+ static class OFTableFeaturesFailedErrorMsgVer13Funnel implements Funnel<OFTableFeaturesFailedErrorMsgVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFTableFeaturesFailedErrorMsgVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 1
+ sink.putByte((byte) 0x1);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property errType = 13
+ sink.putShort((short) 0xd);
+ OFTableFeaturesFailedCodeSerializerVer13.putTo(message.code, sink);
+ message.data.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFTableFeaturesFailedErrorMsgVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFTableFeaturesFailedErrorMsgVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 1
+ bb.writeByte((byte) 0x1);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property errType = 13
+ bb.writeShort((short) 0xd);
+ OFTableFeaturesFailedCodeSerializerVer13.writeTo(bb, message.code);
+ message.data.writeTo(bb);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFTableFeaturesFailedErrorMsgVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("code=").append(code);
+ b.append(", ");
+ b.append("data=").append(data);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFTableFeaturesFailedErrorMsgVer13 other = (OFTableFeaturesFailedErrorMsgVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (code == null) {
+ if (other.code != null)
+ return false;
+ } else if (!code.equals(other.code))
+ return false;
+ if (data == null) {
+ if (other.data != null)
+ return false;
+ } else if (!data.equals(other.data))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((code == null) ? 0 : code.hashCode());
+ result = prime * result + ((data == null) ? 0 : data.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturesStatsReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturesStatsReplyVer13.java
new file mode 100644
index 0000000..3bcb7b3
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturesStatsReplyVer13.java
@@ -0,0 +1,412 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFTableFeaturesStatsReplyVer13 implements OFTableFeaturesStatsReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFTableFeaturesStatsReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 16;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsReplyFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsReplyFlags>of();
+ private final static List<OFTableFeatures> DEFAULT_ENTRIES = ImmutableList.<OFTableFeatures>of();
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsReplyFlags> flags;
+ private final List<OFTableFeatures> entries;
+//
+ // Immutable default instance
+ final static OFTableFeaturesStatsReplyVer13 DEFAULT = new OFTableFeaturesStatsReplyVer13(
+ DEFAULT_XID, DEFAULT_FLAGS, DEFAULT_ENTRIES
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFTableFeaturesStatsReplyVer13(long xid, Set<OFStatsReplyFlags> flags, List<OFTableFeatures> entries) {
+ this.xid = xid;
+ this.flags = flags;
+ this.entries = entries;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.TABLE_FEATURES;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public List<OFTableFeatures> getEntries() {
+ return entries;
+ }
+
+
+
+ public OFTableFeaturesStatsReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFTableFeaturesStatsReply.Builder {
+ final OFTableFeaturesStatsReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean entriesSet;
+ private List<OFTableFeatures> entries;
+
+ BuilderWithParent(OFTableFeaturesStatsReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFTableFeaturesStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.TABLE_FEATURES;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFTableFeaturesStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public List<OFTableFeatures> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFTableFeaturesStatsReply.Builder setEntries(List<OFTableFeatures> entries) {
+ this.entries = entries;
+ this.entriesSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFTableFeaturesStatsReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ List<OFTableFeatures> entries = this.entriesSet ? this.entries : parentMessage.entries;
+ if(entries == null)
+ throw new NullPointerException("Property entries must not be null");
+
+ //
+ return new OFTableFeaturesStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ }
+
+ }
+
+ static class Builder implements OFTableFeaturesStatsReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean entriesSet;
+ private List<OFTableFeatures> entries;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFTableFeaturesStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.TABLE_FEATURES;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFTableFeaturesStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public List<OFTableFeatures> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFTableFeaturesStatsReply.Builder setEntries(List<OFTableFeatures> entries) {
+ this.entries = entries;
+ this.entriesSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFTableFeaturesStatsReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ List<OFTableFeatures> entries = this.entriesSet ? this.entries : DEFAULT_ENTRIES;
+ if(entries == null)
+ throw new NullPointerException("Property entries must not be null");
+
+
+ return new OFTableFeaturesStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFTableFeaturesStatsReply> {
+ @Override
+ public OFTableFeaturesStatsReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 19
+ byte type = bb.readByte();
+ if(type != (byte) 0x13)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REPLY(19), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 12
+ short statsType = bb.readShort();
+ if(statsType != (short) 0xc)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.TABLE_FEATURES(12), got="+statsType);
+ Set<OFStatsReplyFlags> flags = OFStatsReplyFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ List<OFTableFeatures> entries = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFTableFeaturesVer13.READER);
+
+ OFTableFeaturesStatsReplyVer13 tableFeaturesStatsReplyVer13 = new OFTableFeaturesStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", tableFeaturesStatsReplyVer13);
+ return tableFeaturesStatsReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFTableFeaturesStatsReplyVer13Funnel FUNNEL = new OFTableFeaturesStatsReplyVer13Funnel();
+ static class OFTableFeaturesStatsReplyVer13Funnel implements Funnel<OFTableFeaturesStatsReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFTableFeaturesStatsReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 19
+ sink.putByte((byte) 0x13);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property statsType = 12
+ sink.putShort((short) 0xc);
+ OFStatsReplyFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ FunnelUtils.putList(message.entries, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFTableFeaturesStatsReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFTableFeaturesStatsReplyVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 19
+ bb.writeByte((byte) 0x13);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 12
+ bb.writeShort((short) 0xc);
+ OFStatsReplyFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ ChannelUtils.writeList(bb, message.entries);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFTableFeaturesStatsReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("entries=").append(entries);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFTableFeaturesStatsReplyVer13 other = (OFTableFeaturesStatsReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if (entries == null) {
+ if (other.entries != null)
+ return false;
+ } else if (!entries.equals(other.entries))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * result + ((entries == null) ? 0 : entries.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturesStatsRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturesStatsRequestVer13.java
new file mode 100644
index 0000000..7981631
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturesStatsRequestVer13.java
@@ -0,0 +1,412 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFTableFeaturesStatsRequestVer13 implements OFTableFeaturesStatsRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFTableFeaturesStatsRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 16;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsRequestFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsRequestFlags>of();
+ private final static List<OFTableFeatures> DEFAULT_ENTRIES = ImmutableList.<OFTableFeatures>of();
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsRequestFlags> flags;
+ private final List<OFTableFeatures> entries;
+//
+ // Immutable default instance
+ final static OFTableFeaturesStatsRequestVer13 DEFAULT = new OFTableFeaturesStatsRequestVer13(
+ DEFAULT_XID, DEFAULT_FLAGS, DEFAULT_ENTRIES
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFTableFeaturesStatsRequestVer13(long xid, Set<OFStatsRequestFlags> flags, List<OFTableFeatures> entries) {
+ this.xid = xid;
+ this.flags = flags;
+ this.entries = entries;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.TABLE_FEATURES;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public List<OFTableFeatures> getEntries() {
+ return entries;
+ }
+
+
+
+ public OFTableFeaturesStatsRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFTableFeaturesStatsRequest.Builder {
+ final OFTableFeaturesStatsRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+ private boolean entriesSet;
+ private List<OFTableFeatures> entries;
+
+ BuilderWithParent(OFTableFeaturesStatsRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFTableFeaturesStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.TABLE_FEATURES;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFTableFeaturesStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public List<OFTableFeatures> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFTableFeaturesStatsRequest.Builder setEntries(List<OFTableFeatures> entries) {
+ this.entries = entries;
+ this.entriesSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFTableFeaturesStatsRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ List<OFTableFeatures> entries = this.entriesSet ? this.entries : parentMessage.entries;
+ if(entries == null)
+ throw new NullPointerException("Property entries must not be null");
+
+ //
+ return new OFTableFeaturesStatsRequestVer13(
+ xid,
+ flags,
+ entries
+ );
+ }
+
+ }
+
+ static class Builder implements OFTableFeaturesStatsRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+ private boolean entriesSet;
+ private List<OFTableFeatures> entries;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFTableFeaturesStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.TABLE_FEATURES;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFTableFeaturesStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public List<OFTableFeatures> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFTableFeaturesStatsRequest.Builder setEntries(List<OFTableFeatures> entries) {
+ this.entries = entries;
+ this.entriesSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFTableFeaturesStatsRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ List<OFTableFeatures> entries = this.entriesSet ? this.entries : DEFAULT_ENTRIES;
+ if(entries == null)
+ throw new NullPointerException("Property entries must not be null");
+
+
+ return new OFTableFeaturesStatsRequestVer13(
+ xid,
+ flags,
+ entries
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFTableFeaturesStatsRequest> {
+ @Override
+ public OFTableFeaturesStatsRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 18
+ byte type = bb.readByte();
+ if(type != (byte) 0x12)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REQUEST(18), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 12
+ short statsType = bb.readShort();
+ if(statsType != (short) 0xc)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.TABLE_FEATURES(12), got="+statsType);
+ Set<OFStatsRequestFlags> flags = OFStatsRequestFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ List<OFTableFeatures> entries = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFTableFeaturesVer13.READER);
+
+ OFTableFeaturesStatsRequestVer13 tableFeaturesStatsRequestVer13 = new OFTableFeaturesStatsRequestVer13(
+ xid,
+ flags,
+ entries
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", tableFeaturesStatsRequestVer13);
+ return tableFeaturesStatsRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFTableFeaturesStatsRequestVer13Funnel FUNNEL = new OFTableFeaturesStatsRequestVer13Funnel();
+ static class OFTableFeaturesStatsRequestVer13Funnel implements Funnel<OFTableFeaturesStatsRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFTableFeaturesStatsRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 18
+ sink.putByte((byte) 0x12);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property statsType = 12
+ sink.putShort((short) 0xc);
+ OFStatsRequestFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ FunnelUtils.putList(message.entries, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFTableFeaturesStatsRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFTableFeaturesStatsRequestVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 18
+ bb.writeByte((byte) 0x12);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 12
+ bb.writeShort((short) 0xc);
+ OFStatsRequestFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ ChannelUtils.writeList(bb, message.entries);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFTableFeaturesStatsRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("entries=").append(entries);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFTableFeaturesStatsRequestVer13 other = (OFTableFeaturesStatsRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if (entries == null) {
+ if (other.entries != null)
+ return false;
+ } else if (!entries.equals(other.entries))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * result + ((entries == null) ? 0 : entries.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturesVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturesVer13.java
new file mode 100644
index 0000000..c5064e6
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableFeaturesVer13.java
@@ -0,0 +1,566 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFTableFeaturesVer13 implements OFTableFeatures {
+ private static final Logger logger = LoggerFactory.getLogger(OFTableFeaturesVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 64;
+
+ private final static TableId DEFAULT_TABLE_ID = TableId.ALL;
+ private final static String DEFAULT_NAME = "";
+ private final static U64 DEFAULT_METADATA_MATCH = U64.ZERO;
+ private final static U64 DEFAULT_METADATA_WRITE = U64.ZERO;
+ private final static long DEFAULT_CONFIG = 0x0L;
+ private final static long DEFAULT_MAX_ENTRIES = 0x0L;
+ private final static List<OFTableFeatureProp> DEFAULT_PROPERTIES = ImmutableList.<OFTableFeatureProp>of();
+
+ // OF message fields
+ private final TableId tableId;
+ private final String name;
+ private final U64 metadataMatch;
+ private final U64 metadataWrite;
+ private final long config;
+ private final long maxEntries;
+ private final List<OFTableFeatureProp> properties;
+//
+ // Immutable default instance
+ final static OFTableFeaturesVer13 DEFAULT = new OFTableFeaturesVer13(
+ DEFAULT_TABLE_ID, DEFAULT_NAME, DEFAULT_METADATA_MATCH, DEFAULT_METADATA_WRITE, DEFAULT_CONFIG, DEFAULT_MAX_ENTRIES, DEFAULT_PROPERTIES
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFTableFeaturesVer13(TableId tableId, String name, U64 metadataMatch, U64 metadataWrite, long config, long maxEntries, List<OFTableFeatureProp> properties) {
+ this.tableId = tableId;
+ this.name = name;
+ this.metadataMatch = metadataMatch;
+ this.metadataWrite = metadataWrite;
+ this.config = config;
+ this.maxEntries = maxEntries;
+ this.properties = properties;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ @Override
+ public U64 getMetadataMatch() {
+ return metadataMatch;
+ }
+
+ @Override
+ public U64 getMetadataWrite() {
+ return metadataWrite;
+ }
+
+ @Override
+ public long getConfig() {
+ return config;
+ }
+
+ @Override
+ public long getMaxEntries() {
+ return maxEntries;
+ }
+
+ @Override
+ public List<OFTableFeatureProp> getProperties() {
+ return properties;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFTableFeatures.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFTableFeatures.Builder {
+ final OFTableFeaturesVer13 parentMessage;
+
+ // OF message fields
+ private boolean tableIdSet;
+ private TableId tableId;
+ private boolean nameSet;
+ private String name;
+ private boolean metadataMatchSet;
+ private U64 metadataMatch;
+ private boolean metadataWriteSet;
+ private U64 metadataWrite;
+ private boolean configSet;
+ private long config;
+ private boolean maxEntriesSet;
+ private long maxEntries;
+ private boolean propertiesSet;
+ private List<OFTableFeatureProp> properties;
+
+ BuilderWithParent(OFTableFeaturesVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFTableFeatures.Builder setTableId(TableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ @Override
+ public OFTableFeatures.Builder setName(String name) {
+ this.name = name;
+ this.nameSet = true;
+ return this;
+ }
+ @Override
+ public U64 getMetadataMatch() {
+ return metadataMatch;
+ }
+
+ @Override
+ public OFTableFeatures.Builder setMetadataMatch(U64 metadataMatch) {
+ this.metadataMatch = metadataMatch;
+ this.metadataMatchSet = true;
+ return this;
+ }
+ @Override
+ public U64 getMetadataWrite() {
+ return metadataWrite;
+ }
+
+ @Override
+ public OFTableFeatures.Builder setMetadataWrite(U64 metadataWrite) {
+ this.metadataWrite = metadataWrite;
+ this.metadataWriteSet = true;
+ return this;
+ }
+ @Override
+ public long getConfig() {
+ return config;
+ }
+
+ @Override
+ public OFTableFeatures.Builder setConfig(long config) {
+ this.config = config;
+ this.configSet = true;
+ return this;
+ }
+ @Override
+ public long getMaxEntries() {
+ return maxEntries;
+ }
+
+ @Override
+ public OFTableFeatures.Builder setMaxEntries(long maxEntries) {
+ this.maxEntries = maxEntries;
+ this.maxEntriesSet = true;
+ return this;
+ }
+ @Override
+ public List<OFTableFeatureProp> getProperties() {
+ return properties;
+ }
+
+ @Override
+ public OFTableFeatures.Builder setProperties(List<OFTableFeatureProp> properties) {
+ this.properties = properties;
+ this.propertiesSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFTableFeatures build() {
+ TableId tableId = this.tableIdSet ? this.tableId : parentMessage.tableId;
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+ String name = this.nameSet ? this.name : parentMessage.name;
+ if(name == null)
+ throw new NullPointerException("Property name must not be null");
+ U64 metadataMatch = this.metadataMatchSet ? this.metadataMatch : parentMessage.metadataMatch;
+ if(metadataMatch == null)
+ throw new NullPointerException("Property metadataMatch must not be null");
+ U64 metadataWrite = this.metadataWriteSet ? this.metadataWrite : parentMessage.metadataWrite;
+ if(metadataWrite == null)
+ throw new NullPointerException("Property metadataWrite must not be null");
+ long config = this.configSet ? this.config : parentMessage.config;
+ long maxEntries = this.maxEntriesSet ? this.maxEntries : parentMessage.maxEntries;
+ List<OFTableFeatureProp> properties = this.propertiesSet ? this.properties : parentMessage.properties;
+ if(properties == null)
+ throw new NullPointerException("Property properties must not be null");
+
+ //
+ return new OFTableFeaturesVer13(
+ tableId,
+ name,
+ metadataMatch,
+ metadataWrite,
+ config,
+ maxEntries,
+ properties
+ );
+ }
+
+ }
+
+ static class Builder implements OFTableFeatures.Builder {
+ // OF message fields
+ private boolean tableIdSet;
+ private TableId tableId;
+ private boolean nameSet;
+ private String name;
+ private boolean metadataMatchSet;
+ private U64 metadataMatch;
+ private boolean metadataWriteSet;
+ private U64 metadataWrite;
+ private boolean configSet;
+ private long config;
+ private boolean maxEntriesSet;
+ private long maxEntries;
+ private boolean propertiesSet;
+ private List<OFTableFeatureProp> properties;
+
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFTableFeatures.Builder setTableId(TableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ @Override
+ public OFTableFeatures.Builder setName(String name) {
+ this.name = name;
+ this.nameSet = true;
+ return this;
+ }
+ @Override
+ public U64 getMetadataMatch() {
+ return metadataMatch;
+ }
+
+ @Override
+ public OFTableFeatures.Builder setMetadataMatch(U64 metadataMatch) {
+ this.metadataMatch = metadataMatch;
+ this.metadataMatchSet = true;
+ return this;
+ }
+ @Override
+ public U64 getMetadataWrite() {
+ return metadataWrite;
+ }
+
+ @Override
+ public OFTableFeatures.Builder setMetadataWrite(U64 metadataWrite) {
+ this.metadataWrite = metadataWrite;
+ this.metadataWriteSet = true;
+ return this;
+ }
+ @Override
+ public long getConfig() {
+ return config;
+ }
+
+ @Override
+ public OFTableFeatures.Builder setConfig(long config) {
+ this.config = config;
+ this.configSet = true;
+ return this;
+ }
+ @Override
+ public long getMaxEntries() {
+ return maxEntries;
+ }
+
+ @Override
+ public OFTableFeatures.Builder setMaxEntries(long maxEntries) {
+ this.maxEntries = maxEntries;
+ this.maxEntriesSet = true;
+ return this;
+ }
+ @Override
+ public List<OFTableFeatureProp> getProperties() {
+ return properties;
+ }
+
+ @Override
+ public OFTableFeatures.Builder setProperties(List<OFTableFeatureProp> properties) {
+ this.properties = properties;
+ this.propertiesSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFTableFeatures build() {
+ TableId tableId = this.tableIdSet ? this.tableId : DEFAULT_TABLE_ID;
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+ String name = this.nameSet ? this.name : DEFAULT_NAME;
+ if(name == null)
+ throw new NullPointerException("Property name must not be null");
+ U64 metadataMatch = this.metadataMatchSet ? this.metadataMatch : DEFAULT_METADATA_MATCH;
+ if(metadataMatch == null)
+ throw new NullPointerException("Property metadataMatch must not be null");
+ U64 metadataWrite = this.metadataWriteSet ? this.metadataWrite : DEFAULT_METADATA_WRITE;
+ if(metadataWrite == null)
+ throw new NullPointerException("Property metadataWrite must not be null");
+ long config = this.configSet ? this.config : DEFAULT_CONFIG;
+ long maxEntries = this.maxEntriesSet ? this.maxEntries : DEFAULT_MAX_ENTRIES;
+ List<OFTableFeatureProp> properties = this.propertiesSet ? this.properties : DEFAULT_PROPERTIES;
+ if(properties == null)
+ throw new NullPointerException("Property properties must not be null");
+
+
+ return new OFTableFeaturesVer13(
+ tableId,
+ name,
+ metadataMatch,
+ metadataWrite,
+ config,
+ maxEntries,
+ properties
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFTableFeatures> {
+ @Override
+ public OFTableFeatures readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ TableId tableId = TableId.readByte(bb);
+ // pad: 5 bytes
+ bb.skipBytes(5);
+ String name = ChannelUtils.readFixedLengthString(bb, 32);
+ U64 metadataMatch = U64.ofRaw(bb.readLong());
+ U64 metadataWrite = U64.ofRaw(bb.readLong());
+ long config = U32.f(bb.readInt());
+ long maxEntries = U32.f(bb.readInt());
+ List<OFTableFeatureProp> properties = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFTableFeaturePropVer13.READER);
+
+ OFTableFeaturesVer13 tableFeaturesVer13 = new OFTableFeaturesVer13(
+ tableId,
+ name,
+ metadataMatch,
+ metadataWrite,
+ config,
+ maxEntries,
+ properties
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", tableFeaturesVer13);
+ return tableFeaturesVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFTableFeaturesVer13Funnel FUNNEL = new OFTableFeaturesVer13Funnel();
+ static class OFTableFeaturesVer13Funnel implements Funnel<OFTableFeaturesVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFTableFeaturesVer13 message, PrimitiveSink sink) {
+ // FIXME: skip funnel of length
+ message.tableId.putTo(sink);
+ // skip pad (5 bytes)
+ sink.putUnencodedChars(message.name);
+ message.metadataMatch.putTo(sink);
+ message.metadataWrite.putTo(sink);
+ sink.putLong(message.config);
+ sink.putLong(message.maxEntries);
+ FunnelUtils.putList(message.properties, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFTableFeaturesVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFTableFeaturesVer13 message) {
+ int startIndex = bb.writerIndex();
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ message.tableId.writeByte(bb);
+ // pad: 5 bytes
+ bb.writeZero(5);
+ ChannelUtils.writeFixedLengthString(bb, message.name, 32);
+ bb.writeLong(message.metadataMatch.getValue());
+ bb.writeLong(message.metadataWrite.getValue());
+ bb.writeInt(U32.t(message.config));
+ bb.writeInt(U32.t(message.maxEntries));
+ ChannelUtils.writeList(bb, message.properties);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFTableFeaturesVer13(");
+ b.append("tableId=").append(tableId);
+ b.append(", ");
+ b.append("name=").append(name);
+ b.append(", ");
+ b.append("metadataMatch=").append(metadataMatch);
+ b.append(", ");
+ b.append("metadataWrite=").append(metadataWrite);
+ b.append(", ");
+ b.append("config=").append(config);
+ b.append(", ");
+ b.append("maxEntries=").append(maxEntries);
+ b.append(", ");
+ b.append("properties=").append(properties);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFTableFeaturesVer13 other = (OFTableFeaturesVer13) obj;
+
+ if (tableId == null) {
+ if (other.tableId != null)
+ return false;
+ } else if (!tableId.equals(other.tableId))
+ return false;
+ if (name == null) {
+ if (other.name != null)
+ return false;
+ } else if (!name.equals(other.name))
+ return false;
+ if (metadataMatch == null) {
+ if (other.metadataMatch != null)
+ return false;
+ } else if (!metadataMatch.equals(other.metadataMatch))
+ return false;
+ if (metadataWrite == null) {
+ if (other.metadataWrite != null)
+ return false;
+ } else if (!metadataWrite.equals(other.metadataWrite))
+ return false;
+ if( config != other.config)
+ return false;
+ if( maxEntries != other.maxEntries)
+ return false;
+ if (properties == null) {
+ if (other.properties != null)
+ return false;
+ } else if (!properties.equals(other.properties))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((tableId == null) ? 0 : tableId.hashCode());
+ result = prime * result + ((name == null) ? 0 : name.hashCode());
+ result = prime * result + ((metadataMatch == null) ? 0 : metadataMatch.hashCode());
+ result = prime * result + ((metadataWrite == null) ? 0 : metadataWrite.hashCode());
+ result = prime * (int) (config ^ (config >>> 32));
+ result = prime * (int) (maxEntries ^ (maxEntries >>> 32));
+ result = prime * result + ((properties == null) ? 0 : properties.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableModFailedCodeSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableModFailedCodeSerializerVer13.java
new file mode 100644
index 0000000..d869bef
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableModFailedCodeSerializerVer13.java
@@ -0,0 +1,79 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFTableModFailedCode;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+
+public class OFTableModFailedCodeSerializerVer13 {
+
+ public final static short BAD_TABLE_VAL = (short) 0x0;
+ public final static short BAD_CONFIG_VAL = (short) 0x1;
+ public final static short EPERM_VAL = (short) 0x2;
+
+ public static OFTableModFailedCode readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readShort());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, OFTableModFailedCode e) {
+ bb.writeShort(toWireValue(e));
+ }
+
+ public static void putTo(OFTableModFailedCode e, PrimitiveSink sink) {
+ sink.putShort(toWireValue(e));
+ }
+
+ public static OFTableModFailedCode ofWireValue(short val) {
+ switch(val) {
+ case BAD_TABLE_VAL:
+ return OFTableModFailedCode.BAD_TABLE;
+ case BAD_CONFIG_VAL:
+ return OFTableModFailedCode.BAD_CONFIG;
+ case EPERM_VAL:
+ return OFTableModFailedCode.EPERM;
+ default:
+ throw new IllegalArgumentException("Illegal wire value for type OFTableModFailedCode in version 1.3: " + val);
+ }
+ }
+
+
+ public static short toWireValue(OFTableModFailedCode e) {
+ switch(e) {
+ case BAD_TABLE:
+ return BAD_TABLE_VAL;
+ case BAD_CONFIG:
+ return BAD_CONFIG_VAL;
+ case EPERM:
+ return EPERM_VAL;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFTableModFailedCode in version 1.3: " + e);
+ }
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableModFailedErrorMsgVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableModFailedErrorMsgVer13.java
new file mode 100644
index 0000000..929eefb
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableModFailedErrorMsgVer13.java
@@ -0,0 +1,400 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFTableModFailedErrorMsgVer13 implements OFTableModFailedErrorMsg {
+ private static final Logger logger = LoggerFactory.getLogger(OFTableModFailedErrorMsgVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 12;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static OFErrorCauseData DEFAULT_DATA = OFErrorCauseData.NONE;
+
+ // OF message fields
+ private final long xid;
+ private final OFTableModFailedCode code;
+ private final OFErrorCauseData data;
+//
+
+ // package private constructor - used by readers, builders, and factory
+ OFTableModFailedErrorMsgVer13(long xid, OFTableModFailedCode code, OFErrorCauseData data) {
+ this.xid = xid;
+ this.code = code;
+ this.data = data;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ERROR;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFErrorType getErrType() {
+ return OFErrorType.TABLE_MOD_FAILED;
+ }
+
+ @Override
+ public OFTableModFailedCode getCode() {
+ return code;
+ }
+
+ @Override
+ public OFErrorCauseData getData() {
+ return data;
+ }
+
+
+
+ public OFTableModFailedErrorMsg.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFTableModFailedErrorMsg.Builder {
+ final OFTableModFailedErrorMsgVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean codeSet;
+ private OFTableModFailedCode code;
+ private boolean dataSet;
+ private OFErrorCauseData data;
+
+ BuilderWithParent(OFTableModFailedErrorMsgVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ERROR;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFTableModFailedErrorMsg.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorType getErrType() {
+ return OFErrorType.TABLE_MOD_FAILED;
+ }
+
+ @Override
+ public OFTableModFailedCode getCode() {
+ return code;
+ }
+
+ @Override
+ public OFTableModFailedErrorMsg.Builder setCode(OFTableModFailedCode code) {
+ this.code = code;
+ this.codeSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorCauseData getData() {
+ return data;
+ }
+
+ @Override
+ public OFTableModFailedErrorMsg.Builder setData(OFErrorCauseData data) {
+ this.data = data;
+ this.dataSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFTableModFailedErrorMsg build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ OFTableModFailedCode code = this.codeSet ? this.code : parentMessage.code;
+ if(code == null)
+ throw new NullPointerException("Property code must not be null");
+ OFErrorCauseData data = this.dataSet ? this.data : parentMessage.data;
+ if(data == null)
+ throw new NullPointerException("Property data must not be null");
+
+ //
+ return new OFTableModFailedErrorMsgVer13(
+ xid,
+ code,
+ data
+ );
+ }
+
+ }
+
+ static class Builder implements OFTableModFailedErrorMsg.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean codeSet;
+ private OFTableModFailedCode code;
+ private boolean dataSet;
+ private OFErrorCauseData data;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.ERROR;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFTableModFailedErrorMsg.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorType getErrType() {
+ return OFErrorType.TABLE_MOD_FAILED;
+ }
+
+ @Override
+ public OFTableModFailedCode getCode() {
+ return code;
+ }
+
+ @Override
+ public OFTableModFailedErrorMsg.Builder setCode(OFTableModFailedCode code) {
+ this.code = code;
+ this.codeSet = true;
+ return this;
+ }
+ @Override
+ public OFErrorCauseData getData() {
+ return data;
+ }
+
+ @Override
+ public OFTableModFailedErrorMsg.Builder setData(OFErrorCauseData data) {
+ this.data = data;
+ this.dataSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFTableModFailedErrorMsg build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ if(!this.codeSet)
+ throw new IllegalStateException("Property code doesn't have default value -- must be set");
+ if(code == null)
+ throw new NullPointerException("Property code must not be null");
+ OFErrorCauseData data = this.dataSet ? this.data : DEFAULT_DATA;
+ if(data == null)
+ throw new NullPointerException("Property data must not be null");
+
+
+ return new OFTableModFailedErrorMsgVer13(
+ xid,
+ code,
+ data
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFTableModFailedErrorMsg> {
+ @Override
+ public OFTableModFailedErrorMsg readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 1
+ byte type = bb.readByte();
+ if(type != (byte) 0x1)
+ throw new OFParseError("Wrong type: Expected=OFType.ERROR(1), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property errType == 8
+ short errType = bb.readShort();
+ if(errType != (short) 0x8)
+ throw new OFParseError("Wrong errType: Expected=OFErrorType.TABLE_MOD_FAILED(8), got="+errType);
+ OFTableModFailedCode code = OFTableModFailedCodeSerializerVer13.readFrom(bb);
+ OFErrorCauseData data = OFErrorCauseData.read(bb, length - (bb.readerIndex() - start), OFVersion.OF_13);
+
+ OFTableModFailedErrorMsgVer13 tableModFailedErrorMsgVer13 = new OFTableModFailedErrorMsgVer13(
+ xid,
+ code,
+ data
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", tableModFailedErrorMsgVer13);
+ return tableModFailedErrorMsgVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFTableModFailedErrorMsgVer13Funnel FUNNEL = new OFTableModFailedErrorMsgVer13Funnel();
+ static class OFTableModFailedErrorMsgVer13Funnel implements Funnel<OFTableModFailedErrorMsgVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFTableModFailedErrorMsgVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 1
+ sink.putByte((byte) 0x1);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property errType = 8
+ sink.putShort((short) 0x8);
+ OFTableModFailedCodeSerializerVer13.putTo(message.code, sink);
+ message.data.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFTableModFailedErrorMsgVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFTableModFailedErrorMsgVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 1
+ bb.writeByte((byte) 0x1);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property errType = 8
+ bb.writeShort((short) 0x8);
+ OFTableModFailedCodeSerializerVer13.writeTo(bb, message.code);
+ message.data.writeTo(bb);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFTableModFailedErrorMsgVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("code=").append(code);
+ b.append(", ");
+ b.append("data=").append(data);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFTableModFailedErrorMsgVer13 other = (OFTableModFailedErrorMsgVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (code == null) {
+ if (other.code != null)
+ return false;
+ } else if (!code.equals(other.code))
+ return false;
+ if (data == null) {
+ if (other.data != null)
+ return false;
+ } else if (!data.equals(other.data))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((code == null) ? 0 : code.hashCode());
+ result = prime * result + ((data == null) ? 0 : data.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableModVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableModVer13.java
new file mode 100644
index 0000000..f6db229
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableModVer13.java
@@ -0,0 +1,374 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFTableModVer13 implements OFTableMod {
+ private static final Logger logger = LoggerFactory.getLogger(OFTableModVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 16;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static TableId DEFAULT_TABLE_ID = TableId.ALL;
+ private final static long DEFAULT_CONFIG = 0x0L;
+
+ // OF message fields
+ private final long xid;
+ private final TableId tableId;
+ private final long config;
+//
+ // Immutable default instance
+ final static OFTableModVer13 DEFAULT = new OFTableModVer13(
+ DEFAULT_XID, DEFAULT_TABLE_ID, DEFAULT_CONFIG
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFTableModVer13(long xid, TableId tableId, long config) {
+ this.xid = xid;
+ this.tableId = tableId;
+ this.config = config;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.TABLE_MOD;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public long getConfig() {
+ return config;
+ }
+
+
+
+ public OFTableMod.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFTableMod.Builder {
+ final OFTableModVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean tableIdSet;
+ private TableId tableId;
+ private boolean configSet;
+ private long config;
+
+ BuilderWithParent(OFTableModVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.TABLE_MOD;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFTableMod.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFTableMod.Builder setTableId(TableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+ @Override
+ public long getConfig() {
+ return config;
+ }
+
+ @Override
+ public OFTableMod.Builder setConfig(long config) {
+ this.config = config;
+ this.configSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFTableMod build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ TableId tableId = this.tableIdSet ? this.tableId : parentMessage.tableId;
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+ long config = this.configSet ? this.config : parentMessage.config;
+
+ //
+ return new OFTableModVer13(
+ xid,
+ tableId,
+ config
+ );
+ }
+
+ }
+
+ static class Builder implements OFTableMod.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean tableIdSet;
+ private TableId tableId;
+ private boolean configSet;
+ private long config;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.TABLE_MOD;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFTableMod.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFTableMod.Builder setTableId(TableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+ @Override
+ public long getConfig() {
+ return config;
+ }
+
+ @Override
+ public OFTableMod.Builder setConfig(long config) {
+ this.config = config;
+ this.configSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFTableMod build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ TableId tableId = this.tableIdSet ? this.tableId : DEFAULT_TABLE_ID;
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+ long config = this.configSet ? this.config : DEFAULT_CONFIG;
+
+
+ return new OFTableModVer13(
+ xid,
+ tableId,
+ config
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFTableMod> {
+ @Override
+ public OFTableMod readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 17
+ byte type = bb.readByte();
+ if(type != (byte) 0x11)
+ throw new OFParseError("Wrong type: Expected=OFType.TABLE_MOD(17), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 16)
+ throw new OFParseError("Wrong length: Expected=16(16), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ TableId tableId = TableId.readByte(bb);
+ // pad: 3 bytes
+ bb.skipBytes(3);
+ long config = U32.f(bb.readInt());
+
+ OFTableModVer13 tableModVer13 = new OFTableModVer13(
+ xid,
+ tableId,
+ config
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", tableModVer13);
+ return tableModVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFTableModVer13Funnel FUNNEL = new OFTableModVer13Funnel();
+ static class OFTableModVer13Funnel implements Funnel<OFTableModVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFTableModVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 17
+ sink.putByte((byte) 0x11);
+ // fixed value property length = 16
+ sink.putShort((short) 0x10);
+ sink.putLong(message.xid);
+ message.tableId.putTo(sink);
+ // skip pad (3 bytes)
+ sink.putLong(message.config);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFTableModVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFTableModVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 17
+ bb.writeByte((byte) 0x11);
+ // fixed value property length = 16
+ bb.writeShort((short) 0x10);
+ bb.writeInt(U32.t(message.xid));
+ message.tableId.writeByte(bb);
+ // pad: 3 bytes
+ bb.writeZero(3);
+ bb.writeInt(U32.t(message.config));
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFTableModVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("tableId=").append(tableId);
+ b.append(", ");
+ b.append("config=").append(config);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFTableModVer13 other = (OFTableModVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (tableId == null) {
+ if (other.tableId != null)
+ return false;
+ } else if (!tableId.equals(other.tableId))
+ return false;
+ if( config != other.config)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((tableId == null) ? 0 : tableId.hashCode());
+ result = prime * (int) (config ^ (config >>> 32));
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableSerializerVer13.java
new file mode 100644
index 0000000..f5b8a63
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableSerializerVer13.java
@@ -0,0 +1,74 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFTable;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+
+public class OFTableSerializerVer13 {
+
+ public final static byte MAX_VAL = (byte) 0xfe;
+ public final static byte ALL_VAL = (byte) 0xff;
+
+ public static OFTable readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readByte());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, OFTable e) {
+ bb.writeByte(toWireValue(e));
+ }
+
+ public static void putTo(OFTable e, PrimitiveSink sink) {
+ sink.putByte(toWireValue(e));
+ }
+
+ public static OFTable ofWireValue(byte val) {
+ switch(val) {
+ case MAX_VAL:
+ return OFTable.MAX;
+ case ALL_VAL:
+ return OFTable.ALL;
+ default:
+ throw new IllegalArgumentException("Illegal wire value for type OFTable in version 1.3: " + val);
+ }
+ }
+
+
+ public static byte toWireValue(OFTable e) {
+ switch(e) {
+ case MAX:
+ return MAX_VAL;
+ case ALL:
+ return ALL_VAL;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFTable in version 1.3: " + e);
+ }
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableStatsEntryVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableStatsEntryVer13.java
new file mode 100644
index 0000000..25bc571
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableStatsEntryVer13.java
@@ -0,0 +1,665 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFTableStatsEntryVer13 implements OFTableStatsEntry {
+ private static final Logger logger = LoggerFactory.getLogger(OFTableStatsEntryVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 24;
+
+ private final static TableId DEFAULT_TABLE_ID = TableId.ALL;
+ private final static long DEFAULT_ACTIVE_COUNT = 0x0L;
+ private final static U64 DEFAULT_LOOKUP_COUNT = U64.ZERO;
+ private final static U64 DEFAULT_MATCHED_COUNT = U64.ZERO;
+
+ // OF message fields
+ private final TableId tableId;
+ private final long activeCount;
+ private final U64 lookupCount;
+ private final U64 matchedCount;
+//
+ // Immutable default instance
+ final static OFTableStatsEntryVer13 DEFAULT = new OFTableStatsEntryVer13(
+ DEFAULT_TABLE_ID, DEFAULT_ACTIVE_COUNT, DEFAULT_LOOKUP_COUNT, DEFAULT_MATCHED_COUNT
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFTableStatsEntryVer13(TableId tableId, long activeCount, U64 lookupCount, U64 matchedCount) {
+ this.tableId = tableId;
+ this.activeCount = activeCount;
+ this.lookupCount = lookupCount;
+ this.matchedCount = matchedCount;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public String getName()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property name not supported in version 1.3");
+ }
+
+ @Override
+ public OFMatchBmap getMatch()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property match not supported in version 1.3");
+ }
+
+ @Override
+ public int getWildcards()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property wildcards not supported in version 1.3");
+ }
+
+ @Override
+ public long getWriteActions()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property writeActions not supported in version 1.3");
+ }
+
+ @Override
+ public long getApplyActions()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property applyActions not supported in version 1.3");
+ }
+
+ @Override
+ public U64 getWriteSetfields()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property writeSetfields not supported in version 1.3");
+ }
+
+ @Override
+ public U64 getApplySetfields()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property applySetfields not supported in version 1.3");
+ }
+
+ @Override
+ public U64 getMetadataMatch()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property metadataMatch not supported in version 1.3");
+ }
+
+ @Override
+ public U64 getMetadataWrite()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property metadataWrite not supported in version 1.3");
+ }
+
+ @Override
+ public long getInstructions()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property instructions not supported in version 1.3");
+ }
+
+ @Override
+ public long getConfig()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property config not supported in version 1.3");
+ }
+
+ @Override
+ public long getMaxEntries()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property maxEntries not supported in version 1.3");
+ }
+
+ @Override
+ public long getActiveCount() {
+ return activeCount;
+ }
+
+ @Override
+ public U64 getLookupCount() {
+ return lookupCount;
+ }
+
+ @Override
+ public U64 getMatchedCount() {
+ return matchedCount;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFTableStatsEntry.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFTableStatsEntry.Builder {
+ final OFTableStatsEntryVer13 parentMessage;
+
+ // OF message fields
+ private boolean tableIdSet;
+ private TableId tableId;
+ private boolean activeCountSet;
+ private long activeCount;
+ private boolean lookupCountSet;
+ private U64 lookupCount;
+ private boolean matchedCountSet;
+ private U64 matchedCount;
+
+ BuilderWithParent(OFTableStatsEntryVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFTableStatsEntry.Builder setTableId(TableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+ @Override
+ public String getName()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property name not supported in version 1.3");
+ }
+
+ @Override
+ public OFTableStatsEntry.Builder setName(String name) throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property name not supported in version 1.3");
+ }
+ @Override
+ public OFMatchBmap getMatch()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property match not supported in version 1.3");
+ }
+
+ @Override
+ public OFTableStatsEntry.Builder setMatch(OFMatchBmap match) throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property match not supported in version 1.3");
+ }
+ @Override
+ public int getWildcards()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property wildcards not supported in version 1.3");
+ }
+
+ @Override
+ public OFTableStatsEntry.Builder setWildcards(int wildcards) throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property wildcards not supported in version 1.3");
+ }
+ @Override
+ public long getWriteActions()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property writeActions not supported in version 1.3");
+ }
+
+ @Override
+ public OFTableStatsEntry.Builder setWriteActions(long writeActions) throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property writeActions not supported in version 1.3");
+ }
+ @Override
+ public long getApplyActions()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property applyActions not supported in version 1.3");
+ }
+
+ @Override
+ public OFTableStatsEntry.Builder setApplyActions(long applyActions) throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property applyActions not supported in version 1.3");
+ }
+ @Override
+ public U64 getWriteSetfields()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property writeSetfields not supported in version 1.3");
+ }
+
+ @Override
+ public OFTableStatsEntry.Builder setWriteSetfields(U64 writeSetfields) throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property writeSetfields not supported in version 1.3");
+ }
+ @Override
+ public U64 getApplySetfields()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property applySetfields not supported in version 1.3");
+ }
+
+ @Override
+ public OFTableStatsEntry.Builder setApplySetfields(U64 applySetfields) throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property applySetfields not supported in version 1.3");
+ }
+ @Override
+ public U64 getMetadataMatch()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property metadataMatch not supported in version 1.3");
+ }
+
+ @Override
+ public OFTableStatsEntry.Builder setMetadataMatch(U64 metadataMatch) throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property metadataMatch not supported in version 1.3");
+ }
+ @Override
+ public U64 getMetadataWrite()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property metadataWrite not supported in version 1.3");
+ }
+
+ @Override
+ public OFTableStatsEntry.Builder setMetadataWrite(U64 metadataWrite) throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property metadataWrite not supported in version 1.3");
+ }
+ @Override
+ public long getInstructions()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property instructions not supported in version 1.3");
+ }
+
+ @Override
+ public OFTableStatsEntry.Builder setInstructions(long instructions) throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property instructions not supported in version 1.3");
+ }
+ @Override
+ public long getConfig()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property config not supported in version 1.3");
+ }
+
+ @Override
+ public OFTableStatsEntry.Builder setConfig(long config) throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property config not supported in version 1.3");
+ }
+ @Override
+ public long getMaxEntries()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property maxEntries not supported in version 1.3");
+ }
+
+ @Override
+ public OFTableStatsEntry.Builder setMaxEntries(long maxEntries) throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property maxEntries not supported in version 1.3");
+ }
+ @Override
+ public long getActiveCount() {
+ return activeCount;
+ }
+
+ @Override
+ public OFTableStatsEntry.Builder setActiveCount(long activeCount) {
+ this.activeCount = activeCount;
+ this.activeCountSet = true;
+ return this;
+ }
+ @Override
+ public U64 getLookupCount() {
+ return lookupCount;
+ }
+
+ @Override
+ public OFTableStatsEntry.Builder setLookupCount(U64 lookupCount) {
+ this.lookupCount = lookupCount;
+ this.lookupCountSet = true;
+ return this;
+ }
+ @Override
+ public U64 getMatchedCount() {
+ return matchedCount;
+ }
+
+ @Override
+ public OFTableStatsEntry.Builder setMatchedCount(U64 matchedCount) {
+ this.matchedCount = matchedCount;
+ this.matchedCountSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFTableStatsEntry build() {
+ TableId tableId = this.tableIdSet ? this.tableId : parentMessage.tableId;
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+ long activeCount = this.activeCountSet ? this.activeCount : parentMessage.activeCount;
+ U64 lookupCount = this.lookupCountSet ? this.lookupCount : parentMessage.lookupCount;
+ if(lookupCount == null)
+ throw new NullPointerException("Property lookupCount must not be null");
+ U64 matchedCount = this.matchedCountSet ? this.matchedCount : parentMessage.matchedCount;
+ if(matchedCount == null)
+ throw new NullPointerException("Property matchedCount must not be null");
+
+ //
+ return new OFTableStatsEntryVer13(
+ tableId,
+ activeCount,
+ lookupCount,
+ matchedCount
+ );
+ }
+
+ }
+
+ static class Builder implements OFTableStatsEntry.Builder {
+ // OF message fields
+ private boolean tableIdSet;
+ private TableId tableId;
+ private boolean activeCountSet;
+ private long activeCount;
+ private boolean lookupCountSet;
+ private U64 lookupCount;
+ private boolean matchedCountSet;
+ private U64 matchedCount;
+
+ @Override
+ public TableId getTableId() {
+ return tableId;
+ }
+
+ @Override
+ public OFTableStatsEntry.Builder setTableId(TableId tableId) {
+ this.tableId = tableId;
+ this.tableIdSet = true;
+ return this;
+ }
+ @Override
+ public String getName()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property name not supported in version 1.3");
+ }
+
+ @Override
+ public OFTableStatsEntry.Builder setName(String name) throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property name not supported in version 1.3");
+ }
+ @Override
+ public OFMatchBmap getMatch()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property match not supported in version 1.3");
+ }
+
+ @Override
+ public OFTableStatsEntry.Builder setMatch(OFMatchBmap match) throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property match not supported in version 1.3");
+ }
+ @Override
+ public int getWildcards()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property wildcards not supported in version 1.3");
+ }
+
+ @Override
+ public OFTableStatsEntry.Builder setWildcards(int wildcards) throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property wildcards not supported in version 1.3");
+ }
+ @Override
+ public long getWriteActions()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property writeActions not supported in version 1.3");
+ }
+
+ @Override
+ public OFTableStatsEntry.Builder setWriteActions(long writeActions) throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property writeActions not supported in version 1.3");
+ }
+ @Override
+ public long getApplyActions()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property applyActions not supported in version 1.3");
+ }
+
+ @Override
+ public OFTableStatsEntry.Builder setApplyActions(long applyActions) throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property applyActions not supported in version 1.3");
+ }
+ @Override
+ public U64 getWriteSetfields()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property writeSetfields not supported in version 1.3");
+ }
+
+ @Override
+ public OFTableStatsEntry.Builder setWriteSetfields(U64 writeSetfields) throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property writeSetfields not supported in version 1.3");
+ }
+ @Override
+ public U64 getApplySetfields()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property applySetfields not supported in version 1.3");
+ }
+
+ @Override
+ public OFTableStatsEntry.Builder setApplySetfields(U64 applySetfields) throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property applySetfields not supported in version 1.3");
+ }
+ @Override
+ public U64 getMetadataMatch()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property metadataMatch not supported in version 1.3");
+ }
+
+ @Override
+ public OFTableStatsEntry.Builder setMetadataMatch(U64 metadataMatch) throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property metadataMatch not supported in version 1.3");
+ }
+ @Override
+ public U64 getMetadataWrite()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property metadataWrite not supported in version 1.3");
+ }
+
+ @Override
+ public OFTableStatsEntry.Builder setMetadataWrite(U64 metadataWrite) throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property metadataWrite not supported in version 1.3");
+ }
+ @Override
+ public long getInstructions()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property instructions not supported in version 1.3");
+ }
+
+ @Override
+ public OFTableStatsEntry.Builder setInstructions(long instructions) throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property instructions not supported in version 1.3");
+ }
+ @Override
+ public long getConfig()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property config not supported in version 1.3");
+ }
+
+ @Override
+ public OFTableStatsEntry.Builder setConfig(long config) throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property config not supported in version 1.3");
+ }
+ @Override
+ public long getMaxEntries()throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property maxEntries not supported in version 1.3");
+ }
+
+ @Override
+ public OFTableStatsEntry.Builder setMaxEntries(long maxEntries) throws UnsupportedOperationException {
+ throw new UnsupportedOperationException("Property maxEntries not supported in version 1.3");
+ }
+ @Override
+ public long getActiveCount() {
+ return activeCount;
+ }
+
+ @Override
+ public OFTableStatsEntry.Builder setActiveCount(long activeCount) {
+ this.activeCount = activeCount;
+ this.activeCountSet = true;
+ return this;
+ }
+ @Override
+ public U64 getLookupCount() {
+ return lookupCount;
+ }
+
+ @Override
+ public OFTableStatsEntry.Builder setLookupCount(U64 lookupCount) {
+ this.lookupCount = lookupCount;
+ this.lookupCountSet = true;
+ return this;
+ }
+ @Override
+ public U64 getMatchedCount() {
+ return matchedCount;
+ }
+
+ @Override
+ public OFTableStatsEntry.Builder setMatchedCount(U64 matchedCount) {
+ this.matchedCount = matchedCount;
+ this.matchedCountSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFTableStatsEntry build() {
+ TableId tableId = this.tableIdSet ? this.tableId : DEFAULT_TABLE_ID;
+ if(tableId == null)
+ throw new NullPointerException("Property tableId must not be null");
+ long activeCount = this.activeCountSet ? this.activeCount : DEFAULT_ACTIVE_COUNT;
+ U64 lookupCount = this.lookupCountSet ? this.lookupCount : DEFAULT_LOOKUP_COUNT;
+ if(lookupCount == null)
+ throw new NullPointerException("Property lookupCount must not be null");
+ U64 matchedCount = this.matchedCountSet ? this.matchedCount : DEFAULT_MATCHED_COUNT;
+ if(matchedCount == null)
+ throw new NullPointerException("Property matchedCount must not be null");
+
+
+ return new OFTableStatsEntryVer13(
+ tableId,
+ activeCount,
+ lookupCount,
+ matchedCount
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFTableStatsEntry> {
+ @Override
+ public OFTableStatsEntry readFrom(ChannelBuffer bb) throws OFParseError {
+ TableId tableId = TableId.readByte(bb);
+ // pad: 3 bytes
+ bb.skipBytes(3);
+ long activeCount = U32.f(bb.readInt());
+ U64 lookupCount = U64.ofRaw(bb.readLong());
+ U64 matchedCount = U64.ofRaw(bb.readLong());
+
+ OFTableStatsEntryVer13 tableStatsEntryVer13 = new OFTableStatsEntryVer13(
+ tableId,
+ activeCount,
+ lookupCount,
+ matchedCount
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", tableStatsEntryVer13);
+ return tableStatsEntryVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFTableStatsEntryVer13Funnel FUNNEL = new OFTableStatsEntryVer13Funnel();
+ static class OFTableStatsEntryVer13Funnel implements Funnel<OFTableStatsEntryVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFTableStatsEntryVer13 message, PrimitiveSink sink) {
+ message.tableId.putTo(sink);
+ // skip pad (3 bytes)
+ sink.putLong(message.activeCount);
+ message.lookupCount.putTo(sink);
+ message.matchedCount.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFTableStatsEntryVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFTableStatsEntryVer13 message) {
+ message.tableId.writeByte(bb);
+ // pad: 3 bytes
+ bb.writeZero(3);
+ bb.writeInt(U32.t(message.activeCount));
+ bb.writeLong(message.lookupCount.getValue());
+ bb.writeLong(message.matchedCount.getValue());
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFTableStatsEntryVer13(");
+ b.append("tableId=").append(tableId);
+ b.append(", ");
+ b.append("activeCount=").append(activeCount);
+ b.append(", ");
+ b.append("lookupCount=").append(lookupCount);
+ b.append(", ");
+ b.append("matchedCount=").append(matchedCount);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFTableStatsEntryVer13 other = (OFTableStatsEntryVer13) obj;
+
+ if (tableId == null) {
+ if (other.tableId != null)
+ return false;
+ } else if (!tableId.equals(other.tableId))
+ return false;
+ if( activeCount != other.activeCount)
+ return false;
+ if (lookupCount == null) {
+ if (other.lookupCount != null)
+ return false;
+ } else if (!lookupCount.equals(other.lookupCount))
+ return false;
+ if (matchedCount == null) {
+ if (other.matchedCount != null)
+ return false;
+ } else if (!matchedCount.equals(other.matchedCount))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((tableId == null) ? 0 : tableId.hashCode());
+ result = prime * (int) (activeCount ^ (activeCount >>> 32));
+ result = prime * result + ((lookupCount == null) ? 0 : lookupCount.hashCode());
+ result = prime * result + ((matchedCount == null) ? 0 : matchedCount.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableStatsReplyVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableStatsReplyVer13.java
new file mode 100644
index 0000000..c6e6fbe
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableStatsReplyVer13.java
@@ -0,0 +1,412 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFTableStatsReplyVer13 implements OFTableStatsReply {
+ private static final Logger logger = LoggerFactory.getLogger(OFTableStatsReplyVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int MINIMUM_LENGTH = 16;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsReplyFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsReplyFlags>of();
+ private final static List<OFTableStatsEntry> DEFAULT_ENTRIES = ImmutableList.<OFTableStatsEntry>of();
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsReplyFlags> flags;
+ private final List<OFTableStatsEntry> entries;
+//
+ // Immutable default instance
+ final static OFTableStatsReplyVer13 DEFAULT = new OFTableStatsReplyVer13(
+ DEFAULT_XID, DEFAULT_FLAGS, DEFAULT_ENTRIES
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFTableStatsReplyVer13(long xid, Set<OFStatsReplyFlags> flags, List<OFTableStatsEntry> entries) {
+ this.xid = xid;
+ this.flags = flags;
+ this.entries = entries;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.TABLE;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public List<OFTableStatsEntry> getEntries() {
+ return entries;
+ }
+
+
+
+ public OFTableStatsReply.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFTableStatsReply.Builder {
+ final OFTableStatsReplyVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean entriesSet;
+ private List<OFTableStatsEntry> entries;
+
+ BuilderWithParent(OFTableStatsReplyVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFTableStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.TABLE;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFTableStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public List<OFTableStatsEntry> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFTableStatsReply.Builder setEntries(List<OFTableStatsEntry> entries) {
+ this.entries = entries;
+ this.entriesSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFTableStatsReply build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ List<OFTableStatsEntry> entries = this.entriesSet ? this.entries : parentMessage.entries;
+ if(entries == null)
+ throw new NullPointerException("Property entries must not be null");
+
+ //
+ return new OFTableStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ }
+
+ }
+
+ static class Builder implements OFTableStatsReply.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsReplyFlags> flags;
+ private boolean entriesSet;
+ private List<OFTableStatsEntry> entries;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REPLY;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFTableStatsReply.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.TABLE;
+ }
+
+ @Override
+ public Set<OFStatsReplyFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFTableStatsReply.Builder setFlags(Set<OFStatsReplyFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+ @Override
+ public List<OFTableStatsEntry> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public OFTableStatsReply.Builder setEntries(List<OFTableStatsEntry> entries) {
+ this.entries = entries;
+ this.entriesSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFTableStatsReply build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsReplyFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+ List<OFTableStatsEntry> entries = this.entriesSet ? this.entries : DEFAULT_ENTRIES;
+ if(entries == null)
+ throw new NullPointerException("Property entries must not be null");
+
+
+ return new OFTableStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFTableStatsReply> {
+ @Override
+ public OFTableStatsReply readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 19
+ byte type = bb.readByte();
+ if(type != (byte) 0x13)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REPLY(19), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length < MINIMUM_LENGTH)
+ throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 3
+ short statsType = bb.readShort();
+ if(statsType != (short) 0x3)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.TABLE(3), got="+statsType);
+ Set<OFStatsReplyFlags> flags = OFStatsReplyFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+ List<OFTableStatsEntry> entries = ChannelUtils.readList(bb, length - (bb.readerIndex() - start), OFTableStatsEntryVer13.READER);
+
+ OFTableStatsReplyVer13 tableStatsReplyVer13 = new OFTableStatsReplyVer13(
+ xid,
+ flags,
+ entries
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", tableStatsReplyVer13);
+ return tableStatsReplyVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFTableStatsReplyVer13Funnel FUNNEL = new OFTableStatsReplyVer13Funnel();
+ static class OFTableStatsReplyVer13Funnel implements Funnel<OFTableStatsReplyVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFTableStatsReplyVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 19
+ sink.putByte((byte) 0x13);
+ // FIXME: skip funnel of length
+ sink.putLong(message.xid);
+ // fixed value property statsType = 3
+ sink.putShort((short) 0x3);
+ OFStatsReplyFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ FunnelUtils.putList(message.entries, sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFTableStatsReplyVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFTableStatsReplyVer13 message) {
+ int startIndex = bb.writerIndex();
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 19
+ bb.writeByte((byte) 0x13);
+ // length is length of variable message, will be updated at the end
+ int lengthIndex = bb.writerIndex();
+ bb.writeShort(U16.t(0));
+
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 3
+ bb.writeShort((short) 0x3);
+ OFStatsReplyFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+ ChannelUtils.writeList(bb, message.entries);
+
+ // update length field
+ int length = bb.writerIndex() - startIndex;
+ bb.setShort(lengthIndex, length);
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFTableStatsReplyVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(", ");
+ b.append("entries=").append(entries);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFTableStatsReplyVer13 other = (OFTableStatsReplyVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ if (entries == null) {
+ if (other.entries != null)
+ return false;
+ } else if (!entries.equals(other.entries))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ result = prime * result + ((entries == null) ? 0 : entries.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableStatsRequestVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableStatsRequestVer13.java
new file mode 100644
index 0000000..63bceee
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTableStatsRequestVer13.java
@@ -0,0 +1,351 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFTableStatsRequestVer13 implements OFTableStatsRequest {
+ private static final Logger logger = LoggerFactory.getLogger(OFTableStatsRequestVer13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 16;
+
+ private final static long DEFAULT_XID = 0x0L;
+ private final static Set<OFStatsRequestFlags> DEFAULT_FLAGS = ImmutableSet.<OFStatsRequestFlags>of();
+
+ // OF message fields
+ private final long xid;
+ private final Set<OFStatsRequestFlags> flags;
+//
+ // Immutable default instance
+ final static OFTableStatsRequestVer13 DEFAULT = new OFTableStatsRequestVer13(
+ DEFAULT_XID, DEFAULT_FLAGS
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFTableStatsRequestVer13(long xid, Set<OFStatsRequestFlags> flags) {
+ this.xid = xid;
+ this.flags = flags;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.TABLE;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+
+
+ public OFTableStatsRequest.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFTableStatsRequest.Builder {
+ final OFTableStatsRequestVer13 parentMessage;
+
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+
+ BuilderWithParent(OFTableStatsRequestVer13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFTableStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.TABLE;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFTableStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+
+
+ @Override
+ public OFTableStatsRequest build() {
+ long xid = this.xidSet ? this.xid : parentMessage.xid;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : parentMessage.flags;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+
+ //
+ return new OFTableStatsRequestVer13(
+ xid,
+ flags
+ );
+ }
+
+ }
+
+ static class Builder implements OFTableStatsRequest.Builder {
+ // OF message fields
+ private boolean xidSet;
+ private long xid;
+ private boolean flagsSet;
+ private Set<OFStatsRequestFlags> flags;
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+ @Override
+ public OFType getType() {
+ return OFType.STATS_REQUEST;
+ }
+
+ @Override
+ public long getXid() {
+ return xid;
+ }
+
+ @Override
+ public OFTableStatsRequest.Builder setXid(long xid) {
+ this.xid = xid;
+ this.xidSet = true;
+ return this;
+ }
+ @Override
+ public OFStatsType getStatsType() {
+ return OFStatsType.TABLE;
+ }
+
+ @Override
+ public Set<OFStatsRequestFlags> getFlags() {
+ return flags;
+ }
+
+ @Override
+ public OFTableStatsRequest.Builder setFlags(Set<OFStatsRequestFlags> flags) {
+ this.flags = flags;
+ this.flagsSet = true;
+ return this;
+ }
+//
+ @Override
+ public OFTableStatsRequest build() {
+ long xid = this.xidSet ? this.xid : DEFAULT_XID;
+ Set<OFStatsRequestFlags> flags = this.flagsSet ? this.flags : DEFAULT_FLAGS;
+ if(flags == null)
+ throw new NullPointerException("Property flags must not be null");
+
+
+ return new OFTableStatsRequestVer13(
+ xid,
+ flags
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFTableStatsRequest> {
+ @Override
+ public OFTableStatsRequest readFrom(ChannelBuffer bb) throws OFParseError {
+ int start = bb.readerIndex();
+ // fixed value property version == 4
+ byte version = bb.readByte();
+ if(version != (byte) 0x4)
+ throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
+ // fixed value property type == 18
+ byte type = bb.readByte();
+ if(type != (byte) 0x12)
+ throw new OFParseError("Wrong type: Expected=OFType.STATS_REQUEST(18), got="+type);
+ int length = U16.f(bb.readShort());
+ if(length != 16)
+ throw new OFParseError("Wrong length: Expected=16(16), got="+length);
+ if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
+ // Buffer does not have all data yet
+ bb.readerIndex(start);
+ return null;
+ }
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - length={}", length);
+ long xid = U32.f(bb.readInt());
+ // fixed value property statsType == 3
+ short statsType = bb.readShort();
+ if(statsType != (short) 0x3)
+ throw new OFParseError("Wrong statsType: Expected=OFStatsType.TABLE(3), got="+statsType);
+ Set<OFStatsRequestFlags> flags = OFStatsRequestFlagsSerializerVer13.readFrom(bb);
+ // pad: 4 bytes
+ bb.skipBytes(4);
+
+ OFTableStatsRequestVer13 tableStatsRequestVer13 = new OFTableStatsRequestVer13(
+ xid,
+ flags
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", tableStatsRequestVer13);
+ return tableStatsRequestVer13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFTableStatsRequestVer13Funnel FUNNEL = new OFTableStatsRequestVer13Funnel();
+ static class OFTableStatsRequestVer13Funnel implements Funnel<OFTableStatsRequestVer13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFTableStatsRequestVer13 message, PrimitiveSink sink) {
+ // fixed value property version = 4
+ sink.putByte((byte) 0x4);
+ // fixed value property type = 18
+ sink.putByte((byte) 0x12);
+ // fixed value property length = 16
+ sink.putShort((short) 0x10);
+ sink.putLong(message.xid);
+ // fixed value property statsType = 3
+ sink.putShort((short) 0x3);
+ OFStatsRequestFlagsSerializerVer13.putTo(message.flags, sink);
+ // skip pad (4 bytes)
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFTableStatsRequestVer13> {
+ @Override
+ public void write(ChannelBuffer bb, OFTableStatsRequestVer13 message) {
+ // fixed value property version = 4
+ bb.writeByte((byte) 0x4);
+ // fixed value property type = 18
+ bb.writeByte((byte) 0x12);
+ // fixed value property length = 16
+ bb.writeShort((short) 0x10);
+ bb.writeInt(U32.t(message.xid));
+ // fixed value property statsType = 3
+ bb.writeShort((short) 0x3);
+ OFStatsRequestFlagsSerializerVer13.writeTo(bb, message.flags);
+ // pad: 4 bytes
+ bb.writeZero(4);
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFTableStatsRequestVer13(");
+ b.append("xid=").append(xid);
+ b.append(", ");
+ b.append("flags=").append(flags);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFTableStatsRequestVer13 other = (OFTableStatsRequestVer13) obj;
+
+ if( xid != other.xid)
+ return false;
+ if (flags == null) {
+ if (other.flags != null)
+ return false;
+ } else if (!flags.equals(other.flags))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * (int) (xid ^ (xid >>> 32));
+ result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+ return result;
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTypeSerializerVer13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTypeSerializerVer13.java
new file mode 100644
index 0000000..2047f98
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFTypeSerializerVer13.java
@@ -0,0 +1,214 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template const_serializer.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.OFType;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+
+public class OFTypeSerializerVer13 {
+
+ public final static byte HELLO_VAL = (byte) 0x0;
+ public final static byte ERROR_VAL = (byte) 0x1;
+ public final static byte ECHO_REQUEST_VAL = (byte) 0x2;
+ public final static byte ECHO_REPLY_VAL = (byte) 0x3;
+ public final static byte EXPERIMENTER_VAL = (byte) 0x4;
+ public final static byte FEATURES_REQUEST_VAL = (byte) 0x5;
+ public final static byte FEATURES_REPLY_VAL = (byte) 0x6;
+ public final static byte GET_CONFIG_REQUEST_VAL = (byte) 0x7;
+ public final static byte GET_CONFIG_REPLY_VAL = (byte) 0x8;
+ public final static byte SET_CONFIG_VAL = (byte) 0x9;
+ public final static byte PACKET_IN_VAL = (byte) 0xa;
+ public final static byte FLOW_REMOVED_VAL = (byte) 0xb;
+ public final static byte PORT_STATUS_VAL = (byte) 0xc;
+ public final static byte PACKET_OUT_VAL = (byte) 0xd;
+ public final static byte FLOW_MOD_VAL = (byte) 0xe;
+ public final static byte GROUP_MOD_VAL = (byte) 0xf;
+ public final static byte PORT_MOD_VAL = (byte) 0x10;
+ public final static byte TABLE_MOD_VAL = (byte) 0x11;
+ public final static byte STATS_REQUEST_VAL = (byte) 0x12;
+ public final static byte STATS_REPLY_VAL = (byte) 0x13;
+ public final static byte BARRIER_REQUEST_VAL = (byte) 0x14;
+ public final static byte BARRIER_REPLY_VAL = (byte) 0x15;
+ public final static byte QUEUE_GET_CONFIG_REQUEST_VAL = (byte) 0x16;
+ public final static byte QUEUE_GET_CONFIG_REPLY_VAL = (byte) 0x17;
+ public final static byte ROLE_REQUEST_VAL = (byte) 0x18;
+ public final static byte ROLE_REPLY_VAL = (byte) 0x19;
+ public final static byte GET_ASYNC_REQUEST_VAL = (byte) 0x1a;
+ public final static byte GET_ASYNC_REPLY_VAL = (byte) 0x1b;
+ public final static byte SET_ASYNC_VAL = (byte) 0x1c;
+ public final static byte METER_MOD_VAL = (byte) 0x1d;
+
+ public static OFType readFrom(ChannelBuffer bb) throws OFParseError {
+ try {
+ return ofWireValue(bb.readByte());
+ } catch (IllegalArgumentException e) {
+ throw new OFParseError(e);
+ }
+ }
+
+ public static void writeTo(ChannelBuffer bb, OFType e) {
+ bb.writeByte(toWireValue(e));
+ }
+
+ public static void putTo(OFType e, PrimitiveSink sink) {
+ sink.putByte(toWireValue(e));
+ }
+
+ public static OFType ofWireValue(byte val) {
+ switch(val) {
+ case HELLO_VAL:
+ return OFType.HELLO;
+ case ERROR_VAL:
+ return OFType.ERROR;
+ case ECHO_REQUEST_VAL:
+ return OFType.ECHO_REQUEST;
+ case ECHO_REPLY_VAL:
+ return OFType.ECHO_REPLY;
+ case EXPERIMENTER_VAL:
+ return OFType.EXPERIMENTER;
+ case FEATURES_REQUEST_VAL:
+ return OFType.FEATURES_REQUEST;
+ case FEATURES_REPLY_VAL:
+ return OFType.FEATURES_REPLY;
+ case GET_CONFIG_REQUEST_VAL:
+ return OFType.GET_CONFIG_REQUEST;
+ case GET_CONFIG_REPLY_VAL:
+ return OFType.GET_CONFIG_REPLY;
+ case SET_CONFIG_VAL:
+ return OFType.SET_CONFIG;
+ case PACKET_IN_VAL:
+ return OFType.PACKET_IN;
+ case FLOW_REMOVED_VAL:
+ return OFType.FLOW_REMOVED;
+ case PORT_STATUS_VAL:
+ return OFType.PORT_STATUS;
+ case PACKET_OUT_VAL:
+ return OFType.PACKET_OUT;
+ case FLOW_MOD_VAL:
+ return OFType.FLOW_MOD;
+ case GROUP_MOD_VAL:
+ return OFType.GROUP_MOD;
+ case PORT_MOD_VAL:
+ return OFType.PORT_MOD;
+ case TABLE_MOD_VAL:
+ return OFType.TABLE_MOD;
+ case STATS_REQUEST_VAL:
+ return OFType.STATS_REQUEST;
+ case STATS_REPLY_VAL:
+ return OFType.STATS_REPLY;
+ case BARRIER_REQUEST_VAL:
+ return OFType.BARRIER_REQUEST;
+ case BARRIER_REPLY_VAL:
+ return OFType.BARRIER_REPLY;
+ case QUEUE_GET_CONFIG_REQUEST_VAL:
+ return OFType.QUEUE_GET_CONFIG_REQUEST;
+ case QUEUE_GET_CONFIG_REPLY_VAL:
+ return OFType.QUEUE_GET_CONFIG_REPLY;
+ case ROLE_REQUEST_VAL:
+ return OFType.ROLE_REQUEST;
+ case ROLE_REPLY_VAL:
+ return OFType.ROLE_REPLY;
+ case GET_ASYNC_REQUEST_VAL:
+ return OFType.GET_ASYNC_REQUEST;
+ case GET_ASYNC_REPLY_VAL:
+ return OFType.GET_ASYNC_REPLY;
+ case SET_ASYNC_VAL:
+ return OFType.SET_ASYNC;
+ case METER_MOD_VAL:
+ return OFType.METER_MOD;
+ default:
+ throw new IllegalArgumentException("Illegal wire value for type OFType in version 1.3: " + val);
+ }
+ }
+
+
+ public static byte toWireValue(OFType e) {
+ switch(e) {
+ case HELLO:
+ return HELLO_VAL;
+ case ERROR:
+ return ERROR_VAL;
+ case ECHO_REQUEST:
+ return ECHO_REQUEST_VAL;
+ case ECHO_REPLY:
+ return ECHO_REPLY_VAL;
+ case EXPERIMENTER:
+ return EXPERIMENTER_VAL;
+ case FEATURES_REQUEST:
+ return FEATURES_REQUEST_VAL;
+ case FEATURES_REPLY:
+ return FEATURES_REPLY_VAL;
+ case GET_CONFIG_REQUEST:
+ return GET_CONFIG_REQUEST_VAL;
+ case GET_CONFIG_REPLY:
+ return GET_CONFIG_REPLY_VAL;
+ case SET_CONFIG:
+ return SET_CONFIG_VAL;
+ case PACKET_IN:
+ return PACKET_IN_VAL;
+ case FLOW_REMOVED:
+ return FLOW_REMOVED_VAL;
+ case PORT_STATUS:
+ return PORT_STATUS_VAL;
+ case PACKET_OUT:
+ return PACKET_OUT_VAL;
+ case FLOW_MOD:
+ return FLOW_MOD_VAL;
+ case GROUP_MOD:
+ return GROUP_MOD_VAL;
+ case PORT_MOD:
+ return PORT_MOD_VAL;
+ case TABLE_MOD:
+ return TABLE_MOD_VAL;
+ case STATS_REQUEST:
+ return STATS_REQUEST_VAL;
+ case STATS_REPLY:
+ return STATS_REPLY_VAL;
+ case BARRIER_REQUEST:
+ return BARRIER_REQUEST_VAL;
+ case BARRIER_REPLY:
+ return BARRIER_REPLY_VAL;
+ case QUEUE_GET_CONFIG_REQUEST:
+ return QUEUE_GET_CONFIG_REQUEST_VAL;
+ case QUEUE_GET_CONFIG_REPLY:
+ return QUEUE_GET_CONFIG_REPLY_VAL;
+ case ROLE_REQUEST:
+ return ROLE_REQUEST_VAL;
+ case ROLE_REPLY:
+ return ROLE_REPLY_VAL;
+ case GET_ASYNC_REQUEST:
+ return GET_ASYNC_REQUEST_VAL;
+ case GET_ASYNC_REPLY:
+ return GET_ASYNC_REPLY_VAL;
+ case SET_ASYNC:
+ return SET_ASYNC_VAL;
+ case METER_MOD:
+ return METER_MOD_VAL;
+ default:
+ throw new IllegalArgumentException("Illegal enum value for type OFType in version 1.3: " + e);
+ }
+ }
+
+}
diff --git a/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFUint64Ver13.java b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFUint64Ver13.java
new file mode 100644
index 0000000..c8b14ee
--- /dev/null
+++ b/of-save/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver13/OFUint64Ver13.java
@@ -0,0 +1,229 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Set;
+import org.jboss.netty.buffer.ChannelBuffer;
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.hash.Funnel;
+
+class OFUint64Ver13 implements OFUint64 {
+ private static final Logger logger = LoggerFactory.getLogger(OFUint64Ver13.class);
+ // version: 1.3
+ final static byte WIRE_VERSION = 4;
+ final static int LENGTH = 8;
+
+ private final static U64 DEFAULT_VALUE = U64.ZERO;
+
+ // OF message fields
+ private final U64 value;
+//
+ // Immutable default instance
+ final static OFUint64Ver13 DEFAULT = new OFUint64Ver13(
+ DEFAULT_VALUE
+ );
+
+ // package private constructor - used by readers, builders, and factory
+ OFUint64Ver13(U64 value) {
+ this.value = value;
+ }
+
+ // Accessors for OF message fields
+ @Override
+ public U64 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ public OFUint64.Builder createBuilder() {
+ return new BuilderWithParent(this);
+ }
+
+ static class BuilderWithParent implements OFUint64.Builder {
+ final OFUint64Ver13 parentMessage;
+
+ // OF message fields
+ private boolean valueSet;
+ private U64 value;
+
+ BuilderWithParent(OFUint64Ver13 parentMessage) {
+ this.parentMessage = parentMessage;
+ }
+
+ @Override
+ public U64 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFUint64.Builder setValue(U64 value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+
+
+ @Override
+ public OFUint64 build() {
+ U64 value = this.valueSet ? this.value : parentMessage.value;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+ //
+ return new OFUint64Ver13(
+ value
+ );
+ }
+
+ }
+
+ static class Builder implements OFUint64.Builder {
+ // OF message fields
+ private boolean valueSet;
+ private U64 value;
+
+ @Override
+ public U64 getValue() {
+ return value;
+ }
+
+ @Override
+ public OFUint64.Builder setValue(U64 value) {
+ this.value = value;
+ this.valueSet = true;
+ return this;
+ }
+ @Override
+ public OFVersion getVersion() {
+ return OFVersion.OF_13;
+ }
+
+//
+ @Override
+ public OFUint64 build() {
+ U64 value = this.valueSet ? this.value : DEFAULT_VALUE;
+ if(value == null)
+ throw new NullPointerException("Property value must not be null");
+
+
+ return new OFUint64Ver13(
+ value
+ );
+ }
+
+ }
+
+
+ final static Reader READER = new Reader();
+ static class Reader implements OFMessageReader<OFUint64> {
+ @Override
+ public OFUint64 readFrom(ChannelBuffer bb) throws OFParseError {
+ U64 value = U64.ofRaw(bb.readLong());
+
+ OFUint64Ver13 uint64Ver13 = new OFUint64Ver13(
+ value
+ );
+ if(logger.isTraceEnabled())
+ logger.trace("readFrom - read={}", uint64Ver13);
+ return uint64Ver13;
+ }
+ }
+
+ public void putTo(PrimitiveSink sink) {
+ FUNNEL.funnel(this, sink);
+ }
+
+ final static OFUint64Ver13Funnel FUNNEL = new OFUint64Ver13Funnel();
+ static class OFUint64Ver13Funnel implements Funnel<OFUint64Ver13> {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void funnel(OFUint64Ver13 message, PrimitiveSink sink) {
+ message.value.putTo(sink);
+ }
+ }
+
+
+ public void writeTo(ChannelBuffer bb) {
+ WRITER.write(bb, this);
+ }
+
+ final static Writer WRITER = new Writer();
+ static class Writer implements OFMessageWriter<OFUint64Ver13> {
+ @Override
+ public void write(ChannelBuffer bb, OFUint64Ver13 message) {
+ bb.writeLong(message.value.getValue());
+
+
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder("OFUint64Ver13(");
+ b.append("value=").append(value);
+ b.append(")");
+ return b.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OFUint64Ver13 other = (OFUint64Ver13) obj;
+
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+}