--- openflow-2011-09-29-2.h	2015-07-23 09:54:16.696479344 -0700
+++ openflow-2011-10-13.h	2015-07-23 09:54:16.704479344 -0700
@@ -349,189 +349,6 @@
 };
 OFP_ASSERT(sizeof(struct ofp_port_mod) == 40);
 
-/* Why is this packet being sent to the controller? */
-enum ofp_packet_in_reason {
-    OFPR_NO_MATCH,          /* No matching flow. */
-    OFPR_ACTION,            /* Action explicitly output to controller. */
-    OFPR_INVALID_TTL        /* Packet has invalid TTL */
-};
-
-/* Packet received on port (datapath -> controller). */
-struct ofp_packet_in {
-    struct ofp_header header;
-    uint32_t buffer_id;     /* ID assigned by datapath. */
-    uint32_t in_port;       /* Port on which frame was received. */
-    uint32_t in_phy_port;   /* Physical Port on which frame was received. */
-    uint16_t total_len;     /* Full length of frame. */
-    uint8_t reason;         /* Reason packet is being sent (one of OFPR_*) */
-    uint8_t table_id;       /* ID of the table that was looked up */
-    uint8_t data[0];        /* Ethernet frame, halfway through 32-bit word,
-                               so the IP header is 32-bit aligned.  The
-                               amount of data is inferred from the length
-                               field in the header.  Because of padding,
-                               offsetof(struct ofp_packet_in, data) ==
-                               sizeof(struct ofp_packet_in) - 2. */
-};
-OFP_ASSERT(sizeof(struct ofp_packet_in) == 24);
-
-enum ofp_action_type {
-    OFPAT_OUTPUT,           /* Output to switch port. */
-    OFPAT_OBSOLETE_1,       /* Obsolete. */
-    OFPAT_OBSOLETE_2,       /* Obsolete. */
-    OFPAT_OBSOLETE_3,       /* Obsolete. */
-    OFPAT_OBSOLETE_4,       /* Obsolete. */
-    OFPAT_OBSOLETE_5,       /* Obsolete. */
-    OFPAT_OBSOLETE_6,       /* Obsolete. */
-    OFPAT_OBSOLETE_7,       /* Obsolete. */
-    OFPAT_OBSOLETE_8,       /* Obsolete. */
-    OFPAT_OBSOLETE_9,       /* Obsolete. */
-    OFPAT_OBSOLETE_10,      /* Obsolete. */
-    OFPAT_COPY_TTL_OUT,     /* Copy TTL "outwards" -- from next-to-outermost to
-                               outermost */
-    OFPAT_COPY_TTL_IN,      /* Copy TTL "inwards" -- from outermost to
-                               next-to-outermost */
-    OFPAT_OBSOLETE_11,      /* Obsolete. */
-    OFPAT_OBSOLETE_12,      /* Obsolete. */
-    OFPAT_SET_MPLS_TTL,     /* MPLS TTL */
-    OFPAT_DEC_MPLS_TTL,     /* Decrement MPLS TTL */
-
-    OFPAT_PUSH_VLAN,        /* Push a new VLAN tag */
-    OFPAT_POP_VLAN,         /* Pop the outer VLAN tag */
-    OFPAT_PUSH_MPLS,        /* Push a new MPLS tag */
-    OFPAT_POP_MPLS,         /* Pop the outer MPLS tag */
-    OFPAT_SET_QUEUE,        /* Set queue id when outputting to a port */
-    OFPAT_GROUP,            /* Apply group. */
-    OFPAT_SET_NW_TTL,       /* IP TTL. */
-    OFPAT_DEC_NW_TTL,       /* Decrement IP TTL. */
-    OFPAT_SET_FIELD,        /* Set a match field using OXM TLV format. */
-    OFPAT_EXPERIMENTER = 0xffff
-};
-
-/* Action structure for OFPAT_OUTPUT, which sends packets out 'port'.
- * When the 'port' is the OFPP_CONTROLLER, 'max_len' indicates the max
- * number of bytes to send.  A 'max_len' of zero means no bytes of the
- * packet should be sent.*/
-struct ofp_action_output {
-    uint16_t type;                  /* OFPAT_OUTPUT. */
-    uint16_t len;                   /* Length is 16. */
-    uint32_t port;                  /* Output port. */
-    uint16_t max_len;               /* Max length to send to controller. */
-    uint8_t pad[6];                 /* Pad to 64 bits. */
-};
-OFP_ASSERT(sizeof(struct ofp_action_output) == 16);
-
-/* Action structure for OFPAT_SET_MPLS_TTL. */
-struct ofp_action_mpls_ttl {
-    uint16_t type;                  /* OFPAT_SET_MPLS_TTL. */
-    uint16_t len;                   /* Length is 8. */
-    uint8_t mpls_ttl;               /* MPLS TTL */
-    uint8_t pad[3];
-};
-OFP_ASSERT(sizeof(struct ofp_action_mpls_ttl) == 8);
-
-/* Action structure for OFPAT_PUSH_VLAN/MPLS. */
-struct ofp_action_push {
-    uint16_t type;                  /* OFPAT_PUSH_VLAN/MPLS. */
-    uint16_t len;                   /* Length is 8. */
-    uint16_t ethertype;             /* Ethertype */
-    uint8_t pad[2];
-};
-OFP_ASSERT(sizeof(struct ofp_action_push) == 8);
-
-/* Action structure for OFPAT_POP_MPLS. */
-struct ofp_action_pop_mpls {
-    uint16_t type;                  /* OFPAT_POP_MPLS. */
-    uint16_t len;                   /* Length is 8. */
-    uint16_t ethertype;             /* Ethertype */
-    uint8_t pad[2];
-};
-OFP_ASSERT(sizeof(struct ofp_action_pop_mpls) == 8);
-
-/* Action structure for OFPAT_GROUP. */
-struct ofp_action_group {
-    uint16_t type;                  /* OFPAT_GROUP. */
-    uint16_t len;                   /* Length is 8. */
-    uint32_t group_id;              /* Group identifier. */
-};
-OFP_ASSERT(sizeof(struct ofp_action_group) == 8);
-
-/* Action structure for OFPAT_SET_NW_TTL. */
-struct ofp_action_nw_ttl {
-    uint16_t type;                  /* OFPAT_SET_NW_TTL. */
-    uint16_t len;                   /* Length is 8. */
-    uint8_t nw_ttl;                 /* IP TTL */
-    uint8_t pad[3];
-};
-OFP_ASSERT(sizeof(struct ofp_action_nw_ttl) == 8);
-
-/* Action structure for OFPAT_SET_FIELD. */
-struct ofp_action_set_field {
-    uint16_t type;                  /* OFPAT_SET_FIELD. */
-    uint16_t len;                   /* Length is padded to 64 bits. */
-    /* Followed by:
-     *   - Exactly oxm_len bytes containing a single OXM TLV, then
-     *   - Exactly (oxm_len + 7)/8*8 - oxm_len (between 0 and 7) bytes of
-     *     all-zero bytes
-     */
-    uint8_t field[4];               /* OXM TLV - Make compiler happy */
-};
-OFP_ASSERT(sizeof(struct ofp_action_nw_ttl) == 8);
-
-/* Action header for OFPAT_EXPERIMENTER.
- * The rest of the body is experimenter-defined. */
-struct ofp_action_experimenter_header {
-    uint16_t type;                  /* OFPAT_EXPERIMENTER. */
-    uint16_t len;                   /* Length is a multiple of 8. */
-    uint32_t experimenter;          /* Experimenter ID which takes the same
-                                       form as in struct
-                                       ofp_experimenter_header. */
-};
-OFP_ASSERT(sizeof(struct ofp_action_experimenter_header) == 8);
-
-/* Action header that is common to all actions.  The length includes the
- * header and any padding used to make the action 64-bit aligned.
- * NB: The length of an action *must* always be a multiple of eight. */
-struct ofp_action_header {
-    uint16_t type;                  /* One of OFPAT_*. */
-    uint16_t len;                   /* Length of action, including this
-                                       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);
-
-/* Send packet (controller -> datapath). */
-struct ofp_packet_out {
-    struct ofp_header header;
-    uint32_t buffer_id;           /* ID assigned by datapath (-1 if none). */
-    uint32_t in_port;             /* Packet's input port or OFPP_CONTROLLER. */
-    uint16_t actions_len;         /* Size of action array in bytes. */
-    uint8_t pad[6];
-    struct ofp_action_header actions[0]; /* Action list. */
-    /* uint8_t data[0]; */        /* Packet data.  The length is inferred
-                                     from the length field in the header.
-                                     (Only meaningful if buffer_id == -1.) */
-};
-OFP_ASSERT(sizeof(struct ofp_packet_out) == 24);
-
-enum ofp_flow_mod_command {
-    OFPFC_ADD,              /* New flow. */
-    OFPFC_MODIFY,           /* Modify all matching flows. */
-    OFPFC_MODIFY_STRICT,    /* Modify entry strictly matching wildcards and
-                               priority. */
-    OFPFC_DELETE,           /* Delete all matching flows. */
-    OFPFC_DELETE_STRICT     /* Delete entry strictly matching wildcards and
-                               priority. */
-};
-
-/* Group commands */
-enum ofp_group_mod_command {
-    OFPGC_ADD,              /* New group. */
-    OFPGC_MODIFY,           /* Modify all matching groups. */
-    OFPGC_DELETE,           /* Delete all matching groups. */
-};
-
 /* ## -------------------------- ## */
 /* ## OpenFlow Extensible Match. ## */
 /* ## -------------------------- ## */
@@ -955,10 +772,140 @@
 };
 OFP_ASSERT(sizeof(struct ofp_oxm_experimenter_header) == 8);
 
