--- openflow-2013-01-18.h	2015-07-23 09:54:17.304479368 -0700
+++ openflow-2013-01-22.h	2015-07-23 09:54:17.308479369 -0700
@@ -1059,9 +1059,8 @@
                                        header.  This is the length of action,
                                        including any padding to make it
                                        64-bit aligned. */
-    uint8_t pad[4];
 };
-OFP_ASSERT(sizeof(struct ofp_action_header) == 8);
+OFP_ASSERT(sizeof(struct ofp_action_header) == 4);
 
 enum ofp_controller_max_len {
 	OFPCML_MAX       = 0xffe5, /* maximum max_len value which can be used
@@ -1176,16 +1175,16 @@
 /* Instruction header that is common to all instructions.  The length includes
  * the header and any padding used to make the instruction 64-bit aligned.
  * NB: The length of an instruction *must* always be a multiple of eight. */
-struct ofp_instruction {
-    uint16_t type;                /* Instruction type */
+struct ofp_instruction_header {
+    uint16_t type;                /* One of OFPIT_*. */
     uint16_t len;                 /* Length of this struct in bytes. */
 };
-OFP_ASSERT(sizeof(struct ofp_instruction) == 4);
+OFP_ASSERT(sizeof(struct ofp_instruction_header) == 4);
 
 /* Instruction structure for OFPIT_GOTO_TABLE */
 struct ofp_instruction_goto_table {
     uint16_t type;                /* OFPIT_GOTO_TABLE */
-    uint16_t len;                 /* Length of this struct in bytes. */
+    uint16_t len;                 /* Length is 8. */
     uint8_t table_id;             /* Set next table in the lookup pipeline */
     uint8_t pad[3];               /* Pad to 64 bits. */
 };
@@ -1194,7 +1193,7 @@
 /* Instruction structure for OFPIT_WRITE_METADATA */
 struct ofp_instruction_write_metadata {
     uint16_t type;                /* OFPIT_WRITE_METADATA */
-    uint16_t len;                 /* Length of this struct in bytes. */
+    uint16_t len;                 /* Length is 24. */
     uint8_t pad[4];               /* Align to 64-bits */
     uint64_t metadata;            /* Metadata value to write */
     uint64_t metadata_mask;       /* Metadata write bitmask */
@@ -1204,7 +1203,7 @@
 /* Instruction structure for OFPIT_WRITE/APPLY/CLEAR_ACTIONS */
 struct ofp_instruction_actions {
     uint16_t type;              /* One of OFPIT_*_ACTIONS */
-    uint16_t len;               /* Length of this struct in bytes. */
+    uint16_t len;               /* Length is padded to 64 bits. */
     uint8_t pad[4];             /* Align to 64-bits */
     struct ofp_action_header actions[0];  /* 0 or more actions associated with
                                              OFPIT_WRITE_ACTIONS and
@@ -1223,7 +1222,7 @@
 /* Instruction structure for experimental instructions */
 struct ofp_instruction_experimenter {
     uint16_t type;		/* OFPIT_EXPERIMENTER */
-    uint16_t len;               /* Length of this struct in bytes */
+    uint16_t len;               /* Length is padded to 64 bits. */
     uint32_t experimenter;      /* Experimenter ID which takes the same form
                                    as in struct ofp_experimenter_header. */
     /* Experimenter-defined arbitrary additional data. */
@@ -1293,10 +1292,10 @@
     uint8_t pad[2];
     struct ofp_match match;       /* Fields to match. Variable size. */
     /* The variable size and padded match is always followed by instructions. */
-    //struct ofp_instruction instructions[0]; /* Instruction set - 0 or more.
-                                                 The length of the instruction
-                                                 set is inferred from the
-                                                 length field in the header. */
+    //struct ofp_instruction_header instructions[0];
+	                          /* Instruction set - 0 or more. The length
+                                     of the instruction set is inferred from
+                                     the length field in the header. */
 };
 OFP_ASSERT(sizeof(struct ofp_flow_mod) == 56);
 
@@ -1468,7 +1467,7 @@
 /* OFPMBT_DROP band - drop packets */
 struct ofp_meter_band_drop {
     uint16_t        type;    /* OFPMBT_DROP. */
-    uint16_t        len;     /* Length in bytes of this band. */
+    uint16_t        len;     /* Length is 16. */
     uint32_t        rate;    /* Rate for dropping packets. */
     uint32_t        burst_size; /* Size of bursts. */
     uint8_t         pad[4];
@@ -1478,7 +1477,7 @@
 /* OFPMBT_DSCP_REMARK band - Remark DSCP in the IP header */
 struct ofp_meter_band_dscp_remark {
     uint16_t        type;    /* OFPMBT_DSCP_REMARK. */
-    uint16_t        len;     /* Length in bytes of this band. */
+    uint16_t        len;     /* Length is 16. */
     uint32_t        rate;    /* Rate for remarking packets. */
     uint32_t        burst_size; /* Size of bursts. */
     uint8_t         prec_level; /* Number of drop precedence level to add. */
@@ -1966,8 +1965,8 @@
     uint64_t packet_count;    /* Number of packets in flow. */
     uint64_t byte_count;      /* Number of bytes in flow. */
     struct ofp_match match;   /* Description of fields. Variable size. */
-    /* The variable size and padded match is always followed by instructions. */
-    //struct ofp_instruction instructions[0]; /* Instruction set - 0 or more. */
+    //struct ofp_instruction_header instructions[0];
+                              /* Instruction set - 0 or more. */
 };
 OFP_ASSERT(sizeof(struct ofp_flow_stats) == 56);
 
@@ -2031,6 +2030,14 @@
 };
 OFP_ASSERT(sizeof(struct ofp_table_feature_prop_header) == 4);
 
+/* Instruction ID */
+struct ofp_instruction_id {
+    uint16_t type;                /* One of OFPIT_*. */
+    uint16_t len;                 /* Length is 4 or experimenter defined. */
+    uint8_t exp_data[0];          /* Optional experimenter id + data. */
+};
+OFP_ASSERT(sizeof(struct ofp_instruction_id) == 4);
+
 /* Instructions property */
 struct ofp_table_feature_prop_instructions {
     uint16_t         type;    /* One of OFPTFPT_INSTRUCTIONS,
@@ -2040,7 +2047,7 @@
      *   - Exactly (length - 4) bytes containing the instruction ids, then
      *   - Exactly (length + 7)/8*8 - (length) (between 0 and 7)
      *     bytes of all-zero bytes */
-    struct ofp_instruction   instruction_ids[0];   /* List of instructions */
+    struct ofp_instruction_id  instruction_ids[0];   /* List of instructions */
 };
 OFP_ASSERT(sizeof(struct ofp_table_feature_prop_instructions) == 4);
 
@@ -2057,6 +2064,14 @@
 };
 OFP_ASSERT(sizeof(struct ofp_table_feature_prop_next_tables) == 4);
 
+/* Action ID */
+struct ofp_action_id {
+    uint16_t type;                /* One of OFPAT_*. */
+    uint16_t len;                 /* Length is 4 or experimenter defined. */
+    uint8_t exp_data[0];          /* Optional experimenter id + data. */
+};
+OFP_ASSERT(sizeof(struct ofp_action_id) == 4);
+
 /* Actions property */
 struct ofp_table_feature_prop_actions {
     uint16_t         type;    /* One of OFPTFPT_WRITE_ACTIONS,
@@ -2068,7 +2083,7 @@
      *   - Exactly (length - 4) bytes containing the action_ids, then
      *   - Exactly (length + 7)/8*8 - (length) (between 0 and 7)
      *     bytes of all-zero bytes */
-    struct ofp_action_header  action_ids[0];      /* List of actions */
+    struct ofp_action_id  action_ids[0];      /* List of actions */
 };
 OFP_ASSERT(sizeof(struct ofp_table_feature_prop_actions) == 4);
 
