--- openflow-2010-09-27.h	2015-07-23 09:54:15.916479312 -0700
+++ openflow-2010-09-11.h	2015-07-23 09:54:15.920479312 -0700
@@ -133,8 +133,9 @@
 
     /* Queue Configuration messages. */
     OFPT_QUEUE_GET_CONFIG_REQUEST,  /* Controller/switch message */
-    OFPT_QUEUE_GET_CONFIG_REPLY     /* Controller/switch message */
+    OFPT_QUEUE_GET_CONFIG_REPLY,     /* Controller/switch message */
 
+    OFPT_GROUP_MOD            /* Controller/switch message */
 };
 
 /* Header on all OpenFlow packets. */
@@ -158,19 +159,10 @@
 
 enum ofp_config_flags {
     /* Handling of IP fragments. */
-    OFPC_FRAG_NORMAL   = 0,       /* No special handling for fragments. */
-    OFPC_FRAG_DROP     = 1 << 0,  /* Drop fragments. */
-    OFPC_FRAG_REASM    = 1 << 1,  /* Reassemble (only if OFPC_IP_REASM set). */
-    OFPC_FRAG_MASK     = 3,
-
-    /* Handling of packets that don't match in the table. The default
-       behavior is SEND_TO_CONTROLLER */
-    OFPC_TABLE_MISS_CONTINUE = 1 << 2,  /* OpenFlow 1.0 behavior */
-    OFPC_TABLE_MISS_DROP = 1 << 3,      /* Drop if no match in table */
-
-    /* TTL processing - applicable for IP and MPLS packets */
-    OFPC_INVALID_TTL_TO_CONTROLLER = 1 << 4, /* Send packets with invalid TTL
-                                                ie. 0 or 1 to controller */
+    OFPC_FRAG_NORMAL   = 0,  /* No special handling for fragments. */
+    OFPC_FRAG_DROP     = 1,  /* Drop fragments. */
+    OFPC_FRAG_REASM    = 2,  /* Reassemble (only if OFPC_IP_REASM set). */
+    OFPC_FRAG_MASK     = 3
 };
 
 /* Switch configuration. */
@@ -275,7 +267,7 @@
 
     /* Features. */
     uint32_t capabilities;  /* Bitmap of support "ofp_capabilities". */
-    uint32_t reserved;
+    uint32_t actions;       /* Bitmap of supported "ofp_action_type"s. */
 
     /* Port info.*/
     struct ofp_phy_port ports[0];  /* Port definitions.  The number of ports
@@ -332,7 +324,7 @@
     uint16_t total_len;     /* Full length of frame. */
     uint16_t in_port;       /* Port on which frame was received. */
     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 pad;
     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
@@ -468,7 +460,7 @@
     OFPFC_MODIFY,           /* Modify all matching flows. */
     OFPFC_MODIFY_STRICT,    /* Modify entry strictly matching wildcards */
     OFPFC_DELETE,           /* Delete all matching flows. */
-    OFPFC_DELETE_STRICT     /* Strictly match wildcards and priority. */
+    OFPFC_DELETE_STRICT    /* Strictly match wildcards and priority. */
 };
 
 /* Flow wildcards. */
@@ -500,10 +492,8 @@
     OFPFW_DL_VLAN_PCP = 1 << 20,  /* VLAN priority. */
     OFPFW_NW_TOS = 1 << 21,  /* IP ToS (DSCP field, 6 bits). */
 
-    OFPFW_METADATA = 1 << 22, /* Metadata field */
-
     /* Wildcard all fields. */
-    OFPFW_ALL = ((1 << 23) - 1)
+    OFPFW_ALL = ((1 << 22) - 1)
 };
 
 /* The wildcards for ICMP type and code fields use the transport source
@@ -545,10 +535,8 @@
     uint32_t nw_dst;           /* IP destination address. */
     uint16_t tp_src;           /* TCP/UDP source port. */
     uint16_t tp_dst;           /* TCP/UDP destination port. */
-    uint64_t metadata;         /* Metadata passed between tables. */
-    uint64_t metadata_mask;    /* Mask for metadata. */
 };
-OFP_ASSERT(sizeof(struct ofp_match) == 56);
+OFP_ASSERT(sizeof(struct ofp_match) == 40);
 
 /* The match fields for ICMP type and code use the transport source and
  * destination port fields, respectively. */
@@ -562,51 +550,6 @@
 /* By default, choose a priority in the middle. */
 #define OFP_DEFAULT_PRIORITY 0x8000
 
