--- openflow-2011-10-12-7.h	2015-07-23 09:54:16.772479347 -0700
+++ openflow-2011-10-03-4.h	2015-07-23 09:54:16.776479347 -0700
@@ -139,6 +139,10 @@
     /* Queue Configuration messages. */
     OFPT_QUEUE_GET_CONFIG_REQUEST,  /* Controller/switch message */
     OFPT_QUEUE_GET_CONFIG_REPLY,     /* Controller/switch message */
+
+    /* Controller role change request messages. */
+    OFPT_ROLE_REQUEST,        /* Controller/switch message */
+    OFPT_ROLE_REPLY,          /* Controller/switch message */
 };
 
 /* Header on all OpenFlow packets. */
@@ -1805,4 +1809,39 @@
 };
 OFP_ASSERT(sizeof(struct ofp_queue_stats) == 32);
 
+/* Configures the "role" of the sending controller.  The default role is:
+ *
+ *    - Equal (NX_ROLE_EQUAL), which allows the controller access to all
+ *      OpenFlow features. All controllers have equal responsibility.
+ *
+ * The other possible roles are a related pair:
+ *
+ *    - Master (NX_ROLE_MASTER) is equivalent to Equal, except that there may
+ *      be at most one Master controller at a time: when a controller
+ *      configures itself as Master, any existing Master is demoted to the
+ *      Slave role.
+ *
+ *    - Slave (NX_ROLE_SLAVE) allows the controller read-only access to
+ *      OpenFlow features.  In particular attempts to modify the flow table
+ *      will be rejected with an OFPBRC_EPERM error.
+ *
+ *      Slave controllers do not receive OFPT_PACKET_IN or OFPT_FLOW_REMOVED
+ *      messages, but they do receive OFPT_PORT_STATUS messages.
+ */
+
+/* Controller roles. */
+enum ofp_controller_role {
+    OFPCR_ROLE_EQUAL,           /* Default role, full access. */
+    OFPCR_ROLE_MASTER,          /* Full access, at most one master. */
+    OFPCR_ROLE_SLAVE,           /* Read-only access. */
+    OFPCR_ROLE_NOCHANGE         /* Don't change current role. */
+};
+
+/* Role request and reply message. */
+struct ofp_role_request {
+    struct ofp_header header;   /* Type OFPT_ROLE_REQUEST/OFPT_ROLE_REPLY. */
+    uint32_t role;              /* One of NX_ROLE_*. */
+};
+OFP_ASSERT(sizeof(struct ofp_role_request) == 12);
+
 #endif /* openflow/openflow.h */
