--- openflow-2011-10-10.h	2015-07-23 09:54:16.948479354 -0700
+++ openflow-2011-10-10-2.h	2015-07-23 09:54:16.952479354 -0700
@@ -152,7 +152,7 @@
     OFPT_SET_ASYNC          = 28, /* Controller/switch message */
 
     /* Meters and rate limiters configuration messages. */
-    OFPT_METER_SET_REQUEST  = 29, /* Controller/switch message */
+    OFPT_METER_MOD          = 29, /* Controller/switch message */
 };
 
 /* Header on all OpenFlow packets. */
@@ -1007,7 +1007,7 @@
     OFPIT_APPLY_ACTIONS = 4,    /* Applies the action(s) immediately */
     OFPIT_CLEAR_ACTIONS = 5,    /* Clears all actions from the datapath
                                    action set */
-    OFPIT_METER = 6;            /* Apply meter (rate limiter) */
+    OFPIT_METER = 6,            /* Apply meter (rate limiter) */
 
     OFPIT_EXPERIMENTER = 0xFFFF  /* Experimenter instruction */
 };
@@ -1274,36 +1274,77 @@
     OFPM_MAX        = 0xffff0000,
 
     /* Virtual meters. */
-    OFPM_SLOWPATH   = 0xfffffffd;  /* Meter for slow datapath. */
-    OFPM_CONTROLLER = 0xfffffffe;  /* Meter for controller datapath. */
+    OFPM_SLOWPATH   = 0xfffffffd,  /* Meter for slow datapath. */
+    OFPM_CONTROLLER = 0xfffffffe,  /* Meter for controller datapath. */
     OFPM_ALL        = 0xffffffff,  /* Represents all meters for stat requests
                                       commands. */
 };
 
-/* Meter capability flags and configuration flags */
-enum ofp_meter_capabilities {
-    OFPMC_KBPS    = 1 << 0,     /* Rate value in kb/s (kilo-bit per second) */
-    OFPMC_PKTPS   = 1 << 1,     /* Rate value in packet/sec */
-    OFPMC_DROP    = 1 << 2,     /* Drop packet if rate exceeded */
-    OFPMC_ACTIONS = 1 << 3,     /* Write actions if rate exceeded */
-    OFPMC_BURST   = 1 << 4,     /* Do burst size */
-    OFPMC_STATS   = 1 << 5,     /* Collect statistics */
+/* Meter property types */
+enum ofp_meter_prop_type {
+    OFPMPT_DROP          = 1,      /* Drop packet */
+    OFPMPT_WRITE_ACTIONS = 2,      /* Write actions in action set */
+    OFPMPT_EXPERIMENTER  = 0xFFFF  /* Experimenter meter property */
+};
+
+/* Common header for all rate properties */
+struct ofp_meter_prop_header {
+    uint16_t        type;    /* One of OFPMPT_*. */
+    uint16_t        len;     /* Length in bytes of this property. */
+    uint32_t        rate;    /* Rate for this property. */
+};
+OFP_ASSERT(sizeof(struct ofp_meter_prop_header) == 8);
+
+/* OFPMPT_DROP property - drop packets */
+struct ofp_meter_prop_drop {
+    uint16_t        type;    /* One of OFPMPT_*. */
+    uint16_t        len;     /* Length in bytes of this property. */
+    uint32_t        rate;    /* Rate for dropping packets. */
+};
+OFP_ASSERT(sizeof(struct ofp_meter_prop_drop) == 8);
+
+/* OFPMPT_WRITE_ACTIONS property - Write actions in action set */
+struct ofp_meter_prop_write {
+    uint16_t        type;    /* One of OFPMPT_*. */
+    uint16_t        len;     /* Length in bytes of this property. */
+    uint32_t        rate;    /* Rate for dropping packets. */
+    struct ofp_action_header actions[0]; /* The action length is inferred
+                                           from the length field. */
+};
+OFP_ASSERT(sizeof(struct ofp_meter_prop_write) == 8);
+
+/* OFPMPT_EXPERIMENTER property - Write actions in action set */
+struct ofp_meter_prop_experimenter {
+    uint16_t        type;    /* One of OFPMPT_*. */
+    uint16_t        len;     /* Length in bytes of this property. */
+    uint32_t        rate;    /* Rate for dropping packets. */
+    uint32_t        experimenter;   /* Experimenter ID which takes the same
+                                       form as in struct
+                                       ofp_experimenter_header. */
+};
+OFP_ASSERT(sizeof(struct ofp_meter_prop_experimenter) == 12);
+
+/* Meter configuration flags */
+enum ofp_meter_flags {
+    OFPMF_KBPS    = 1 << 0,     /* Rate value in kb/s (kilo-bit per second) */
+    OFPMF_PKTPS   = 1 << 1,     /* Rate value in packet/sec */
+    OFPMF_BURST   = 1 << 2,     /* Do burst size */
+    OFPMF_STATS   = 1 << 3,     /* Collect statistics */
 };
 
-/* Meter configuration. OFPT_METER_SET_REQUEST. */
-struct ofp_meter_set_request {
+/* Meter configuration. OFPT_METER_MOD. */
+struct ofp_meter_mod {
     struct ofp_header	header;
     uint16_t            command;        /* One of OFPGC_*. */
     uint8_t             pad[2];
     uint32_t            meter_id;       /* Meter instance. */
     uint32_t            flags;          /* One of OFPMC_*. */
-    uint32_t            drop_rate;      /* Rate for dropping packets */
-    uint32_t            actions_rate;   /* Rate for writing actions */
     uint32_t            burst_size;     /* Size of bursts */
-    struct ofp_action_header actions[0]; /* The action length is inferred
-                                           from the length field in the
-                                           header. */
+    struct ofp_meter_prop_header properties[0]; /* The properties length is
+                                           inferred from the length field
+                                           in the header. */
 };
+OFP_ASSERT(sizeof(struct ofp_meter_mod) == 24);
 
 /* 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
@@ -1514,6 +1555,8 @@
     OFPBMRC_BAD_FLAGS    = 3,   /* Flag configuration unsupported. */
     OFPBMRC_BAD_RATE     = 4,   /* Rate unsupported. */
     OFPBMRC_BAD_BURST    = 5,   /* Burst size unsupported. */
+    OFPBMRC_BAD_PROPERTY,       /* Property unsupported. */
+    OFPBMRC_TOO_MANY,           /* Can't handle this many properties. */
 };
 
 /* OFPT_ERROR: Error message (datapath -> controller). */
@@ -1842,18 +1885,25 @@
 };
 OFP_ASSERT(sizeof(struct ofp_meter_stats_request) == 8);
 
