--- openflow-2011-10-12-3.h	2015-07-23 09:54:16.684479343 -0700
+++ openflow-2011-09-16-2.h	2015-07-23 09:54:16.688479343 -0700
@@ -376,22 +376,22 @@
 
 enum ofp_action_type {
     OFPAT_OUTPUT,           /* Output to switch port. */
-    OFPAT_SET_VLAN_VID,     /* Set the 802.1q VLAN id. */
-    OFPAT_SET_VLAN_PCP,     /* Set the 802.1q priority. */
-    OFPAT_SET_DL_SRC,       /* Ethernet source address. */
-    OFPAT_SET_DL_DST,       /* Ethernet destination address. */
-    OFPAT_SET_NW_SRC,       /* IP source address. */
-    OFPAT_SET_NW_DST,       /* IP destination address. */
-    OFPAT_SET_NW_TOS,       /* IP ToS (DSCP field, 6 bits). */
-    OFPAT_SET_NW_ECN,       /* IP ECN (2 bits). */
-    OFPAT_SET_TP_SRC,       /* TCP/UDP/SCTP source port. */
-    OFPAT_SET_TP_DST,       /* TCP/UDP/SCTP destination 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_SET_MPLS_LABEL,   /* MPLS label */
-    OFPAT_SET_MPLS_TC,      /* MPLS TC */
+    OFPAT_OBSOLETE_11,      /* Obsolete. */
+    OFPAT_OBSOLETE_12,      /* Obsolete. */
     OFPAT_SET_MPLS_TTL,     /* MPLS TTL */
     OFPAT_DEC_MPLS_TTL,     /* Decrement MPLS TTL */
 
@@ -403,6 +403,7 @@
     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
 };
 
@@ -419,85 +420,6 @@
 };
 OFP_ASSERT(sizeof(struct ofp_action_output) == 16);
 
