Added openflow-codec and openflowj_netty from openflowplugin
[openflowjava.git] / third-party / openflow-codec / src / main / java / org / openflow / codec / protocol / action / OFPActionDecNetworkTimeToLive.java
diff --git a/third-party/openflow-codec/src/main/java/org/openflow/codec/protocol/action/OFPActionDecNetworkTimeToLive.java b/third-party/openflow-codec/src/main/java/org/openflow/codec/protocol/action/OFPActionDecNetworkTimeToLive.java
new file mode 100644 (file)
index 0000000..51dcb33
--- /dev/null
@@ -0,0 +1,33 @@
+/**
+ * @author Yugandhar Sarraju (ysarraju@in.ibm.com) - July 20, 2013
+ */
+package org.openflow.codec.protocol.action;
+
+import org.openflow.codec.io.IDataBuffer;
+
+/**
+ * Represents an action type OFPAT_DEC_NW_TTL
+ */
+public class OFPActionDecNetworkTimeToLive extends OFPAction {
+    public static int MINIMUM_LENGTH = 8;
+
+    public OFPActionDecNetworkTimeToLive() {
+        super();
+        super.setType(OFPActionType.DEC_NW_TTL);
+        super.setLength((short) MINIMUM_LENGTH);
+    }
+
+    @Override
+    public void readFrom(IDataBuffer data) {
+        super.readFrom(data);
+        // PAD
+        data.getInt();
+    }
+
+    @Override
+    public void writeTo(IDataBuffer data) {
+        super.writeTo(data);
+        // PAD
+        data.putInt(0);
+    }
+}
\ No newline at end of file