-enum ofp_instruction_type {
-    OFPIT_GOTO_TABLE = 1,       /* Setup the next table in the lookup
-                                   pipeline */
-    OFPIT_WRITE_METADATA = 2,   /* Setup the metadata field for use in later
-                                   pipelines */
-    OFPIT_WRITE_ACTIONS = 3,    /* Write the action(s) onto the datapath action
-                                   set */
-    OFPIT_APPLY_ACTIONS = 4,    /* Applies the action(s) immediately */
-    OFPIT_CLEAR_ACTIONS = 5,    /* Clears all actions from the datapath
-                                   action set */
-
-    OFPI_VENDOR = 0xFFFF        /* Vendor instruction */
-};
-
-struct ofp_instruction_goto_table {
-    uint16_t type;                /* OFPI_GOTO_TABLE */
-    uint16_t len;                 /* Length of this struct in bytes. */
-    uint8_t table_id;             /* Set next table in the lookup pipeline */
-    uint8_t pad[3];               /* Pad to 64 bits. */
-};
-OFP_ASSERT(sizeof(struct ofp_instruction_goto_table) == 8);
-
-struct ofp_instruction_write_metadata {
-    uint16_t type;                /* OFPI_WRITE_METADATA */
-    uint16_t len;                 /* Length of this struct in bytes. */
-    uint64_t metadata;            /* Metadata value to write */
-    uint64_t metadata_mask;       /* Metadata write bitmask */
-};
-OFP_ASSERT(sizeof(struct ofp_instruction_write_metadata) == 20);
-
-struct ofp_instruction_actions {
-    uint16_t type;              /* One of OFPI_*_ACTIONS */
-    uint16_t len;               /* Length of this struct in bytes. */
-    struct ofp_action_header actions[0];  /* Actions associated with
-                                             OFPI_WRITE_ACTIONS and
-                                             OFPI_APPLY_ACTIONS */
-};
-OFP_ASSERT(sizeof(ofp_instruction_actions) == 12);
-
-struct ofp_instruction_vendor {
-    uint16_t type;		/* OFPI_VENDOR */
-    uint16_t len;               /* Length of this struct in bytes */
-};
-OFP_ASSERT(sizeof(ofp_instruction_vendor) == 4);
-
 enum ofp_flow_mod_flags {
     OFPFF_SEND_FLOW_REM = 1 << 0,  /* Send flow removed message when flow
                                     * expires or is deleted. */
@@ -621,8 +564,7 @@
     uint64_t cookie;             /* Opaque controller-issued identifier. */
 
     /* Flow actions. */
-    uint8_t table_id;             /* ID of the table to put the flow in */
-    uint8_t command;              /* One of OFPFC_*. */
+    uint16_t command;             /* One of OFPFC_*. */
     uint16_t idle_timeout;        /* Idle time before discarding (seconds). */
     uint16_t hard_timeout;        /* Max time before discarding (seconds). */
     uint16_t priority;            /* Priority level of flow entry. */
@@ -633,7 +575,9 @@
                                      output port.  A value of OFPP_NONE
                                      indicates no restriction. */
     uint16_t flags;               /* One of OFPFF_*. */
-    struct ofp_instruction instructions[0]; /* Instruction set */
+    struct ofp_action_header actions[0]; /* The action length is inferred
+                                            from the length field in the
+                                            header. */
 };
 OFP_ASSERT(sizeof(struct ofp_flow_mod) == 72);
 
@@ -652,7 +596,7 @@
 
     uint16_t priority;        /* Priority level of flow entry. */
     uint8_t reason;           /* One of OFPRR_*. */
-    uint8_t table_id;         /* ID of the table */
+    uint8_t pad[1];           /* Align to 32-bits. */
 
     uint32_t duration_sec;    /* Time flow was alive in seconds. */
     uint32_t duration_nsec;   /* Time flow was alive in nanoseconds beyond
@@ -664,6 +608,17 @@
 };
 OFP_ASSERT(sizeof(struct ofp_flow_removed) == 88);
 
+enum ofp_group_mod_command {
+    OFPGMC_ADD,                 /* New group. */
+    OFPGMC_SET,                 /* Modify matching groups. */
+    OFPGMC_DELETE,              /* Delete all matching groups. */
+};
+
+/* Group mod (controller/switch) */
+struct ofp_group_mod {
+
+}
+
 /* Values for 'type' in ofp_error_message.  These values are immutable: they
  * will not change in future versions of the protocol (although new values may
  * be added). */
@@ -672,6 +627,7 @@
     OFPET_BAD_REQUEST,          /* Request was not understood. */
     OFPET_BAD_ACTION,           /* Error in action description. */
     OFPET_FLOW_MOD_FAILED,      /* Problem modifying flow entry. */
+    OFPET_GROUP_MOD_FAILED,     /* Problem modifying group entry. */
     OFPET_PORT_MOD_FAILED,      /* Port mod request failed. */
     OFPET_QUEUE_OP_FAILED       /* Queue operation failed. */
 };
@@ -695,8 +651,7 @@
     OFPBRC_EPERM,               /* Permissions error. */
     OFPBRC_BAD_LEN,             /* Wrong request length for type. */
     OFPBRC_BUFFER_EMPTY,        /* Specified buffer has already been used. */