+/* Statistics for each meter properties */
+struct ofp_meter_prop_stats {
+    uint64_t        packet_over_count;   /* Number of packets exceed prop. */
+    uint64_t        byte_over_count;     /* Number of bytes exceed prop. */
+};
+OFP_ASSERT(sizeof(struct ofp_meter_prop_stats) == 16);
+
 /* Body of reply to OFPST_METER request. Meter statistics. */
 struct ofp_meter_stats {
     uint32_t        meter_id;         /* Meter instance. */
+    uint16_t        len;              /* Length in bytes of this stats. */
+    uint8_t         pad[6];
     uint32_t        flow_count;       /* Number of flows bound to meter. */
-    uint64_t        packet_count;     /* Number of packets in input. */
-    uint64_t        byte_count;	      /* Number of bytes in input. */
-    uint64_t        packet_drop;      /* Number of packets dropped. */
-    uint64_t        byte_drop;        /* Number of bytes dropped. */
-    uint64_t        packet_actions;   /* Number of packets for actions. */
-    uint64_t        byte_actions;     /* Number of bytes for actions. */
+    uint64_t        packet_in_count;  /* Number of packets in input. */
+    uint64_t        byte_in_count;    /* Number of bytes in input. */
+    struct ofp_meter_prop_stats prop_stats[0]; /* The properties length is
+                                         inferred from the length field. */
 };
-OFP_ASSERT(sizeof(struct ofp_meter_stats) == 56);
+OFP_ASSERT(sizeof(struct ofp_meter_stats) == 32);
 
 /* Body of reply to OFPST_METER_CONFIG request. Meter configuration. */
 struct ofp_meter_config_stats {
@@ -1861,21 +1911,18 @@
     uint8_t         pad[2];
     uint32_t        meter_id;         /* Meter instance. */
     uint32_t        flags;            /* All OFPMC_* that apply. */
-    uint32_t        drop_rate;        /* Rate for dropping packets. */
-    uint32_t        actions_rate;     /* Rate for writing actions. */
-    uint32_t        burst_size;	      /* Size of bursts. */
-    struct ofp_action_header actions[0]; /* The action length is inferred
-                                           from the length field in the
-                                           entry. */
+    uint32_t        burst_size;       /* Size of bursts */
+    struct ofp_meter_prop_header properties[0]; /* The properties length is
+					 inferred from the length field. */
 };
-OFP_ASSERT(sizeof(struct ofp_meter_config_stats) == 24);
+OFP_ASSERT(sizeof(struct ofp_meter_config_stats) == 16);
 
 /* Body of reply to OFPST_METER_FEATURES request. Meter features. */
 struct ofp_meter_features_stats {
-    uint32_t        max_meter;    /* Maximum number of meters. */
-    uint32_t        capabilities; /* Bitmaps of "ofp_meter_capabilities". */
-    uint32_t        actions;      /* Bitmap of OFPAT_* that are supported. */
-    uint8_t         pad[4];
+    uint32_t    max_meter;    /* Maximum number of meters. */
+    uint32_t    capabilities; /* Bitmaps of OFPMPT_* values supported. */
+    uint32_t    flags;        /* Bitmaps of "ofp_meter_flags". */
+    uint32_t    actions;      /* Bitmap of OFPAT_* that are supported. */
 };
 OFP_ASSERT(sizeof(struct ofp_meter_features_stats) == 16);
 
