Add ability to direct "packet-in"s to particular controllers.
[sliver-openvswitch.git] / lib / ofp-util.h
index 59d6b1a..5cc6327 100644 (file)
@@ -81,6 +81,7 @@ enum ofputil_msg_code {
     OFPUTIL_NXT_PACKET_IN,
     OFPUTIL_NXT_FLOW_AGE,
     OFPUTIL_NXT_SET_ASYNC_CONFIG,
+    OFPUTIL_NXT_SET_CONTROLLER_ID,
 
     /* NXST_* stat requests. */
     OFPUTIL_NXST_FLOW_REQUEST,
@@ -233,6 +234,7 @@ struct ofputil_packet_in {
     size_t packet_len;
 
     enum ofp_packet_in_reason reason;    /* One of OFPRR_*. */
+    uint16_t controller_id;              /* Controller ID to send to. */
     uint8_t table_id;
     ovs_be64 cookie;
 
@@ -248,6 +250,10 @@ int ofputil_decode_packet_in(struct ofputil_packet_in *,
 struct ofpbuf *ofputil_encode_packet_in(const struct ofputil_packet_in *,
                                         enum nx_packet_in_format);
 
+const char *ofputil_packet_in_reason_to_string(enum ofp_packet_in_reason);
+bool ofputil_packet_in_reason_from_string(const char *,
+                                          enum ofp_packet_in_reason *);
+
 /* Abstract packet-out message. */
 struct ofputil_packet_out {
     const void *packet;         /* Packet data, if buffer_id == UINT32_MAX. */