-    OFPBRC_BUFFER_UNKNOWN,      /* Specified buffer does not exist. */
-    OFPBRC_BAD_TABLE_ID         /* Invalid table-id associated with the flow */
+    OFPBRC_BUFFER_UNKNOWN       /* Specified buffer does not exist. */
 };
 
 /* ofp_error_msg 'code' values for OFPET_BAD_ACTION.  'data' contains at least
@@ -707,10 +662,12 @@
     OFPBAC_BAD_VENDOR,         /* Unknown vendor id specified. */
     OFPBAC_BAD_VENDOR_TYPE,    /* Unknown action type for vendor id. */
     OFPBAC_BAD_OUT_PORT,       /* Problem validating output action. */
+    OFPBAC_BAD_OUT_GROUP,      /* Problem validating output action. */
     OFPBAC_BAD_ARGUMENT,       /* Bad action argument. */
     OFPBAC_EPERM,              /* Permissions error. */
     OFPBAC_TOO_MANY,           /* Can't handle this many actions. */
-    OFPBAC_BAD_QUEUE           /* Problem validating output queue. */
+    OFPBAC_BAD_QUEUE,          /* Problem validating output queue. */
+    OFPBAC_GROUP_CHAINING_UNSUPPORTED  /* Group chaining unsupported. */
 };
 
 /* ofp_error_msg 'code' values for OFPET_FLOW_MOD_FAILED.  'data' contains
@@ -723,18 +680,31 @@
     OFPFMFC_BAD_EMERG_TIMEOUT,  /* Flow not added because of non-zero idle/hard
                                  * timeout. */
     OFPFMFC_BAD_COMMAND,        /* Unknown command. */
-    OFPFMFC_UNSUPPORTED,        /* Unsupported action list - cannot process in
+    OFPFMFC_UNSUPPORTED         /* Unsupported action list - cannot process in
                                  * the order specified. */
-    OFPFMFC_TABLE_FULL,         /* Table specified by the flow mod */
-    OFPFMFC_BAD_INSTRUCTION     /* Unsupported instruction specified by the
-                                   flow mod */
+};
+
+/* ofp_error_msg 'code' values for OFPET_GROUP_MOD_FAILED.  'data' contains
+ * at least the first 64 bytes of the failed request. */
+enum ofp_group_mod_failed_code {
+    OFPGMFC_INVALID_GID,	          /* Group not added because Group
+                                       * Identifier is invalid. */
+    OFPGMFC_INVALID_ACTIONS,          /* Invalid actions were specified in
+                                       * a group's action bucket(s). */
+    OFPGMFC_NON_EQUAL_MP_UNSUPPORTED, /* Switch does not support unequal
+                                       * load sharing on multipath group. */
+    OFPGMFC_INVALID_DELETE,           /* forwarding ID does not exist, unable
+                                       * to delete. */
+    OFPGMFC_OUT_OF_GROUPS,	          /* The group table is full. */
+    OFPGMFC_GROUP_OUT_OF_MP_MEMBERS   /* The maximum number of action buckets
+                                       * for a group has been exceeded. */
 };
 
 /* ofp_error_msg 'code' values for OFPET_PORT_MOD_FAILED.  'data' contains
  * at least the first 64 bytes of the failed request. */
 enum ofp_port_mod_failed_code {
     OFPPMFC_BAD_PORT,            /* Specified port does not exist. */
-    OFPPMFC_BAD_HW_ADDR          /* Specified hardware address is wrong. */
+    OFPPMFC_BAD_HW_ADDR,         /* Specified hardware address is wrong. */
 };
 
 /* ofp_error msg 'code' values for OFPET_QUEUE_OP_FAILED. 'data' contains
@@ -856,7 +826,7 @@
     uint64_t cookie;          /* Opaque controller-issued identifier. */
     uint64_t packet_count;    /* Number of packets in flow. */
     uint64_t byte_count;      /* Number of bytes in flow. */
-    struct ofp_instruction instructions[0]; /* Instruction set. */
+    struct ofp_action_header actions[0]; /* Actions. */
 };
 OFP_ASSERT(sizeof(struct ofp_flow_stats) == 88);
 
@@ -889,17 +859,12 @@
     char name[OFP_MAX_TABLE_NAME_LEN];
     uint32_t wildcards;      /* Bitmap of OFPFW_* wildcards that are
                                 supported by the table. */
-    uint32_t actions;        /* Bitmap of OFPAT_* that are supported
-                                by the table. */
-    uint32_t match;          /* Bitmap of OFPFW_* that indicate the fields
-                                the table can match on. */
-    uint32_t instructions;   /* Bitmap of OFPIT_* values supported. */
     uint32_t max_entries;    /* Max number of entries supported. */
     uint32_t active_count;   /* Number of active entries. */
     uint64_t lookup_count;   /* Number of packets looked up in table. */
     uint64_t matched_count;  /* Number of packets that hit table. */
 };
-OFP_ASSERT(sizeof(struct ofp_table_stats) == 76)
+OFP_ASSERT(sizeof(struct ofp_table_stats) == 64);
 
 /* Body for ofp_stats_request of type OFPST_PORT. */
 struct ofp_port_stats_request {