+/* ## ----------------- ## */
+/* ## OpenFlow Actions. ## */
+/* ## ----------------- ## */
 
-/* ## ------------- ## */
-/* ## Instructions. ## */
-/* ## ------------- ## */
+enum ofp_action_type {
+    OFPAT_OUTPUT,           /* Output to switch port. */
+    OFPAT_OBSOLETE_1,       /* Obsolete. */
+    OFPAT_OBSOLETE_2,       /* Obsolete. */
+    OFPAT_OBSOLETE_3,       /* Obsolete. */
+    OFPAT_OBSOLETE_4,       /* Obsolete. */
+    OFPAT_OBSOLETE_5,       /* Obsolete. */
+    OFPAT_OBSOLETE_6,       /* Obsolete. */
+    OFPAT_OBSOLETE_7,       /* Obsolete. */
+    OFPAT_OBSOLETE_8,       /* Obsolete. */
+    OFPAT_OBSOLETE_9,       /* Obsolete. */
+    OFPAT_OBSOLETE_10,      /* Obsolete. */
+    OFPAT_COPY_TTL_OUT,     /* Copy TTL "outwards" -- from next-to-outermost to
+                               outermost */
+    OFPAT_COPY_TTL_IN,      /* Copy TTL "inwards" -- from outermost to
+                               next-to-outermost */
+    OFPAT_OBSOLETE_11,      /* Obsolete. */
+    OFPAT_OBSOLETE_12,      /* Obsolete. */
+    OFPAT_SET_MPLS_TTL,     /* MPLS TTL */
+    OFPAT_DEC_MPLS_TTL,     /* Decrement MPLS TTL */
+
+    OFPAT_PUSH_VLAN,        /* Push a new VLAN tag */
+    OFPAT_POP_VLAN,         /* Pop the outer VLAN tag */
+    OFPAT_PUSH_MPLS,        /* Push a new MPLS tag */
+    OFPAT_POP_MPLS,         /* Pop the outer MPLS tag */
+    OFPAT_SET_QUEUE,        /* Set queue id when outputting to a port */
+    OFPAT_GROUP,            /* Apply group. */
+    OFPAT_SET_NW_TTL,       /* IP TTL. */
+    OFPAT_DEC_NW_TTL,       /* Decrement IP TTL. */
+    OFPAT_SET_FIELD,        /* Set a match field using OXM TLV format. */
+    OFPAT_EXPERIMENTER = 0xffff
+};
+
+/* Action structure for OFPAT_OUTPUT, which sends packets out 'port'.
+ * When the 'port' is the OFPP_CONTROLLER, 'max_len' indicates the max
+ * number of bytes to send.  A 'max_len' of zero means no bytes of the
+ * packet should be sent.*/
+struct ofp_action_output {
+    uint16_t type;                  /* OFPAT_OUTPUT. */
+    uint16_t len;                   /* Length is 16. */
+    uint32_t port;                  /* Output port. */
+    uint16_t max_len;               /* Max length to send to controller. */
+    uint8_t pad[6];                 /* Pad to 64 bits. */
+};
+OFP_ASSERT(sizeof(struct ofp_action_output) == 16);
+
+/* Action structure for OFPAT_SET_MPLS_TTL. */
+struct ofp_action_mpls_ttl {
+    uint16_t type;                  /* OFPAT_SET_MPLS_TTL. */
+    uint16_t len;                   /* Length is 8. */
+    uint8_t mpls_ttl;               /* MPLS TTL */
+    uint8_t pad[3];
+};
+OFP_ASSERT(sizeof(struct ofp_action_mpls_ttl) == 8);
+
+/* Action structure for OFPAT_PUSH_VLAN/MPLS. */
+struct ofp_action_push {
+    uint16_t type;                  /* OFPAT_PUSH_VLAN/MPLS. */
+    uint16_t len;                   /* Length is 8. */
+    uint16_t ethertype;             /* Ethertype */
+    uint8_t pad[2];
+};
+OFP_ASSERT(sizeof(struct ofp_action_push) == 8);
+
+/* Action structure for OFPAT_POP_MPLS. */
+struct ofp_action_pop_mpls {
+    uint16_t type;                  /* OFPAT_POP_MPLS. */
+    uint16_t len;                   /* Length is 8. */
+    uint16_t ethertype;             /* Ethertype */
+    uint8_t pad[2];
+};
+OFP_ASSERT(sizeof(struct ofp_action_pop_mpls) == 8);
+
+/* Action structure for OFPAT_GROUP. */
+struct ofp_action_group {
+    uint16_t type;                  /* OFPAT_GROUP. */
+    uint16_t len;                   /* Length is 8. */
+    uint32_t group_id;              /* Group identifier. */
+};
+OFP_ASSERT(sizeof(struct ofp_action_group) == 8);
+
+/* Action structure for OFPAT_SET_NW_TTL. */
+struct ofp_action_nw_ttl {
+    uint16_t type;                  /* OFPAT_SET_NW_TTL. */
+    uint16_t len;                   /* Length is 8. */
+    uint8_t nw_ttl;                 /* IP TTL */
+    uint8_t pad[3];
+};
+OFP_ASSERT(sizeof(struct ofp_action_nw_ttl) == 8);
+
+/* Action structure for OFPAT_SET_FIELD. */
+struct ofp_action_set_field {
+    uint16_t type;                  /* OFPAT_SET_FIELD. */
+    uint16_t len;                   /* Length is padded to 64 bits. */
+    /* Followed by:
+     *   - Exactly oxm_len bytes containing a single OXM TLV, then
+     *   - Exactly (oxm_len + 7)/8*8 - oxm_len (between 0 and 7) bytes of
+     *     all-zero bytes
+     */
+    uint8_t field[4];               /* OXM TLV - Make compiler happy */
+};
+OFP_ASSERT(sizeof(struct ofp_action_nw_ttl) == 8);
+
+/* Action header for OFPAT_EXPERIMENTER.
+ * The rest of the body is experimenter-defined. */
+struct ofp_action_experimenter_header {
+    uint16_t type;                  /* OFPAT_EXPERIMENTER. */
+    uint16_t len;                   /* Length is a multiple of 8. */
+    uint32_t experimenter;          /* Experimenter ID which takes the same
+                                       form as in struct
+                                       ofp_experimenter_header. */
+};
+OFP_ASSERT(sizeof(struct ofp_action_experimenter_header) == 8);
+
+/* Action header that is common to all actions.  The length includes the
+ * header and any padding used to make the action 64-bit aligned.
+ * NB: The length of an action *must* always be a multiple of eight. */
+struct ofp_action_header {
+    uint16_t type;                  /* One of OFPAT_*. */
+    uint16_t len;                   /* Length of action, including this
+                                       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);
+
+/* ## ---------------------- ## */
+/* ## OpenFlow Instructions. ## */
+/* ## ---------------------- ## */
 
 enum ofp_instruction_type {
     OFPIT_GOTO_TABLE = 1,       /* Setup the next table in the lookup
@@ -1022,6 +969,20 @@
 };
 OFP_ASSERT(sizeof(struct ofp_instruction_experimenter) == 8);
 
+/* ## --------------------------- ## */
+/* ## OpenFlow Flow Modification. ## */
+/* ## --------------------------- ## */
+
+enum ofp_flow_mod_command {
+    OFPFC_ADD,              /* New flow. */
+    OFPFC_MODIFY,           /* Modify all matching flows. */
+    OFPFC_MODIFY_STRICT,    /* Modify entry strictly matching wildcards and
+                               priority. */
+    OFPFC_DELETE,           /* Delete all matching flows. */
+    OFPFC_DELETE_STRICT     /* Delete entry strictly matching wildcards and
+                               priority. */
+};
+
 /* Value used in "idle_timeout" and "hard_timeout" to indicate that the entry
  * is permanent. */
 #define OFP_FLOW_PERMANENT 0
@@ -1085,6 +1046,13 @@
                                       */
 };
 
+/* Group commands */
+enum ofp_group_mod_command {
+    OFPGC_ADD,              /* New group. */
+    OFPGC_MODIFY,           /* Modify all matching groups. */
+    OFPGC_DELETE,           /* Delete all matching groups. */
+};
+
 /* Bucket for use in groups. */
 struct ofp_bucket {
     uint16_t len;                   /* Length the bucket in bytes, including
@@ -1126,6 +1094,45 @@
     OFPGT_FF        /* Fast failover group. */
 };
 
+/* Send packet (controller -> datapath). */
+struct ofp_packet_out {
+    struct ofp_header header;
+    uint32_t buffer_id;           /* ID assigned by datapath (-1 if none). */
+    uint32_t in_port;             /* Packet's input port or OFPP_CONTROLLER. */
+    uint16_t actions_len;         /* Size of action array in bytes. */
+    uint8_t pad[6];
+    struct ofp_action_header actions[0]; /* Action list. */
+    /* uint8_t data[0]; */        /* Packet data.  The length is inferred
+                                     from the length field in the header.
+                                     (Only meaningful if buffer_id == -1.) */
+};
+OFP_ASSERT(sizeof(struct ofp_packet_out) == 24);
+
+/* Why is this packet being sent to the controller? */
+enum ofp_packet_in_reason {
+    OFPR_NO_MATCH,          /* No matching flow. */
+    OFPR_ACTION,            /* Action explicitly output to controller. */
+    OFPR_INVALID_TTL        /* Packet has invalid TTL */
+};
+
+/* Packet received on port (datapath -> controller). */
+struct ofp_packet_in {
+    struct ofp_header header;
+    uint32_t buffer_id;     /* ID assigned by datapath. */
+    uint32_t in_port;       /* Port on which frame was received. */
+    uint32_t in_phy_port;   /* Physical Port on which frame was received. */
+    uint16_t total_len;     /* Full length of frame. */
+    uint8_t reason;         /* Reason packet is being sent (one of OFPR_*) */
+    uint8_t table_id;       /* ID of the table that was looked up */
+    uint8_t data[0];        /* Ethernet frame, halfway through 32-bit word,
+                               so the IP header is 32-bit aligned.  The
+                               amount of data is inferred from the length
+                               field in the header.  Because of padding,
+                               offsetof(struct ofp_packet_in, data) ==
+                               sizeof(struct ofp_packet_in) - 2. */
+};
+OFP_ASSERT(sizeof(struct ofp_packet_in) == 24);
+
 /* Why was this flow removed? */
 enum ofp_flow_removed_reason {
     OFPRR_IDLE_TIMEOUT,         /* Flow idle time exceeded idle_timeout. */
