diff --git a/c_gen/templates/locitest/test_utils.c b/c_gen/templates/locitest/test_utils.c
index bcd4194..563f510 100644
--- a/c_gen/templates/locitest/test_utils.c
+++ b/c_gen/templates/locitest/test_utils.c
@@ -118,10 +118,32 @@
     return TEST_PASS;
 }
 
+static int
+test_of_object_new_from_message_preallocated(void)
+{
+    /* v1 OFPT_HELLO, xid=0x12345678 */
+    uint8_t buf[] = { 0x01, 0x00, 0x00, 0x08, 0x12, 0x34, 0x56, 0x78 };
+
+    of_object_storage_t storage;
+    of_object_t *obj = of_object_new_from_message_preallocated(
+        &storage, buf, sizeof(buf));
+
+    TEST_ASSERT(obj != NULL);
+    TEST_ASSERT(obj->version = OF_VERSION_1_0);
+    TEST_ASSERT(obj->object_id = OF_HELLO);
+
+    uint32_t xid;
+    of_hello_xid_get(obj, &xid);
+    TEST_ASSERT(xid == 0x12345678);
+
+    return TEST_PASS;
+}
+
 int
 run_utility_tests(void)
 {
     RUN_TEST(has_outport);
+    RUN_TEST(of_object_new_from_message_preallocated);
     RUN_TEST(dump_objs);
 
     return TEST_PASS;
diff --git a/c_gen/templates/of_object.c b/c_gen/templates/of_object.c
index 005965e..8fd0aab 100644
--- a/c_gen/templates/of_object.c
+++ b/c_gen/templates/of_object.c
@@ -180,6 +180,54 @@
 }
 
 /**
+ * Parse a message without allocating memory
+ *
+ * @param storage Pointer to an uninitialized of_object_storage_t
+ * @param buf Pointer to the buffer
+ * @param length Length of buf
+ * @returns Pointer to an initialized of_object_t
+ *
+ * The lifetime of the returned object is the minimum of the lifetimes of
+ * 'buf' and 'storage'.
+ */
+
+of_object_t *
+of_object_new_from_message_preallocated(of_object_storage_t *storage,
+                                        uint8_t *buf, int len)
+{
+    of_object_t *obj = &storage->obj;
+    of_wire_buffer_t *wbuf = &storage->wbuf;
+    of_message_t msg = buf;
+    of_version_t version;
+    of_object_id_t object_id;
+
+    memset(storage, 0, sizeof(*storage));
+
+    version = of_message_version_get(msg);
+    if (!OF_VERSION_OKAY(version)) {
+        return NULL;
+    }
+
+    if (of_validate_message(msg, len) != 0) {
+        LOCI_LOG_ERROR("message validation failed\n");
+        return NULL;
+    }
+
+    object_id = of_message_to_object_id(msg, len);
+    /* Already validated */
+    LOCI_ASSERT(object_id != OF_OBJECT_INVALID);
+
+    of_object_init_map[object_id](obj, version, len, 0);
+
+    obj->wire_object.wbuf = wbuf;
+    wbuf->buf = msg;
+    wbuf->alloc_bytes = len;
+    wbuf->current_bytes = len;
+
+    return obj;
+}
+
+/**
  * Bind an existing buffer to an LOCI object
  *
  * @param obj Pointer to the object to be updated
diff --git a/c_gen/templates/of_object.h b/c_gen/templates/of_object.h
index 0e761fd..3172ad1 100644
--- a/c_gen/templates/of_object.h
+++ b/c_gen/templates/of_object.h
@@ -122,6 +122,11 @@
 
 extern of_object_t *of_object_new_from_message(of_message_t msg, int len);
 
+typedef struct of_object_storage_s of_object_storage_t;
+
+of_object_t *of_object_new_from_message_preallocated(
+    of_object_storage_t *storage, uint8_t *buf, int len);
+
 /* Delete an OpenFlow object without reference to its type */
 extern void of_object_delete(of_object_t *obj);
 
@@ -169,4 +174,9 @@
     uint64_t metadata[(OF_OBJECT_METADATA_BYTES + 7) / 8];
 };
 
+struct of_object_storage_s {
+    of_object_t obj;
+    of_wire_buffer_t wbuf;
+};
+
 #endif /* _OF_OBJECT_H_ */
