Initial opendaylight infrastructure commit!!
[controller.git] / third-party / openflowj / src / main / java / org / openflow / protocol / action / OFActionStripVirtualLan.java
diff --git a/third-party/openflowj/src/main/java/org/openflow/protocol/action/OFActionStripVirtualLan.java b/third-party/openflowj/src/main/java/org/openflow/protocol/action/OFActionStripVirtualLan.java
new file mode 100644 (file)
index 0000000..eca3681
--- /dev/null
@@ -0,0 +1,35 @@
+/**
+ * @author David Erickson (daviderickson@cs.stanford.edu) - Mar 11, 2010
+ */
+package org.openflow.protocol.action;
+
+import java.nio.ByteBuffer;
+
+
+/**
+ * Represents an ofp_action_strip_vlan
+ * @author David Erickson (daviderickson@cs.stanford.edu) - Mar 11, 2010
+ */
+public class OFActionStripVirtualLan extends OFAction {
+    public static int MINIMUM_LENGTH = 8;
+
+    public OFActionStripVirtualLan() {
+        super();
+        super.setType(OFActionType.STRIP_VLAN);
+        super.setLength((short) MINIMUM_LENGTH);
+    }
+
+    @Override
+    public void readFrom(ByteBuffer data) {
+        super.readFrom(data);
+        // PAD
+        data.getInt();
+    }
+
+    @Override
+    public void writeTo(ByteBuffer data) {
+        super.writeTo(data);
+        // PAD
+        data.putInt(0);
+    }
+}
\ No newline at end of file