-/* Action structure for OFPAT_SET_VLAN_VID. */
-struct ofp_action_vlan_vid {
-    uint16_t type;                  /* OFPAT_SET_VLAN_VID. */
-    uint16_t len;                   /* Length is 8. */
-    uint16_t vlan_vid;              /* VLAN id. */
-    uint8_t pad[2];
-};
-OFP_ASSERT(sizeof(struct ofp_action_vlan_vid) == 8);
-
-/* Action structure for OFPAT_SET_VLAN_PCP. */
-struct ofp_action_vlan_pcp {
-    uint16_t type;                  /* OFPAT_SET_VLAN_PCP. */
-    uint16_t len;                   /* Length is 8. */
-    uint8_t vlan_pcp;               /* VLAN priority. */
-    uint8_t pad[3];
-};
-OFP_ASSERT(sizeof(struct ofp_action_vlan_pcp) == 8);
-
-/* Action structure for OFPAT_SET_DL_SRC/DST. */
-struct ofp_action_dl_addr {
-    uint16_t type;                  /* OFPAT_SET_DL_SRC/DST. */
-    uint16_t len;                   /* Length is 16. */
-    uint8_t dl_addr[OFP_ETH_ALEN];  /* Ethernet address. */
-    uint8_t pad[6];
-};
-OFP_ASSERT(sizeof(struct ofp_action_dl_addr) == 16);
-
-/* Action structure for OFPAT_SET_NW_SRC/DST. */
-struct ofp_action_nw_addr {
-    uint16_t type;                  /* OFPAT_SET_TW_SRC/DST. */
-    uint16_t len;                   /* Length is 8. */
-    uint32_t nw_addr;               /* IP address. */
-};
-OFP_ASSERT(sizeof(struct ofp_action_nw_addr) == 8);
-
-/* Action structure for OFPAT_SET_TP_SRC/DST. */
-struct ofp_action_tp_port {
-    uint16_t type;                  /* OFPAT_SET_TP_SRC/DST. */
-    uint16_t len;                   /* Length is 8. */
-    uint16_t tp_port;               /* TCP/UDP/SCTP port. */
-    uint8_t pad[2];
-};
-OFP_ASSERT(sizeof(struct ofp_action_tp_port) == 8);
-
-/* Action structure for OFPAT_SET_NW_TOS. */
-struct ofp_action_nw_tos {
-    uint16_t type;                  /* OFPAT_SET_TW_SRC/DST. */
-    uint16_t len;                   /* Length is 8. */
-    uint8_t nw_tos;                 /* IP ToS (DSCP field, 6 bits). */
-    uint8_t pad[3];
-};
-OFP_ASSERT(sizeof(struct ofp_action_nw_tos) == 8);
-
-/* Action structure for OFPAT_SET_NW_ECN. */
-struct ofp_action_nw_ecn {
-    uint16_t type;                  /* OFPAT_SET_TW_SRC/DST. */
-    uint16_t len;                   /* Length is 8. */
-    uint8_t nw_ecn;                 /* IP ECN (2 bits). */
-    uint8_t pad[3];
-};
-OFP_ASSERT(sizeof(struct ofp_action_nw_ecn) == 8);
-
-/* Action structure for OFPAT_SET_MPLS_LABEL. */
-struct ofp_action_mpls_label {
-    uint16_t type;                  /* OFPAT_SET_MPLS_LABEL. */
-    uint16_t len;                   /* Length is 8. */
-    uint32_t mpls_label;            /* MPLS label */
-};
-OFP_ASSERT(sizeof(struct ofp_action_mpls_label) == 8);
-
-/* Action structure for OFPAT_SET_MPLS_TC. */
-struct ofp_action_mpls_tc {
-    uint16_t type;                  /* OFPAT_SET_MPLS_TC. */
-    uint16_t len;                   /* Length is 8. */
-    uint8_t mpls_tc;                /* MPLS TC */
-    uint8_t pad[3];
-};
-OFP_ASSERT(sizeof(struct ofp_action_mpls_tc) == 8);
-
 /* Action structure for OFPAT_SET_MPLS_TTL. */
 struct ofp_action_mpls_ttl {
     uint16_t type;                  /* OFPAT_SET_MPLS_TTL. */
@@ -542,6 +464,19 @@
 };
 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 {
@@ -1277,6 +1212,9 @@
 				  list in an Apply-Actions instruction */
     OFPBAC_BAD_TAG,            /* Actions uses an unsupported
                                   tag/encap. */
+    OFPBAC_BAD_SET_TYPE,       /* Unsupported type in OFPAT_SET_FIELD action. */
+    OFPBAC_BAD_SET_LEN,        /* Length problem in OFPAT_SET_FIELD action. */
+    OFPBAC_BAD_SET_ARGUMENT,   /* Bad argument in OFPAT_SET_FIELD action. */
 };
 
 /* ofp_error_msg 'code' values for OFPET_BAD_INSTRUCTION.  'data' contains at least
@@ -1576,6 +1514,10 @@
                                 fields the table can match on. */
     uint64_t wildcards;      /* Bitmap of (1 << OFPXMT_*) wildcards that are
                                 supported by the table. */
+    uint64_t write_setfields;/* Bitmap of (1 << OFPXMT_*) header fields that
+                                can be set with OFPIT_WRITE_ACTIONS. */
+    uint64_t apply_setfields;/* Bitmap of (1 << OFPXMT_*) header fields that
+                                can be set with OFPIT_APPLY_ACTIONS. */
     uint64_t metadata_match; /* Bits of metadata table can match. */
     uint64_t metadata_write; /* Bits of metadata table can write. */
     uint32_t instructions;   /* Bitmap of OFPIT_* values supported. */
@@ -1589,7 +1531,7 @@
     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) == 112);
+OFP_ASSERT(sizeof(struct ofp_table_stats) == 128);
 
 /* Body for ofp_stats_request of type OFPST_PORT. */
 struct ofp_port_stats_request {