diff --git a/c_gen/templates/of_type_maps.c b/c_gen/templates/of_type_maps.c
index 8d89a36..c00694c 100644
--- a/c_gen/templates/of_type_maps.c
+++ b/c_gen/templates/of_type_maps.c
@@ -303,6 +303,8 @@
         case 1: *id = OF_INSTRUCTION_BSN_ARP_OFFLOAD; break;
         case 2: *id = OF_INSTRUCTION_BSN_DHCP_OFFLOAD; break;
         case 3: *id = OF_INSTRUCTION_BSN_DISABLE_SPLIT_HORIZON_CHECK; break;
+        case 4: *id = OF_INSTRUCTION_BSN_PERMIT; break;
+        case 5: *id = OF_INSTRUCTION_BSN_DENY; break;
         }
         break;
     }
diff --git a/loxi_ir/ir.py b/loxi_ir/ir.py
index 6a053c6..c8ca04d 100644
--- a/loxi_ir/ir.py
+++ b/loxi_ir/ir.py
@@ -440,10 +440,15 @@
             superclass_name = None
             superclass = None
 
+        ofc_members = []
+        for m in orig_fe.members:
+            if not isinstance(m, frontend_ir.OFDataMember) and not isinstance(m, frontend_ir.OFPadMember):
+                ofc_members.append(m)
+
         fe = frontend_ir.OFClass(
             name=name,
             superclass=superclass_name,
-            members=[m for m in orig_fe.members if not isinstance(m, frontend_ir.OFDataMember)],
+            members=ofc_members,
             virtual=orig_fe.virtual,
             params={})
 
diff --git a/openflow_input/bsn_acl b/openflow_input/bsn_acl
new file mode 100644
index 0000000..4035904
--- /dev/null
+++ b/openflow_input/bsn_acl
@@ -0,0 +1,50 @@
+// Copyright 2014, Big Switch Networks, Inc.
+//
+// LoxiGen is licensed under the Eclipse Public License, version 1.0 (EPL), with
+// the following special exception:
+//
+// LOXI Exception
+//
+// As a special exception to the terms of the EPL, you may distribute libraries
+// generated by LoxiGen (LoxiGen Libraries) under the terms of your choice, provided
+// that copyright and licensing notices generated by LoxiGen are not altered or removed
+// from the LoxiGen Libraries and the notice provided below is (i) included in
+// the LoxiGen Libraries, if distributed in source code form and (ii) included in any
+// documentation for the LoxiGen Libraries, if distributed in binary form.
+//
+// Notice: "Copyright 2014, Big Switch Networks, Inc. This library was generated by the LoxiGen Compiler."
+//
+// You may not use this file except in compliance with the EPL or LOXI Exception. You may obtain
+// a copy of the EPL at:
+//
+// http://www.eclipse.org/legal/epl-v10.html
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// EPL for the specific language governing permissions and limitations
+// under the EPL.
+//
+// Also derived from the OpenFlow header files which have these copyrights:
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+
+#version 4
+
+// Instructions to express control flow in ACL tables
+
+struct of_instruction_bsn_permit : of_instruction_bsn {
+    uint16_t type == 65535;
+    uint16_t len;
+    uint32_t experimenter == 0x5c16c7;
+    uint32_t subtype == 4;
+    pad(4);
+};
+
+struct of_instruction_bsn_deny : of_instruction_bsn {
+    uint16_t type == 65535;
+    uint16_t len;
+    uint32_t experimenter == 0x5c16c7;
+    uint32_t subtype == 5;
+    pad(4);
+};
diff --git a/openflow_input/standard-1.3 b/openflow_input/standard-1.3
index 764ad21..a91c859 100644
--- a/openflow_input/standard-1.3
+++ b/openflow_input/standard-1.3
@@ -758,7 +758,6 @@
 struct of_action_id {
     uint16_t type;
     uint16_t len;
-    pad(4);
 };
 
 struct of_action_output : of_action {
diff --git a/test_data/of13/action_id_output.data b/test_data/of13/action_id_output.data
new file mode 100644
index 0000000..7712203
--- /dev/null
+++ b/test_data/of13/action_id_output.data
@@ -0,0 +1,8 @@
+-- binary
+00 00 # type
+00 04 # length
+-- python
+ofp.action_id.output()
+-- c
+obj = of_action_id_output_new(OF_VERSION_1_3);
+-- java
